PDFs
a PDF link that would be dead once published, and a PDF over 20 MB
wiki check refuses a link to a PDF that would lead nowhere once the site is published, and a PDF over the
size limit.[1] Where PDFs are kept and how a page links one is described on
PDFs.
Refusals
A build publishes a PDF only from the wiki's files folder, so every other place a link can lead is
refused.[2]
| Refused | Message |
|---|---|
A link to a PDF outside the files folder, or in a folder inside it[2] |
wiki: refunds.md:12: links to ../policy.pdf, which is outside the wiki's files folder and would be dead once published; put policy.pdf in the files folder and link it as ../files/policy.pdf |
A link to a PDF the files folder does not hold[3] |
wiki: refunds.md:14: links to ../files/old-policy.pdf, which does not exist; put old-policy.pdf in the wiki's files folder, or correct the link |
| A PDF over 20 MB[4] | wiki: refunds.md:16: links to ../files/big.pdf, which is 20.1 MB, over the 20 MB a PDF may be; make it smaller, such as by compressing its pictures, or split it into parts |
The limit is 20 MB, counted as 20 × 1,048,576 bytes, so a PDF of exactly 20 MB passes and one byte more is refused.[4]
Scope
The check judges the links the build writes, so it and the build never disagree about a link.[5]
Every link whose file name ends in .pdf, in any case, is checked, whether markdown writes it plainly, with a
title, in angle brackets, by reference or with a query after the name.[5] A link in a reference is
checked too, and the citation check also refuses a PDF there, as Citations describes.[5]
Exceptions
A link shown in code is not checked, and neither is a link to an address outside the wiki, such as a vendor's own PDF.[5]
Enforcement
wiki check lists every problem and exits with 1.[1] A PDF that is a symbolic link to a file
outside the files folder stops the build, and so does a files folder that is itself a symbolic link, so
no build publishes a file from outside the wiki.[6]
wiki: refunds.md links to terms.pdf, which links to a file outside the files folder; put the PDF itself in the wiki's files folder
wiki: the wiki's files folder is a symbolic link, so a build would publish whatever it points at; make files a folder of its own inside the wiki, and put the PDFs in it
Clearing
Each refusal names its fix: put the PDF in the files folder and link it there, add the missing PDF or
correct the link, or make the PDF smaller.[1]