welpo / tabi

A modern Zola theme with search, multilingual support, optional JavaScript, a perfect Lighthouse score, and a focus on accessibility.
https://welpo.github.io/tabi/
MIT License
97 stars 32 forks source link

✨ feat(archive): allow multiple sources in Archive #249

Closed welpo closed 6 months ago

welpo commented 6 months ago

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:

Accessibility

No changes.

Type of change


Checklist

ziyouwa commented 5 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