From a2dd1f35502491449796081ca8792c44931e0426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Thu, 21 Sep 2023 00:43:12 +0200 Subject: [PATCH] Add the last revision date on the bottom of each page --- .gitlab-ci.yml | 2 +- README.md | 6 ++---- mkdocs.yml | 8 +++++++- requirements.txt | 1 + 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 373accc..607022f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: GIT_STRATEGY: fetch - GIT_DEPTH: 1 + GIT_DEPTH: 0 # Git revision date plugin # Builds the static website with MkDocs. The whole sequence of command is # implemented into the before_script section for enhanced composability. diff --git a/README.md b/README.md index 8cbfc79..354a675 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,8 @@ Prepare your environment: ``` bash python3 -m venv pyvenv -source pyvenv/bin/activate -python3 -m pip install --upgrade pip -python3 -m pip install -r requirements.txt -deactivate +pyvenv/bin/pip install --upgrade pip +pyvenv/bin/pip install -r requirements.txt ``` Start a local web server to visualize your changes: diff --git a/mkdocs.yml b/mkdocs.yml index d95349a..279a1a4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: CMS GEM DAQ Documentation site_url: https://cmsgemonline.web.cern.ch/doc/latest repo_url: https://gitlab.cern.ch/cmsgemonline/gem-ops/gem-daq-doc -repo_name: gem-daq-doc +repo_name: GitLab edit_uri: edit/main/docs/ theme: @@ -12,6 +12,8 @@ theme: - navigation.sections - navigation.tabs - navigation.top + icon: + repo: fontawesome/brands/gitlab markdown_extensions: - admonition @@ -28,6 +30,10 @@ extra_javascript: - https://polyfill.io/v3/polyfill.min.js?features=es6 - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js +plugins: + - git-revision-date-localized + - search + nav: - Getting started: - index.md diff --git a/requirements.txt b/requirements.txt index a4df8bf..3a0add1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ mkdocs-material==8.4.2 +mkdocs-git-revision-date-localized-plugin==1.2.0 -- GitLab