Skip to content

Commit

Permalink
Add back fit px
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Aug 8, 2024
1 parent a490a5b commit 661f90c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- pandoc
- graphviz
envs: |
- linux: py312-sphinx78
- linux: py312-sphinx8
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -59,7 +59,7 @@ jobs:
envs: |
- macos: py311-sphinx7
- windows: py310-sphinx7
- linux: py310-sphinx6
- linux: py39-sphinx6
- linux: py312-devdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
9 changes: 8 additions & 1 deletion src/ablog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pathlib import PurePath

from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.errors import ThemeError
from sphinx.jinja2glue import BuiltinTemplateLoader, SphinxFileSystemLoader
from sphinx.locale import get_translation

Expand Down Expand Up @@ -126,7 +127,13 @@ def builder_inited(app):
theme = app.builder.theme
loaders = app.builder.templates.loaders
templatepathlen = app.builder.templates.templatepathlen
if theme.get_config("ablog", "inject_templates_after_theme", False):
try:
# Modern Sphinx now errors instead of returning the default if there is not a value
# in any of the config files.
after_theme = theme.get_config("ablog", "inject_templates_after_theme", False)
except ThemeError:
after_theme = False
if after_theme:
# Inject *after* the user templates and the theme templates,
# allowing themes to override the templates provided by this
# extension while those templates still serve as a fallback.
Expand Down

0 comments on commit 661f90c

Please sign in to comment.