Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top