mkdocs-print-site-plugin icon indicating copy to clipboard operation
mkdocs-print-site-plugin copied to clipboard

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

Open Sheldon-Hsu opened this issue 1 year ago • 1 comments

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

Sheldon-Hsu avatar Jun 13 '24 08:06 Sheldon-Hsu

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.

stephffuller avatar Jul 24 '24 14:07 stephffuller

Closing as no reply. Feel free to re-open if you still have issues :)

timvink avatar Mar 10 '25 08:03 timvink