Quoting from here:
Several years ago, I began using Instiki to record RPG-related ideas, bits of constructed languages, and notional computer projects like these. The project went through multiple revisions, including a change of database and a port to Rails.
UPDATE: Since I wrote this, the new version runs on Ruby 3.x. However I still have to start up a whole new server, and edit only through the Wiki editor page.
“Statiki” mimics a wiki, but with statically generated HTML pages I can browse directly.
To summarize:
-
A command line tool creates new pages from a template, similar to “
hugo new
path”. The pages are files in a directory under version control consisting of a “front matter” section and a text area. -
I edit the page front matter and text to my satisfaction. The front matter includes a title, a creation date, a last modification date, and a list of tags, categories, etc. The text section may include the following:
- Markdown, including tables, footnotes, and other extensions.
- References to other pages as
[[
page title]]
.
-
The tool formats the Markdown+Wiki page into an HTML page:
- A configurable template provides all the elements of a complete page, including a TITLE and CSS stylesheets.
- The template generates a table of contents.
- Markdown becomes HTML, just like hugo.
[[
title]]
elements become hyperlinks to the page with the given title.- (Optional) The “last edited” (
lastmod
?) date updates automatically. - (Optional) Short files under a directory with a specially configured index page get concatenated into single, long files with headers and internal links. E.g. glossary terms, RPG spells, monster manual entries.
- (Optional) Files under a directory with a specially configured index page and ordering information in each file’s front matter get automatic “previous”, “next”, and “up” links, much like GNU Info pages or “sphinx” documentation.
-
The tool also integrates the page with other pages.
- An index of all pages.
- A list of pages by tag or category.
- A map between pages and all pages that refer to them.
- A map between pages and all pages to which they refer.
- A list of orphaned pages.
-
All pages are browsable as static pages with relative links or through a lightweight page server. (Again, like hugo.)
I’ve been toying with a hugo project and instance, and the features I miss most are Wiki Words and an ability to concatenate very short files into a longer page with internal links. (One project is a space opera setting and three pages are just a list of planets, a list of species, and a list of technologies including starships.)
The algorithm for step #3 & #4 might go like this:
- Traverse one or more directories, building a map of page titles to page content.
- Render each page, replacing a WikiWord or name in
[[
…]]
with a relative URL to the destination page.- Write index pages for all pages in a ‘statiki’ and for each category found.
Possible markdown engines include:
Markdown | Language | Comments |
---|---|---|
discount | C | |
goldmark | Go | Same processor as hugo |
lua-discount | Lua | Depends on discount |
Python-Markdown | Python | |
kramdown | Ruby |