💾 Archived View for zvava.org › wiki › about-site.gmi captured on 2023-07-10 at 13:07:43. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
created 2023/06/01 modified 2023/07/06 category info
about this website and how it is constructed
to have as few moving parts as possible, this website is generated every time it is updated by a static site generator. basically, all the files in the repository like article files and layout templates get built into a final 'output' which can then be simply copied to a static file server. the advantages over the modern web app paradigm are numerous, but the most important imo come down to being a simple & robust solution that at the same time has a lot of personality and can be crawled and archived no problem
the server itself is a lowest-tier vps from racknerd.com running caddy (for http/https) and agate (for gemini)
there is also an ethical view counting api (and potentially other services now or later) that can be access through the zvava.org domain via ssl with the rest of the website thanks to the use of caddy's wonderful reverse proxy functionality
there is a wiki.js file which contains several tools for wiki contributors, it has documentation built into the command but it is also available here
the generator script (make.js) is located at the root directory and requires a unix system to run as quickjs does not support executing arbitrary commands on windows. this script crunches all the data, formats everything nicely, and outputs static files that can be served all in few hundred lines of vanilla javascript (356 as of 23/07/06)
. ensure quickjs is running on a *nix system
· create or clean output directory
· read and cache all templates
· read and cache all wiki pages
· after, store metadata in cache too
· create cache of used layout templates
· generate all final gemtext
· create cache of used embed templates
· translate all final gemtext into html
· replace gemini-only content with html-only content
· generate all final html
· generate an .ass feed for both protocols
./ out/ is the static output for static files to be served gemini/ gemtext build www/ html build scripts/ os-specific tasks publish.* ssh to zvava.org and run build script src/ images/ centralized place for all visual assets a/ art m/ music t/ thumbnails misc/ miscellaneous screenshots/ templates/ a bunch of layouts (gemtext and html) used by the gen. script filter.html html/css-only filter for wiki page head.html html <head> template and open <body> wrap index.gmi index page textual layout stats.gmi statistics page textual layout stats.html statistics page views table embed viewcounter.html silent viewcounter embed wiki-index.gmi index page of wiki textual layout wiki-page.gmi textual layout of individual article wiki-viewcounter.html viewcounter show views under dates embed wiki/ contains a bunch of articles on random topics in gemtext format make.js generator script wiki.js wiki utility script