✨feat(config): add dynamic stylesheet loading via config.toml and page Metadata #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses issue #117. It adds a new feature that allows users to specify additional stylesheets in the
config.toml
and individual page metadata. This functionality adds flexibility for custom themes and individual post styling.PR #105 removed a simpler (and undocumented) implementation of this feature.
Changes
header.html
template.stylesheets
field toconfig.toml
andtheme.toml
.How to use:
Specify additional stylesheets in
config.toml
understylesheets
as an array. For a single file there's no need for an array.For individual pages, add stylesheets to the
[extra]
section in the front matter.Note: Since Zola processes
.sass
and.scss
files in thesass
folder into.css
files in thepublic
folder (see Zola docs), you should specify the processed.css
filenames in thestylesheets
field.For example, if you have a
.scss
file located atsass/extra.scss
, Zola will render it intopublic/extra.css
. You should then specifyextra.css
in thestylesheets
field like so: