Aardi
Aardi is a static site generator.
It is a Ruby gem that provides a number of rake tasks for rendering markdown files into html pags.
Getting started
-
Create a Gemfile:
source "https://rubygems.org" gem "aardi" -
Create a Rakefile:
require "bundler/setup" Bundler.require(:default) require "aardi/tasks" -
Initialize the site:
rake init -
Edit config.yml and .template.html to suit your needs.
-
Create .md files where you want .html files to appear.
-
Tun
rake renderto generate the site. -
Run
rake -Tto see available commands.
Details
- There is no CLI but
rake. The rake tasks are:- General commands:
-
rake initscaffolds a new aardi site. -
rake renderrenders all the files (unless nothing has changed) -
rake serverruns a local preview server -
rake homepagevisit the published site
-
- Blog commands:
-
rake newcreates a new empty blog post and reports the path -
rake recentlists recent blog post dates, source paths, and titles
-
- Utility commands:
-
rake nowproduces an Updated header with current timestamp, for use in blog post metadata -
rake fixtimesfixes the timestamps of files based on the latestgitmodification timestamp.
-
- General commands:
- All .md files will be rendered to .html files in the same directory, except:
- Anything in the
files_to_excludeconfig. - Blog post files are rendered into the blog hierarchy as posts on the creation date, and as content within day and month pages.
-
Note: list the blog path and posts path in
files_to_excludeto prevent them being rendered in place as well. This is in the default config.yml.
-
Note: list the blog path and posts path in
- Anything in the
- The title of the page is extracted from the first line of the .md file content. You can override this with a Title: directive in the metadata.
- Pages can have metadata, which is a key-value block followed by an empty line and then
----on a line by itself. See the results ofrake newfor a basic example. Useful keywords there are:-
Creation:The creation date and time for a blog posts. -
Updated:The updated date and time for a blog post. You can get this information easily withrake now. -
Title:The page title, overriding what was in the first line of the content. -
Description:The page description, for the HTML<meta name="description" ...block.
-
Contributing
- Details TBD, but PRs will be considered if I have the time.
- I prioritize simplicity, performance, and a highly conservative approach to runtime dependencies.