https://github.com/evuez/kiwi
A (dirty) Haskell blog generator
https://github.com/evuez/kiwi
hacktoberfest markdown static-site-generator
Last synced: 16 days ago
JSON representation
A (dirty) Haskell blog generator
- Host: GitHub
- URL: https://github.com/evuez/kiwi
- Owner: evuez
- License: bsd-3-clause
- Created: 2020-10-23T11:15:32.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-23T13:07:56.000Z (over 5 years ago)
- Last Synced: 2024-10-19T17:30:23.906Z (over 1 year ago)
- Topics: hacktoberfest, markdown, static-site-generator
- Language: Haskell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# kiwi
A (dirty) Haskell blog generator.
I'm using this for my [own site](https://liftm.io/) (repo here: https://github.com/evuez/evuez.github.io).
Setting it up is pretty simple, install it with `stack install`, then create a `kiwi.toml` file:
```toml
[templates]
index = "templates/index.html"
pages = "templates/page.html"
[[source]]
name = "Posts"
path = "posts"
[[source]]
name = "Projects"
path = "projects"
```
The `index` template is used to generate the... index of the site, and `pages` is used for any other page. These use [mustache](https://mustache.github.io/). Templates examples are available here: https://github.com/evuez/evuez.github.io/tree/main/templates
Each `source` must have a `path` matching an existing directory where the markdown files for this source live. Here, we would have the following directory structure:
```
kiwi.toml
templates
index.html
page.html
posts
post-1.md
...
projects
project-1.md
...
```
Finally, each markdown file must include metadata:
- A `title` (required)
- A `date` (optional)
- A list of `tags` (optional)
Metadata are written in [TOML](https://toml.io/) and must be at the top of the file. A line containing only `%%%` is used to separate the metadata from the actual contents. See https://raw.githubusercontent.com/evuez/evuez.github.io/main/posts/currying.md for an example.