Closed welpo closed 6 months ago
I'm very sorry for the late reply. I created a new site to test this modification, and my steps are as follows: First, I divided the blog directory into blog, blog2, and blog3, and modified the path, title, and social_media_card values in the _index.md files of the latter two. Then I copied the social_card directories blog2 and blog3. Then I modified content/_index.md and changed section_path to section_path = [“blog/”,“blog2/”, “blog3”], but running zola serve will report an error:
Error: Reason: Failed to render 'section.html'
Error: Reason: Function call 'get_section' failed
Error: Reason: get_section
requires a path
argument with a string value
Summary
This PR introduces the capability to configure a multi-sourced archive page. Previously, the theme only supported archives from a single source (like
blog/
). Now, users can specify multiple sources in their configuration.Related issue
Resolves #245.
Changes
Modified the Tera template for archives to accept either a single source path or an array of source paths. In the archive page, users can configure:
For a single source path: Set
section_path = "your-path/"
to list posts from a specific directory. Make sure to include the trailing slash.For multiple source paths: If you want to aggregate posts from various directories,
section_path
can be specified as a list of paths. For example:Accessibility
No changes.
Type of change
Checklist
theme.toml
with a sane default for the featureconfig.toml
commentstheme.toml
comments