馃彙 go home...
馃摎 go back...

about

thumbnail

created  2023/06/01
modified 2024/01/09
category info

about this website and how it is constructed

馃殌 view gemini version

dependencies

馃崙 actually simple syndication
馃寣 the gemini protocol
馃捒 bellard quickjs
馃М viewcounter
馃捄 lazy browsing mode

history

archiving - 2024
refresh - 2023
archiving
rewrite - 2022
begin wiki - 2021
rewrite
archiving
redesign - 2020

architecture

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

server

zvavnet itself is runs on the cheapest vps known to man, the 23$/yr lowest-tier vps from racknerd.com, equivalent specs to a raspberry pi zero but the single vcore on the vps is faster. it is running caddy (for http/https) and agate (for gemini)

there is also my 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

Caddy
Agate
馃М ethical view counting api

wiki utility script

TODO: rewrite wiki utility script in wren

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
wiki.js usage instructions

generator script

TODO: rewrite generator script in wren

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)

main entry point

. ensure quickjs is running on a *nix system
路 create or clean output directory

fetchTemplates

路 read and cache all templates

fetchWiki

路 read and cache all wiki pages
路 after, store metadata in cache too

generateGemini

路 create cache of used layout templates
路 generate all final gemtext

generateHTML

路 create cache of used embed templates
路 translate all final gemtext into html
路 replace gemini-only content with html-only content
路 generate all final html

generateAss

路 generate an .ass feed for both protocols

directory tree

./
  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  template and open  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