猫のBLOG

Notes, essays and marginalia

Notes

Writing a post in $EDITOR

blogctl new opens your editor on a file that looks like this:

Title: Writing a post in $EDITOR
Slug: writing-a-post-in-editor
Status: draft
Published:
Category: Notes
Tags: workflow, markdown
Author: The Editors
Summary:
Format: markdown

The body starts here.

Save, quit, and the post is in the database. Leave Summary empty and the first paragraph becomes the teaser on the front page. Leave Slug empty and one is made from the title, with umlauts folded and duplicates numbered.

The same format everywhere

CommandWhat it does
blogctl newopens a blank one
blogctl edit 12opens post 12
blogctl export 12writes it out as a file
blogctl import *.mdreads files back in

So a backup of the blog can be a directory of text files, and a draft written on a train is imported without ceremony.

Markdown, deliberately small

Headings, lists, quotes, fenced code, tables, links, images, bold and italic. One deliberate quirk: # becomes an <h2>, because the template already prints the title as the page's only <h1>.

Raw HTML passes through untouched, since the only person writing here is you.