Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe in the docs how to add a PDF download button #15

Closed
timvink opened this issue Sep 21, 2020 · 0 comments
Closed

Describe in the docs how to add a PDF download button #15

timvink opened this issue Sep 21, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@timvink
Copy link
Owner

timvink commented Sep 21, 2020

Basically how to manually add a non-markdown file to the MkDocs site.

I envision the user pointing to the location of the PDF file in the config, and the plugin then taking care of adding the file and a page.pdf_url parameter to every page. Then you can overwrite a page content partial.

We could use the fontawesome icon file-pdf

<i class="fas fa-file-pdf"></i>

We add an extra config param pdf_url, with the relative url from the docs/ dir. All files in docs are copied over (link).

Just need to figure out the correct link to the file. Perhaps for each page find the os.path.dirname() of the url_relative_to() the index page. Maybe there's a variable with the homepage.

@timvink timvink added the enhancement New feature or request label Sep 21, 2020
@timvink timvink closed this as completed in c388687 Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant