Post Settings

Posts Settings Field Reference

For every directory within the root of a magnet site (or specified by the “posts-root-dir” setting) that contains a “posts.yaml” file, the markdown found there will be added to the site index. The settings are not cumulative, so that children directories do not inherit their parent directories posts.yaml.

|_ magnet
    |_ site.yaml <-this is the site settings file
    |_ posts
        posts.yaml <- this is a posts settings file
        a-post.md  <- a markdown post entry
        |_ blog-one
            |_ my-post.md <- a markdown post entry
            |_ posts.yaml <-this is a posts settings file
        |_ blog-two
            |_ oh-just-one-more-thing.md <- a markdown post entry
            |_ posts.yaml <-this is a posts settings file

Example posts.yaml

---
name: "my super blog"
skip-archive: false
skip-blog-roll: false
tags: ["My Blog", "Rocks Are Nice"]

Setting “skip-archive” keeps posts from showing up on the archive page. Setting “skip-blog-roll” keeps posts from showing up on the main blog-roll. The default is false.

Post Settings Fields

authors

List. A list of author names for every post in the directory. These will be added to whatever authors are set in individual posts.

expires-days

Int. If set to 1 or greater, the posts in this directory will expire in N days from their Publish date.

name

String. REQUIRED. An identifier in the file that tells magnet this directory contains posts, the name can be arbitrary. This is the only required value.

skip-archive

Bool. Default false. If set to true then posts in the directory don’t appear on the archive page.

skip-blog-roll

Bool. Default false. If set to true then posts in the directory don’t appear on the blog roll.

style

String. If set then the Style markdown meta data for all posts in this directory will have that style string available for templating, to alter with CSS for instance, as “Post.Style”.

tags

String. Just like you would use in markdown in the metadata for a post, tags added here will be applied to all the posts in the directory on indexing in addition to whatever tags are set in the post itself.

tags: [foo, bar]