Skip to content

Commit

Permalink
Fix: Page latest update showing last commit on general repo
Browse files Browse the repository at this point in the history
  • Loading branch information
amandaguglieri committed Nov 25, 2023
1 parent 3e46e3e commit 3ca7635
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- run: pip install mkdocs==1.1.2
- run: pip install mkdocs-material
- run: pip install mkdocs-glightbox
- run: pip install mkdocs-git-revision-date-plugin
- run: pip install mkdocs-git-revision-date-localized-plugin
- run: pip install mkdocs-pdf-export-plugin
- run: mkdocs gh-deploy --force
- run: mkdocs --version
Binary file added docs/overrides/.content.html.swp
Binary file not shown.
21 changes: 21 additions & 0 deletions docs/overrides/content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Overwrites content.html base mkdocs theme, taken from
https://github.com/mkdocs/mkdocs/blob/master/mkdocs/themes/mkdocs/content.html -->

{% if page.meta.source %}
<div class="source-links">
{% for filename in page.meta.source %}
<span class="label label-primary">{{ filename }}</span>
{% endfor %}
</div>
{% endif %}

{{ page.content }}

<!-- This section adds support for localized revision dates -->
{% if page.meta.git_revision_date_localized %}
<small>Last update: {{ page.meta.git_revision_date_localized }}</small>
{% endif %}
{% if page.meta.git_created_date_localized %}
<small>Created: {{ page.meta.git_created_date_localized }}</small>
{% endif %}

5 changes: 4 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ nav:
- Downloads: files/index-of-files.md
theme:
name: material
custom_dir: docs/overrides
features:
- navigation.instant
- navigation.top
Expand Down Expand Up @@ -488,10 +489,12 @@ plugins:
- search
- tags:
tags_file: tags.md
- git-revision-date
- git-revision-date:
type: timeago
- pdf-export:
verbose: true
enabled_if_env: ENABLE_PDF_EXPORT
#- git-revision-date-localized

extra:
social:
Expand Down

0 comments on commit 3ca7635

Please sign in to comment.