avatarBuilding this website (Legacy) 🌐

73; 12022 H.E.

NOTE
Everything below is the legacy version of the website that has been building up for good two to three years. On the night of March 13th, darkness took over sandyuraz.com, reducing average build time from 7-8s to <100ms. There will be a link to darkness on the home page. The legacy version can be accessed on a separate branch

I love typesetting tools. In my experience, I have used and written articles and papers using the following list of tools: LaTeX, groff, markdown, Org-Mode, asciidoctor, HTML, plain text. I had to decompress Word files and wrestle with raw XML files there, what a trip that was.

You might be interested in how this website is built. Basically, the whole of this website is a collection of Org Mode files, couple of sed scripts, some shell, and a master makefile. Makefile converts my raw org mode files into asciidoctor with pandoc, sed scripts modify the asciidoctor files, then asciidoctor binary is called to generate HTML, and another sed script to modify the generated files, like adding CSS and some custom meta tags.

The repository is hosted on Github. source branch is the one that contains all the source org files, on every commit push, a github workflow is triggered that runs everything above and deploys the generated website to master branch, where it triggers Github Pages to build the branch and deploy it here.

Below is a good flow graph of files and operations. Just to solidify the structure of the website, here is the source org file for this webpage.

          ───────────────
      ───/               \───
     /                       \
    (   Commit push triggers  )
     \     github workflow   /
      ───\               /───
          ────────/──────
                 /
       Makefile /
                β”‚
               /
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€o────┐     pandoc
  β”‚   org files    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
          β”‚                         β”‚
          β”‚                         β”‚
          β”‚ pandoc                  β”‚
          β”‚                         β”‚
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ asciidoctor files β”‚   β”‚   README.md files   β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚
            β”‚
             \ sed script
             β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€o─────────┐
   β”‚ modified asciid.  β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚
            β”‚
             \ asciidoctor
             β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€o─────────┐
   β”‚  generated HTML   β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚
            β”‚
           /  sed scripts
           β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€o───────────┐
   β”‚ pretty HTML files β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ─/
       ─/
     ──      ───────────────
       o────/               \────
       /      Push files to      \
      ( master and deploy to Pages)
       \                         /
        ────\               /────
             ───────────────

That’s the kind of workflow I have for my website. Whenever I do want to add a new page or update existing ones, all I have to do is edit org mode files, which are native to Emacs and push committed updates. That’s all the magic!

On a quick note, you were probably curious about the fortunes page. The simplicity of website updates allows some room for automation. Please meet astrie! My personal assistant for my website.

Astrie talks to me through Telegram, where I send her various commands, such as adding quotes and she patiently abides. I’m quite proud of her, as all we need for all that complexity is a ~100 loc Go package with a very small shell script that runs continuous git submodule updates and pushes.

In a bigger picture, I must say that I would love to be able to typeset beautiful documents and books like the ones below β—ΌοΈŽ