A static wiki engine
Go to file
eli 67fdb8b338 testing using couchdb 2019-08-30 15:38:52 -04:00
src TOOOO MUCH LINE HEIGHT 2019-08-29 14:42:47 -04:00
.env.dev testing using couchdb 2019-08-30 15:38:52 -04:00
.env.prod testing using couchdb 2019-08-30 15:38:52 -04:00
.gitignore adding an .env file to repo 2019-08-05 22:04:10 -04:00
README.md the most minor of typos' 2019-08-26 22:57:38 -04:00
index.html made the search UI sort of modal 2019-08-07 21:24:07 -04:00
netlify.toml adding a netlify toml to help build process 2019-08-05 22:10:13 -04:00
package.json added search functionality: 2019-08-06 20:57:11 -04:00

README.md

wiki

A static wiki engine.

A quick note to start: this documentation is still a bit of a work in process.


What is this thing?

This is a very simple static wiki engine. Data is fed to it, and it turns that data into a navigable, hierarchical website.

I set out to make somethine as light-weight, yet fully features as possible.

How can I use it?

The data is sourced (currently) from a static json file. Here is a quick description of the format of that file.

{
	"title": "Wiki Title",
	"pages": [
		{
			"parentPage": null,
			"slug": "welcome",
			"title": "The first page",
			"body": "# Welcome \nThis is the first page of the wiki."
		},
		{
			"parentPage": "welcome",
			"slug": "childPage",
			"title": "The first page's child",
			"body": "# I am a child \nThis is the first page's child."
		}
	]
}

At the moment, the specification for the feeding data is wicked lightweight. In the future some more features may be added, but for the time being what is in place works pretty well.

  • parentPage -- either null or a reference to another page's slug.
  • slug -- this will become the url for the entry
  • title -- the entry's title
  • body -- the content of the page in markdown

How can I install use this thing?

I would like the instalation story to be prettier down the road.

For now, there are 2 .env variables that need to be configured before the site is deployed.

The 2 variables are ROOT_URL and DATABASE_URL.

  • ROOT_URL describes the base url of the wiki, e.g. https://wiki.eli.li
  • DATABASE_URL describes the location of the json database

This repo includes 2 .env files, one for staging and one for production. In the future I hope to be able to remove the staging specific one, maybe, but at the moment the router used here requires pretty explicit direction.

After configuring the .env variables run the following command to build the site.

yarn run build

This command will create a new directory named /dist. Deploy this to your host.

What is next for this thing?

There are a number of items that I would like to clean up here, namely:

  • Installation
  • Offline support
  • Completely static fall-back (no need for JS)

I also hope to port the static wiki engine to a number of languages in the future.

The major missing piece right now is the ability to add/edit content on the fly, without manually editing a json file.