Skip to content

Add last updated date #33

@timvink

Description

@timvink

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions