Skip to content

'last_update' in PDF version not working #12

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

Closed
timvink opened this issue Feb 20, 2020 · 2 comments
Closed

'last_update' in PDF version not working #12

timvink opened this issue Feb 20, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@timvink
Copy link
Owner

timvink commented Feb 20, 2020

When building PDF versions of the website, the last updated date does not display.

image

Perhaps we can hide it somehow when printing PDF.

@RDIL
Copy link
Contributor

RDIL commented Feb 20, 2020

The link attribute has something to do with this, maybe put CSS with display none through that.

@timvink
Copy link
Owner Author

timvink commented Feb 22, 2020

When using this plugin with mkdocs-material, the last date is wrapped in a div with class md-source-date. We can prevent displaying the last revision date when printing by adding some extra CSS when building:

@media print {
    .md-source-date { display: none; }
}

Just tested this and it works nicely with mkdocs-pdf-export-plugin

Good to be explicit to users about this, and add an option enable_on_printing with a default of false.

We would also need to wrap output with <span class="git-revision-date-localized"> </span>, so we can also accomodate for use cases without mkdocs-material. CSS to add is then:

@media print {
    .md-source-date { display: none; }
    .git-revision-date-localized { display: none; }
}

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

2 participants