Up to Main Index                             Up to Journal for March, 2026

                     JOURNAL FOR SUNDAY 22ND MARCH, 2026
______________________________________________________________________________

SUBJECT: Having fun generating websites
   DATE: Sun 22 Mar 17:41:21 GMT 2026

For the past couple of weeks I’ve been spending my evenings working on my new
website generator. It’s been ages since I’ve been so engrossed in a project
and can’t wait to get back to coding each evening. However, in that time there
have been two near disasters :(

I’d been working on the CSS for ages, more than the code. I sort of liked what
I had but didn’t love it. I asked Lazhar, a friend with a background in web
design, if he would take a look and give me his opinion. I told him “if it’s
crap, say it’s crap”. I showed him what I had. He said something along the
lines of “It’s clean, professional looking and looks like every other website,
you’ve lost the site’s unique identity”, and indeed I had…

I knew exactly what I wanted for the website, which wasn’t what I’d created. I
threw out the CSS and started over, spending a week re-writing it. Finally I
showed Lazhar my second attempt. He liked it :) There were still a few ugly
bits, so I spent the next week tweaking…

Friday I showed Lazhar the tweaked version and he said I’d nailed it :) I’m
now very happy with the new look and feel. It looks and feels like the current
site but has new features that fit in well with the overall design.

Thank you Lazhar! I know you have been incredibly busy recently and appreciate
the time you spent reviewing the redesign.

Here are some rare (for this site) work-in-progress screenshots of the rebuild
for desktop and mobile. What do you think? diddymus@wolfmud.org


  ./desktop-main.png
  ./desktop-journal.png
  ./desktop-building-kubernetes-clusters.png
  ./desktop-building-kubernetes-clusters-pt2.png

  ./mobile-main.png
  ./mobile-journal.png
  ./mobile-building-kubernetes-clusters.png
  ./mobile-building-kubernetes-clusters-pt2.png


I’d also been working on the Makefile for the publishing pipeline. Slowly the
Makefile was becoming an unmaintainable maintenance nightmare :(

This was my second disaster I needed to avoid.

Again I threw away hours of work, out went the Makefile. I spent Wednesday
evening rewriting it as a bash script :) The helper scrips were merged into
it, leaving a single script.

So how does it work? How simple is it?

The bare minimal starting setup is:

  .
  |-- build.sh
  |-- public
  |-- src
  `-- template.html

You create some Markdown sources in the src directory. For example a main
index home page and an about page. This is our src/index.md file:


  Title:    Main Index
  Abstract: WolfMUD - World Of Living Fantasy
  Tags:     WolfMUD, Google Go, golang, go language, MUD, gomud, golang mud

  ==WolfMUD - Open source, multiplayer, networked, text adventure codebase==

  # World Of Living Fantasy MUD

  Welcome intrepid explorer — or programmer. If you came here looking for the
  previous incarnation of WolfMUD — the Java version — then please follow this
  beautifully hand crafted link made especially for you:
  [java-archive/index.html](/java-archive/index.html)

  If on the other hand you are more adventurous stay a while and read on. For
  WolfMUD is being reborn… it’s being written again, from scratch. This time
  in the Go programming language and released under the BSD 2-Clause license.


This is our src/about.md file:


  Title:    About this site
  Abstract: Why this site might look peculiar
  Tags:     about, site, text

  # About The Site

  First a big thank you. The font used for this site is Go Mono and was
  created by the Bigelow & Holmes[^1] type foundry specifically for the Go
  project. Amazingly this high quality set of fonts, produced by a type
  foundry, has been made available under the same open source license as Go
  itself.

  Sort and quick answer: WolfMUD is a text based game so a plain text website
  seemed appropriate.

  The much longer answer: Consider for a moment. If I added pretty background
  images, fancy highlighting, custom fonts, a funky colour scheme, JavaScript
  transitions and effects and then tracked your activity from here to kingdom
  come would it make this text any easier to read?

  __
  Diddymus

  [^1]: Bigelow & Holmes: https://bigelowandholmes.typepad.com
        Go Blog post: https://blog.golang.org/go-fonts


Our directories now look like this:

  .
  |-- build.sh
  |-- public
  |-- src
  |   |-- about.md
  |   `-- index.md
  `-- template.html

The script is then run as “./build.sh” or “VERBOSE=1 ./build.sh”:

  >VERBOSE=1 ./build.sh
  2026-03-22T15:22:44.117Z: Starting
  2026-03-22T15:22:44.127Z: Found 1 pages
  2026-03-22T15:22:44.136Z: Found 1 indexes
  2026-03-22T15:22:44.144Z: Found 0 assets
  2026-03-22T15:22:44.147Z: Generating meta-data
  2026-03-22T15:22:44.195Z:   src/about-site.md -> public/about-site.meta
  2026-03-22T15:22:44.234Z:   src/index.md -> public/index.meta
  2026-03-22T15:22:44.270Z: Checking for latest journal entry
  2026-03-22T15:22:44.314Z: Generating pages
  2026-03-22T15:22:44.360Z:   src/about-site.md -> public/about-site.html
  2026-03-22T15:22:44.379Z: Generating indexes
  2026-03-22T15:22:44.385Z:   src/index.md -> public/index.html
  2026-03-22T15:22:44.501Z: Copying assets
  2026-03-22T15:22:44.504Z: Finished.

The site is now built in the public directory with everything pre-compressed:

  .
  |-- bbox
  |-- build.sh
  |-- httpd.conf
  |-- public
  |   |-- about-site.html
  |   |-- about-site.html.gz
  |   |-- about-site.meta
  |   |-- index.html
  |   |-- index.html.gz
  |   `-- index.meta
  |-- src
  |   |-- about-site.md
  |   `-- index.md
  `-- template.html

Pages will have header and footer back links added to them automatically. The
indexes are special and will have a list of links to pages in the current
directory appended to them along with a list of links to indexes in the next
level of sub-directories. This is how the generated main index looks:


   WolfMUD - Open source, multiplayer, networked, text adventure codebase

                        World Of Living Fantasy MUD

  Welcome intrepid explorer — or programmer. If you came here looking for the
  previous incarnation of WolfMUD—the Java version—then please follow this
  beautifully hand crafted link made especially for you: java-archive/index.html

  If on the other hand you are more adventurous stay a while and read on. For
  WolfMUD is being reborn… it’s being written again, from scratch. This time
  in the Go programming language and released under the BSD 2-Clause license.

  ++ About this site
         Why this site might look peculiar


The about page looks like this:


   Up to Main Index                                           Up to Main Index

                                About The Site

   First a big thank you. The font used for this site is Go Mono and was
   created by the Bigelow & Holmes[1] type foundry specifically for the Go
   project. Amazingly this high quality set of fonts, produced by a type
   foundry, has been made available under the same open source license as Go
   itself.

   Sort and quick answer: WolfMUD is a text based game so a plain text website
   seemed appropriate.

   The much longer answer: Consider for a moment. If I added pretty background
   images, fancy highlighting, custom fonts, a funky colour scheme, JavaScript
   transitions and effects and then tracked your activity from here to kingdom
   come would it make this text any easier to read?

   __
   Diddymus
   ___________________________________________________________________________

     1. Bigelow & Holmes: [9]https://bigelowandholmes.typepad.com
        Go Blog post: [10]https://blog.golang.org/go-fonts ↩

   Up to Main Index                                           Up to Main Index


As changes are made to the site, running “./build.sh” only rebuilds what has
changed and any dependant indexes. This makes the site generator very fast.
You can rebuild everything. Either “rm -rf public/*” as the whole site can be
regenerated, or “FORCE=1 ./build.sh” which is probably safer…

At the moment I have only had to abuse one Markdown feature. That is the
highlight markup ==text== which I have repurposed to center text. Other than
that the site generator will have the normal Markdown features:

       - Headings             - Bold text           - Images
       - Paragraphs           - Italic text         - Unordered lists
       - Block quotes         - Superscripts        - Ordered lists
       - Code blocks          - Subscripts          - Definition lists
       - Inline code          - Strike-through      - Task lists
       - Tables               - Centered text       - Footnotes
       - Note call-outs       - Horizontal rules    - Smart typography
       - Warning call-outs    - Hyperlinks

If you want to know what my scripting abilities are like, I’ll leave you with
this from the site generator:


  log "Generating meta-data"
  for md in "${MD[@]}" "${GEN[@]}"; do
    meta=${md/#$SRC_DIR/$OUT_DIR}
    meta=${meta/%.md/.meta}

    if [[ ! -z "$FORCE" || "${md}" -nt "${meta}" ]]; then
      log_info "  ${md} -> ${meta}"
      mkdir -p "${meta%/*}"

      readarray -t tags < <(lowdown -L "${md}")
      unset metadata
      declare -A metadata
      for tag in "${tags[@]}"; do
        val=$(lowdown -X "$tag" "${md}" | xargs)
        metadata["$tag"]="$val"
      done
      # Magic, here be dragons ;)
      printf '%s\0' "${!metadata[@]}" "${metadata[@]}" |
      jq -Rs 'split("\u0000") | .[:-1] as $arr | ($arr | length / 2) as $half |
      reduce range($half) as $i ({}; .[$arr[$i]] = $arr[$i+$half])' > "${meta}"

    fi
  done


As well as ‘lowdown’[1] for Markdown processing, I use and abuse ‘jq’[2] a lot
in the generator to create, process and query JSON.

Indeed, here be dragons…

--
Diddymus

  [1] lowdown - simple markdown translator: https://kristaps.bsd.lv/lowdown/

  [2] jq — lightweight & flexible cli JSON processor: https://jqlang.org/


  Up to Main Index                             Up to Journal for March, 2026