Skip to content

Commit

Permalink
Added babel file, readme and license info.
Browse files Browse the repository at this point in the history
  • Loading branch information
dom96 committed Aug 18, 2013
1 parent ecad192 commit c486925
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ipsum.babel
@@ -0,0 +1,8 @@
[Package]
name = "ipsumgenera"
version = "0.1.0"
author = "Dominik Picheta"
description = "A static blog generator."
license = "MIT"

bin = "ipsum"
3 changes: 3 additions & 0 deletions ipsum.nim
@@ -1,3 +1,6 @@
# Copyright (C) 2013 Dominik Picheta
# Licensed under MIT license.

import os, times, strutils, algorithm, strtabs, parseutils

import src/metadata, src/rstrender
Expand Down
46 changes: 46 additions & 0 deletions readme.md
@@ -0,0 +1,46 @@
# ipsum genera

*ipsum genera* is a static blog generator written in Nimrod. It's something
I hacked together in a couple of days so you're mostly on your own for now if
you wish to use it. Of course, I love the name *ipsum genera* so much that I
may just be willing to make this more user friendly.

## Quick manual

```
git clone https://github.com/dom96/ipsumgenera
cd ipsumgenera
babel install
mkdir articles
mkdir layouts
```

Put articles in the 'articles' folder with metadata similar to jekyll's:
```
---
title: "GTK+: I love GTK and here is why."
date: 2013-08-18 23:03
tags: [Nimrod, GTK]
---
```

Save the article as: ``2013-08-18-gtk-plus-i-love-gtk-and-here-is-why.rst``,
or something else, the filename doesn't really matter, *ipsum* does not care.

You then need to create some layouts and put them into the layouts folder.
Two for now: article.html and default.html. This is simply an html template,
*ipsum* will replace a couple of specific strings in the html template when
it's generating your blog. The format of these strings is ${key}, and the
supported keys are:

* ``${body}`` -- In default.html this is the article list, in article.html
this will be the actual article text.
* ``${title}`` -- Article title, article.html **only**.
* ``${date}`` -- Article date, article.html **only**.
* ``${prefix}`` -- The path to the root in article.html **only**.

Once you're done with the setup, simply execute ``ipsum``.

## License

MIT

0 comments on commit c486925

Please sign in to comment.