By default, a PieCrust website has one unique blog or news feed, but you can have several separate ones if you need it. It works like this:
Define your blog names in the site configuration:
site: blogs: [ pro, family ]
Move your posts inside sub-directories named after each blog. So instead of having all your posts inside the
_content/postsfolder, you would have some posts under
_content/posts/pro, and other posts under
_content/posts/family, depending on which blog they belong to.
Note that the post URLs will always be prefixed with the blog name, so choose it accordingly. For example, you would get URLs like this:
If you have
_category.htmlspecial pages, move them to sub-directories named after each blog. So you would end up with
If you want to configure each blog differently, specify configuration settings in a section named after the blog in the site configuration. For example, here’s how you keep the same date format between your 2 blogs, but with a different number of posts per page:
site: blogs: [ pro, family ] date_format: 'F j, Y' pro: posts_per_page: 20 family: posts_per_page: 6
Settings that you can configure either at the
siteor blog level are:
date_format. The first 3 settings (URL formats) will be automatically prefixed with the blog name, as mentioned in the previous point. Note that the
posts_fssetting can’t be overriden — it would be confusing to have posts organized differently between blogs.
If you create a new page that lists posts (e.g. the main page, or the RSS feed page), you can specify what blog to take posts from with the
blogsetting in the page’s configuration header:
By default, all pages take posts from the first declared blog.