Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💚 Fix CI: PDF Generation Error #98

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion docs/assets/templates/covers/front.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@
<section>
<div class="brand">{{ config.site_name }}</div>
<div class="version">
version {{ version }}
Version: {{ version }}
<br />
Date: {{ build_date }}
<p>
Download the latest version on: https://docs.diy-trio.org
</p>
Expand Down
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -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')
7 changes: 3 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ theme:

plugins:
- open-in-new-tab
- macros:
include_dir: .
- macros
ebouchut marked this conversation as resolved.
Show resolved Hide resolved
- exporter:
formats:
pdf:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down