PieCrust

Categories and tags

When you write a post you can specify a category and some tags to classify it. You can later list all the posts with a specific tag or in a given category using the special _tag and _category pages. Those pages are in the regular _content/pages folder and are just like any other page, except that when accessed from the correct address, the pagination data passed to them will only contain the appropriate posts.

The address at which you access tag or category listings is defined in the site configuration with the tag_url and category_url settings. For example, if you want tag “food” to be reached at http://domain.com/blog/tag/food, you could configure your site like this:

site:
    tag_url: blog/tag/%tag%

For the tag and category URL settings, the patterns %tag% and %category%, respectively, must be specified somewhere in the value.

The tag and category variables will be respectively exposed to the template system for the _tag and _category pages. The value is that of the tag or category being listed.

Fork me on GitHub