Skip to content

jxv/stagen

Repository files navigation

stagen

stagen is a command line static site generator. No code is needed to be compiled in order to generate a site. However, the ease comes at the cost of some customizability.

Pages are parsed from markdown and may include CSS and JS scripts.

If you're looking to create a no-frills blog using markdown and perhaps a few scripts, this is it.

Example

Check out the example blog.


Dates

The date of a post is parsed from the file's name.

It follows the format of: YYYY-MM-DD-rest-of-the-name.md

Title

The title shown for each page is parsed from the very first line of the file.

# The Title

The content.

The text The Title will be placed within the <title> tag inside the generated html file.

Archive

The archive is (often) the home page which lists dated posts in chronological order.

Feeds

The feeds are automatically generated as atom - atom.xml, json feed - feed.json and rss - rss.xml. As expected, only dated posts are inside the feeds.


Installation

From stackage

stack install stagen

From source

Download stack

stack build
stack install

Quick test if installed

Try

stagen

Should output this

Missing: COMMAND

Usage: stagen COMMAND