No description
Find a file
2021-02-20 10:50:30 +00:00
docs frag jekyll docs (what was I thinking) 2019-08-26 16:26:38 +01:00
src fix micro blog text length calc (remove links so the length is closer to reality) 2021-02-20 10:50:30 +00:00
test regenerate test site 2020-09-22 23:10:05 +01:00
.gitignore initial attempt at notebook style output (i.e. embedding python code in static pages) 2019-11-10 23:54:57 +00:00
baker.nimble fix micro blog text length calc (remove links so the length is closer to reality) 2021-02-20 10:50:30 +00:00
CHANGELOG add combined json feed 2020-02-16 10:48:16 +00:00
LICENSE add license file 2019-07-25 20:32:26 +12:00
Makefile fix for ' ' not being replaced with <br /> 2020-09-19 13:15:58 +01:00
README.md add combined json feed 2020-02-16 10:48:16 +00:00

baker

Baker is a simple static site generator written with nim, the proton template engine for templating, and markdown for content.

Features

  • Static site generation (obviously)
  • Generate site from a Makefile (See the test site for an example)
  • Create blog or microblog posts
  • Resource compression (css, jpg)
  • Generate index pages (i.e. an index of blog or microblog - effectively multiple posts per page)
  • RSS generation
  • JSON feed generation
  • Sitemap generation
  • Tag pages (like index pages, with multiple posts per page, but by tag)
  • Federate posts to the fediverse via webmention (through sites such as fed.brid.gy)
  • Jupyter-style code execution in pages (basic support at the moment, see here for an example)

Quick Start

Install Baker using the following command:

    nimble install baker

Create the skeleton of a new site by running the following:

    baker init mysite

A new directory (mysite) is created, containing a basic directory structure, and templates.

Create a new blog entry, by running the blog command:

    baker blog This is a test post title

Create a microblog entry by running:

    baker micro

Enter the text for your microblog post and hit enter twice to end the editing process.

Generate the html files for your site (including sitemap, rss feed, etc) using make (for newly changed files), or make force (to regenerate everything).

Current command-line:

Baker. Command line static website generator.

Usage:
  baker blog <title> [--taglist <tags>]
  baker compress [--force]
  baker federate <targeturl> <directory> [--days <days>]
  baker generate [--file <filename>] [--force]
  baker header --file <filename> [<header>] [--set <newvalue>]
  baker indexes [--posts <num>] <directory>
  baker dump <filename>
  baker init [<dir>]
  baker jsonfeed <directory> [--combined]
  baker micro [--ignoremaxlength] [-]
  baker rss <directory>
  baker sitemap
  baker testserver [--port <port>]
  baker tags

Options:
  -h --help           Show this screen.
  --days              Number of days to federate (new posts only) [default: 1].
  --file              Generate a specific file.
  --force             Force re-generation, not just new files.
  --ignoremaxlength   Ignore the max length for a micro blog and generate anyway.
  --tags              Comma-separate list of tags, used for blog entries.
  --version           Show the version.
  --posts <posts>     Posts per index page [default: 10].
  --port <port>       Port to use with the testserver [default: 8000].
  --taglist <tags>    Comma separated list of tags [default: ""]

Available commands:
  blog                Generate a blog entry with the given title (and optionally tags).
  federate            Federate new posts (within a number of days) to the given target url using webmention.
  compress            Compress resource files (css, jpg).
  generate            Generate/render a file, or if no arguments given, all files with recent changes.
  indexes             Create the index pages for posts in a given directory.
  dump                Dump detail about a page .text file (for debugging purposes, mostly).
  init                Setup a directory to use with baker.
  jsonfeed            Generate a json feed file for the given directory.
  micro               Generate a microblog entry (reads from standard-input, two newlines finishes entry).
  rss                 Generate an RSS feed file for the given directory.
  sitemap             Generate the sitemap.xml file in the root directory.
  tags                Generate the tag cloud directory.
  testserver          Run a bare-bones webserver, for testing the generated files.