Skip to content

build date into footer (alternative to "git-revision-date-localized") #7627

Answered by kamilkrzyskow
buhtz asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @buhtz,
as per the documentation build_date_utc is under the Global context section.

The context is generated and passed to the templates with set variables, and it can be modified by plugins in events:

You can use template overrides to create a modified version of the partials/footer.html template:

To access and print the variable use the Jinja2 syntax:
{{ build_date_utc }}

To detect changes during mkdocs serve in your overrides use the --watch-theme flag.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@buhtz
Comment options

@alexvoss
Comment options

alexvoss Oct 26, 2024
Collaborator Sponsor

@kamilkrzyskow
Comment options

Answer selected by buhtz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants