Site Structure
Default Site Structure ¶
You can create a default site with the “new” command, which will have the following basic structure:
|_ magnet
|_ images
|_ indices
|_ posts
|_ posts.yaml
|_ hello.md
|_ (...more posts and post directories)
|_ static
|_ temp
|_ themes
|_ propeller-2.0
|_ templates
|_ assets
|_ site.yaml
These are the default locations but can be overridden in the site.yaml.
Of particular note are the “images” and “static” directories, you may want to have these somewhere else entirely, for instance, if you have nginx serving from a www-data directory you’ve already setup.
But you should be able to begin right away by using the existing defaults.
Posts Structure ¶
The “posts” directory contains the markdown for posts.
The name of the directory “posts” here is arbitrary — it can be called anything as long as it is:
1.) a subdirectory of "magnet"
2.) has its own posts.yaml file inside of it.
There can be multiple “posts” directories. These are searched for recursively.
This allows for some organization of posts on your part and maybe some portability if you are using or collecting the markdown from other sources. For instance, a script that reads Instagram’s API and writes markdown files into a directory called “instaposts” or something. For instance:
|_ magnet
|_ images
|_ insta-posts
|_ posts.yaml
|_ (...various md files)
|_ my-blog
|_ posts.yaml
|_ (...various md files)
|_ my-topic
|_ posts.yaml
|_ (...various md files)
|_ joes-posts
|_ posts.yaml
|_ (...various md files)
|_ static
|_ themes
|_ indices
|_ site.yaml
Settings Structure ¶
Settings are kebab-case yaml. There are two type of settings files, “site.yaml” and “posts.yaml”.
See the Post Settings Field Reference for those yaml files.
See the Site Settings Field Reference for the primary site settings yaml.