0

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?

unor
  • 92,415
  • 26
  • 211
  • 360
shayonj
  • 900
  • 9
  • 14

1 Answers1

1

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.

Denis Defreyne
  • 2,213
  • 15
  • 18