From efe5dbd187395beb4dc660e6dd5d3276449911db Mon Sep 17 00:00:00 2001
From: rschoene <rene.schoene@tu-dresden.de>
Date: Thu, 4 Feb 2021 13:40:48 +0100
Subject: [PATCH] Use better plugin for last-updated

---
 .gitlab-ci.yml                 | 3 ++-
 pages/custom_theme/footer.html | 4 ++--
 pages/mkdocs.yml               | 7 +++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b74bbce..2bd5703 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 variables:
   GIT_SUBMODULE_STRATEGY: recursive
+  GIT_DEPTH: 1000
 
 stages:
   - build
@@ -91,7 +92,7 @@ pages:
     - ragdoc_view
     - test
   before_script:
-    - pip install -U mkdocs mkdocs-macros-plugin mkdocs-git-revision-date-plugin
+    - pip install -U mkdocs mkdocs-macros-plugin mkdocs-git-revision-date-localized-plugin
   script:
     - cd pages && mkdocs build
   only:
diff --git a/pages/custom_theme/footer.html b/pages/custom_theme/footer.html
index e76f0a2..2d6c164 100644
--- a/pages/custom_theme/footer.html
+++ b/pages/custom_theme/footer.html
@@ -4,8 +4,8 @@
 {% endif %}
 <hr>
 Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-{% if page and page.meta and page.meta.revision_date %}
-<small><br><i>Last updated {{ page.meta.revision_date.strftime('%B %d, %Y at %H:%M') }}</i></small>
+{% if page and page.meta and page.meta.git_revision_date_localized %}
+<small><br><i>Last updated {{ page.meta.git_revision_date_localized }}</i></small>
 {% endif %}
 </p>
 {% endblock %}
diff --git a/pages/mkdocs.yml b/pages/mkdocs.yml
index a818455..fe8acd8 100644
--- a/pages/mkdocs.yml
+++ b/pages/mkdocs.yml
@@ -11,8 +11,11 @@ theme:
   custom_dir: custom_theme/
 plugins:
   - search
-  - git-revision-date:
-      as_datetime: True
+  - git-revision-date-localized:
+      type: datetime
+      timezone: Europe/Berlin
+      locale: en
+      fallback_to_build_date: True
   - macros
 repo_url: https://git-st.inf.tu-dresden.de/jastadd/ragconnect
 site_dir: ../public
-- 
GitLab