shithub: docs.9front.org

Download patch

ref: 38da09469dc74c2f8b5890b3678e5de162542e85
parent: ed85c6c5f02a328ba8ceed18fe36432c59f1e03d
author: kvik <kvik@a-b.xyz>
date: Wed Jul 29 10:02:58 EDT 2020

Create a page describing the docs system implementation

--- /dev/null
+++ b/this.md
@@ -1,0 +1,73 @@
+About this
+==========
+
+Other than the git content repository—at the moment hosted on
+sourcehut—the docs system runs and is hosted by 9front software
+on a 9front machine.
+
+This page intends to document how this is done.
+
+The software
+------------
+
+Ori's [git9](https://github.com/oridb/git9) is used for
+pulling content updates from the repository.
+
+kvik's [ugh!](http://src.a-b.xyz/ugh) site generator
+renders the content, mainly the HTML pages.
+
+ugh! depends on [discount](https://github.com/Orca/discount)
+markdown processor by default.
+
+cinap's [tcp80](http://felloff.net/tcp80.tgz) which has been
+slightly [modified](http://src.a-b.xyz/tcp80) serves the web clients.
+
+kvik's [unionfs](http://src.a-b.xyz/unionfs) serves the 9p clients.
+
+The setup
+---------
+
+The rest is a glue provided through standard 9front mechanisms.
+
+### Starting off
+
+	; git/clone git://src.a-b.xyz/ugh /usr/doc
+	; git/clone https://git.sr.ht/~kvik/docs.9front.org /usr/doc/data
+	; mkdir /usr/web
+
+### Updates
+
+Checking for updates and triggering page regeneration is done by a
+custom script running once per minute.  This should move to cron.
+
+### Serving 9p
+
+9p clients are served by unionfs, spawned by system network listener.
+
+`/cfg/$sysname/service/tcp909`
+
+	#!/bin/rc
+	# Runs as 'none'.
+	exec /bin/unionfs -i /usr/doc/public
+
+### Serving HTTP
+
+Web clients are served by tcp80, spawned by system network listener.
+
+`/cfg/$sysname/service/tcp80`
+
+	#!/bin/rc
+	exec /bin/tcp80 -n /usr/doc/cfg/webns
+
+The namespace file `/usr/doc/cfg/` simply binds the `public/` directory
+to the web root:
+
+	bind /usr/doc/public /usr/web
+
+TODO
+----
+
+- Styling web pages for readability
+- Move updates to cron
+- Auto-linking
+- Auto-indexing