timvink / mkdocs-print-site-plugin

MkDocs Plugin that adds an additional page that combines all pages, allowing easy exports to PDF and standalone HTML.
https://timvink.github.io/mkdocs-print-site-plugin/
MIT License
147 stars 23 forks source link

After adding the pdf button, clicking the button will jump to 404 #107

Open Sheldon-Hsu opened 5 months ago

Sheldon-Hsu commented 5 months ago

adding the pdf button as https://timvink.github.io/mkdocs-print-site-plugin/how-to/pdf_button.html ,after the pdf button is added according to the document operation, but jump to 404 .Does anyone know how to fix this? Thanks. my mkdocs.yml: plugins: - search - print-site: path_to_pdf: "assets/user_manual.pdf" enumerate_headings: true add_table_of_contents: true

pdf file is in :site/assets/user_manual.pdf

the button jump to :127.0.0.1/assets/user_manual.pdf

stephffuller commented 3 months ago

This looks like a case of a bad link. The /site directory is not a sub-directory of the docs directory, which is the folder that mkdocs builds from. Try moving your pdf file to somewhere inside docs, and see if that works better for you.