Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Posts in the 'posts' directory but with type explicitly set to 'post' are not shown on the home page #863

Open
wouterla opened this issue Jan 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wouterla
Copy link

Describe the bug 描述你遇到的错误

Posts in the 'posts' directory but with type explicitly set to 'post' are not shown on the home page.

Expected behavior 期待的行为

All posts in the posts directory should show up, and any page with page type explicitly set to post should also show up.

Build Environment 构建环境

hugo v0.121.2+extended linux/amd64 BuildDate=unknown

Additional Information 补充信息

Changing the line in index.html from:

            {{- $pages := where .Site.RegularPages "Type" "posts" -}}

into:

            {{- $pages := where .Site.RegularPages "Type" "like" `post(.*)` -}}

Makes this work as I expect it to.

@wouterla wouterla added the bug Something isn't working label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant