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.
|_ 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"
archive: true
blog-roll: true
tags: blog-tag1, blog-tag2
You should set both the archive value and the blog-roll value to what you want since the default is false for both and you won’t see your entries.
Post Settings Fields ¶
author ¶
String. The name of an author for all entries in the directory. This will take precedent over an author value in the markdown metadata.
archive ¶
Bool. Default false. If set to false then posts where won’t be collected for the “/archive” page. This way you can have a directory of posts that you don’t want to appear anywhere but the main roll for instance.
blog-roll ¶
Bool. Default false. If set to false the posts in this directory will be left out of the main site page generation. You can still have them crawled by referencing them because they are “live”, but they’re not in the main roll.
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.
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.
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.
tags: foo, bar