Skip to content

Commit

Permalink
Add html_baseurl support
Browse files Browse the repository at this point in the history
Note we might need to ensure the canonical URL link rel is being emitted
by the template.
  • Loading branch information
jonathansick committed Nov 9, 2022
1 parent 6bd538c commit 3f1bd7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/technote/sphinxconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"linkcheck_ignore",
# HTML
"html_context",
"html_baseurl",
]

_t = TechnoteSphinxConfig.find_and_load()
Expand Down Expand Up @@ -83,3 +84,8 @@
# ============================================================================

html_context: Dict[str, Any] = {"technote": _t.jinja_context}

if _t.toml.technote.canonical_url:
html_baseurl = str(_t.toml.technote.canonical_url)
else:
html_baseurl = ""

0 comments on commit 3f1bd7d

Please sign in to comment.