dillonzq / LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://hugoloveit.com
MIT License
3.38k stars 1.07k forks source link

post_meta, post_footer, and table of contents not rendered when a post is created outside of the content/posts/ folder #717

Closed JustinQHu closed 2 years ago

JustinQHu commented 2 years ago

Describe the bug 描述你遇到的错误

post_meta, post_footer, and table of contents not rendered when a post is created not in the content/posts/ folder.

A clear and concise description of what the bug is. 一段简短的对于你遇到的错误的描述.

post_meta, post_footer, and table of contents show properly when a post in inside content/posts/ folder.

  1. /posts/frist_post/

image

  1. /se/test/.

image

As shown above, the content is valid, but post_meta, post_footer, and table of contents are not rendered.

Expected behavior 期待的行为

A clear and concise description of what you expected to happen. 一段简短的对于你期待的行为的描述.

Screenshots 屏幕截图

If applicable, add screenshots to help explain your problem. 如果可以的话, 提供屏幕截图对解决问题很有帮助.

Build Environment 构建环境

Additional Information 补充信息

I am using sample configuration from https://hugoloveit.com/theme-documentation-basics/ for testing purpose.

Hugo and the theme is quite new to me, but I definitely love the theme. Good job!

Can anyone tell me how to make articles in other folders other than /content/posts/ rendered correctly?

JustinQHu commented 2 years ago

solved by enable type for new sections(force new sections to use type 'posts') in _index.md: cascade: type: posts type: _default