nini is the new ni
fix error with anchor
update link regexp
is that the v1? it seems like!


browse  log 



You can also use your local clone with git send-email.


nini is a static wiki generator. It generates pages that include backlinks to other pages.


With Go installed, you can build from the source with:

go build .

#How to use

nini input output template.htm


  • input: folder containing all your content, written in .htm
  • output: destination folder that will contain the final built site
  • template.htm: html template file

#Getting started

Now that you've installed nini, let's use it to build a very simple site that talks about coffee. Here's a recommended folder structure, but feel free to change it:

├── src/
└── public/

The src folder is where we will add all our pages. We write them in HTML, and use the .htm extension to tell them apart from the generated pages that live in public.

Let's create index.htm in the src folder:

<p>A popular machine is the <a href="aeropress.html">aeropress<a></p>

As you can see, we've added a link to the aeropress page. However, for this to work, we need to have an aeropress.htm page in the src folder. Let's create it:

<p>Created by Alan Adler.</p>

In order to have nini generate our pages in public, we first need to tell it how. For that, we use a template files: template.htm

├── src/
│   ├── index.htm
│   └── aeropress.htm
├── public/
└── template.htm

template.htm is the template used to build all our pages. Feel free to make it look good and add CSS. Here's an example:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>{{ .Title }}</title>
    <link rel="stylesheet" href="/wiki.css">
    <link rel="alternate" type="application/atom+xml" href="http://m15o.ichi.city/feed.xml" />
<nav><a href="home.html">home</a> <a href="journal.html">journal</a> <a href="projects.html">projects</a> <a href="about.html">about</a> <a href="contact.html">contact</a> <a href="/feed.atom">feed</a></nav>
    {{ .Content }}
    {{ if .Backlinks }}<p><b>backlinks</b>: {{ range .Backlinks }}<a href="{{ .Href }}">{{ .Name }}</a> {{ end }}</p>{{ end }}

Now that we've got everything, we can run:

nini src/ public/ page.htm atom.xml