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
124 stars 38 forks source link

About multi sources in Archive #251

Closed ziyouwa closed 10 months ago

ziyouwa commented 10 months ago

I'm very sorry for the late reply. About #249, 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

welpo commented 10 months ago

The section_path should be changed only for the content/archive/_index.md file:

+++
title = "Archive"
template = "archive.html"

[extra]
section_path = ["blog/", "notes/", "path-three/"]
+++

If this still doesn't help, can you create a repository where I can see your setup?

ziyouwa commented 10 months ago

It's OK! Thank you very much!

ziyouwa commented 10 months ago

2024 was placed before 2023, 2022, and 2021 when archiving. I don't know how to fixed it, pls help me.

welpo commented 10 months ago

This is expected. In blog pages, the archive section is typically rendered in a "newest to oldest" order. This design choice aligns with the general user expectation to access the most recent content first. Readers are often more interested in the latest posts, as they tend to be more relevant to current events or recent developments.

welpo commented 10 months ago

Would you like a chronological order Archive? That is, oldest to newest posts?

ziyouwa commented 10 months ago

Sorry for my english. The order is 2023, 2022, 2021, 2024. 2024 is last. This is a problem.

welpo commented 10 months ago

Understood! I've replicated the issue. Fixing it now.

welpo commented 10 months ago

Please let me know if the latest commit (2c8a21d558f5f6b3a208a3caf9a88b01c92ca0e1) fixes it.

Thanks for reporting the bug!

ziyouwa commented 10 months ago

It's perfect! Thank you very much!