如何使用 Hugo 创建所有文章的列表
Hugo 对每个名为 _index.md 的页面使用列表模板。
因此,要在 URL /blog 创建一个列出所有文章的页面(无论它们属于哪个类别),你需要做的就是创建 content/posts/_index.md,内容如下:
posts_index.md
---
title: "My blog"
url: /blog
---这里使用 url 是可选的,仅当你想为此页面使用自定义永久链接而不是 posts/index.html 时才需要。
Check out similar posts by category:
Hugo
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow