Pages that are not posts
Even a basic blog needs some non-post pages (an about page, perhaps a privacy policy). Or we could use Mismiy to generate arbitrary documentation hierarchies, with the blog posts being just a little feature on the side.
Not-post pages can be read from a directory the same as posts. The only real difference is whether they are included in the index page’s reverse chronological order and the atom feed. In fact posts are just a special kind of page.
The new plan is as follows: first, there can be more than
one source of pages, each a directory containing .markdown
files.
So we might have directories named posts
and pages
. These
get merged together on the generated site, so they better use
non-overlapping file names. This is easy if post files always start with the date.
Second, sources have an property named kind that is either page
(the default), or post
. The kind property might be set explicitly in in the
META.yaml
file, but failing that, the posts
directory will have kind
post
, and any other will be page
.
The kind of page controls the templates used for rendering pages
(post.html.mustache
versus page.html.mustache
). The index template
will need to link to both kinds of content, but for a first version it
is probably OK to hard-code links in to the template for index.html
. In Markdown
normal relative links will work, so we can write
Blah blah link to [about] blah
[about]: about.html
And get something like
Blah blah link to about blah
Feed files will be created for post
sources. For now we assume there will be
a single feed even if there is more than one post source. We can work out how
to do multi-feed sites when we find we have a need for one.