diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c445005e..bcc796df 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -57,7 +57,7 @@ jobs: run: playwright install --with-deps chromium - name: Build Website - run: mkdocs build + run: MKDOCS_EXPORTER_PDF=true mkdocs build - name: Push Website to gh-pages Branch uses: JamesIves/github-pages-deploy-action@v4 diff --git a/docs/assets/templates/covers/front.html.j2 b/docs/assets/templates/covers/front.html.j2 index 1298293c..cfde1972 100644 --- a/docs/assets/templates/covers/front.html.j2 +++ b/docs/assets/templates/covers/front.html.j2 @@ -84,7 +84,9 @@
{{ config.site_name }}
- version {{ version }} + Version: {{ version }} +
+ Date: {{ build_date }}

Download the latest version on: https://docs.diy-trio.org

diff --git a/main.py b/main.py new file mode 100644 index 00000000..0c280edb --- /dev/null +++ b/main.py @@ -0,0 +1,5 @@ +from datetime import datetime + +def define_env(env): + # Define a macro that returns the current build date in UTC + env.variables['build_date'] = datetime.utcnow().strftime('%B %d, %Y') \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index b86929f9..8daf12ed 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -65,8 +65,7 @@ theme: plugins: - open-in-new-tab - - macros: - include_dir: . + - macros - exporter: formats: pdf: @@ -95,7 +94,7 @@ extra_css: extra_javascript: - assets/javascripts/mathjax.js - assets/javascripts/mkdocs-exporter.js - - https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js + - https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js - https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js # Customizations @@ -110,7 +109,7 @@ extra: - icon: fontawesome/brands/facebook link: https://www.facebook.com/groups/diytrio name: Trio on Facebook - version: 0.2.1 + version: 0.2.2 markdown_extensions: - admonition