-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Bug Report
Environment
Zola version: 0.21
Expected Behavior
-
changing
config.toml
should refresh css files defined byhighlight_themes_css
-
if a template reference the css files, it should generate the css files before the site build and
get_url
links check
Current Behavior
-
theme
attribute changes inhighlight_themes_css
are not reflected in azola serve
environment, the only way to trigger a refresh is by deleting those css files, changinghighlight_theme = "css"
to a theme name (which zola will then regenerate these 2 files) -
if we
zola build
orzola serve
a site with following config, and have a template linking to the filenames usingget_url
, automatic link checking will cause the build to fail with errors, quoted below:
highlight_theme = "css"
highlight_themes_css = [
{ theme = "two-dark", filename = "code-dark.css" },
{ theme = "solarized-light", filename = "code-light.css" },
]
{% if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %}
{% for theme in config.markdown.highlight_themes_css %}
{% if theme.filename is containing("dark") %}
{% set scheme = "dark" %}
{% else %}
{% set scheme = "light" %}
{% endif %}
<link rel="stylesheet" href="{{ get_url(path=theme.filename, cachebust=true) }}" media="(prefers-color-scheme: {{ scheme }})" />
{% endfor %}
{% endif %}
Error: Reason: Failed to render 'archive.html'
Error: Reason: Function call 'get_url' failed
Error: Reason: `get_url`: Could not find or open file code-dark.css
Step to reproduce
See above
Metadata
Metadata
Assignees
Labels
No labels