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

Add last updated date #33

Closed
timvink opened this issue Mar 31, 2020 · 1 comment
Closed

Add last updated date #33

timvink opened this issue Mar 31, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@timvink
Copy link
Owner

timvink commented Mar 31, 2020

v.0.3.0 adds our own Git classes, making it possible to also expose the last updated date of a page or entire site.

Markdown tags

We can add the following markdown tags:

  • {{ git_page_last_updated }}
  • {{ git_site_last_updated }}

These should output the date or datetime only, and not include the text "Last updated: ". That should be picked up in #14.

Jinja2 variables

For those developing custom themes, we can extend the dict {{ git_info }}. Proposal:

{
    ...,
   'page_last_updated' : {
        'date' : '28 November, 2019',
        'datetime' : '28 November, 2019 13:57:28'
   },
    'site_last_updated' : # same structure
}

Options

We should add two new options:

Other

  • Update README
  • Update tests
  • Update setup.py to include dependency on babel
@timvink timvink added the enhancement New feature or request label Apr 1, 2020
@timvink
Copy link
Owner Author

timvink commented Sep 11, 2021

On second thought, better to use https://github.com/timvink/mkdocs-git-revision-date-localized-plugin

@timvink timvink closed this as completed Sep 11, 2021
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