문제

I just started with nanoc. I am wondering if someone can explain me how I should create blog posts and how to add them in the feed?

I know how to create items, but how do I create posts in the blog folder? Also how to show the 5 most recent posts?

도움이 되었습니까?

해결책

Blog posts are just like other items, and it’s up to you to decide how you want them to be identified. Some people like using “kind: article” while other people prefer to stick them in a content/blog/ directory.

nanoc comes with a Blogging helper. Take a look at the #atom_feed method, which can be used for generating an Atom feed. This method takes an :articles parameter containing a list of articles (by default, it will take the items with “kind: article”). This way, you can create a feed for a specific collection of items.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top