From b971b5905b38be19b4fa4e7d99a70df0aebfba28 Mon Sep 17 00:00:00 2001 From: dadada Date: Sun, 28 Apr 2024 20:13:33 +0200 Subject: [PATCH] Added blog/about --- blog/about/index.html | 91 +++++++++++++++++++++++++++++++++++++++++++ feed.xml | 7 ++++ index.html | 1 + 3 files changed, 99 insertions(+) create mode 100644 blog/about/index.html diff --git a/blog/about/index.html b/blog/about/index.html new file mode 100644 index 0000000..794fa4c --- /dev/null +++ b/blog/about/index.html @@ -0,0 +1,91 @@ + + + + + About this web page + + + +
+ +
+
+

About this web page

+

+ This an explanation (or justification?) of how this page is created. The + takeaway is that every page is a single HTML file and no templating is + involved. +

+

Creating a page

+
    +
  1. + Copy index.html to page-name/index.html +
  2. +
  3. Update title in head
  4. +
  5. Write HTML contents to body
  6. +
  7. + Update feed.xml. UUIDs can be inserted by calling + uuidgen from the editor and inserting the resulting UUID +
  8. +
+

Why write HTML by hand?!

+

Reproducibility

+

+ HTML is pretty consistently displayed across most modern web-browsers, + while multiple templating engines and markdown parsers are not always as + consistent in their interpretation of markdown, and the details of how + they render markdown may change over time. +

+

Debugging

+

+ The feedback when editing the HTML files is immediate without an + intermediate compilation step that may break when there is an issue with + some template or the templating engine. Since web browsers are quite + lenient in what they accept, even minor problems in the HTML will still + at least partially display the page while it is beeing edited. Developer + tools of modern web browsers provide extensive feedback about errors in + the HTML, making it easy to debug the draft. At the same time, errors in + the templates and the templating engine may lead to arbitrarily complex + bugs. +

+

Future-Proofing

+

+ I like to avoid external dependencies if the benefit from using them is + not significant or easily acchievable otherwise. Static site generators + include markdown parsers and templating engines which have a lot of + external dependencies. +

+

Duplicate State

+

+ A problem with single-file HTML pages is that there are multiple copies + of the same data, such as the page-style and the URL to the feed. This + is solved by having very few such data, so it is less likely to change, + and updating it can be done with reasonable effort through + search-and-replace. +

+

Unreadable HTML

+

+ Editing HTML by hand bears the risk that the HTML contains errors or the + formatting is inconsistent. Formatters like prettier can be + used to check the HTML and reformat it. The diff can be easily inspected + to check for inconsistencies between the initial HTML and the formatted + HTML. +

+
+ + + diff --git a/feed.xml b/feed.xml index c9b3d48..0650aac 100644 --- a/feed.xml +++ b/feed.xml @@ -7,6 +7,13 @@ Tim Schubert urn:uuid:aebe0d6d-40d7-46f5-8ad7-5ad5b60e9c57 + + About this web page + + urn:uuid:0f4e27c5-bef2-4691-b8a8-2cbc0f593c8f + 2024-04-28 + About this web page + NixOS for Lazy Admins diff --git a/index.html b/index.html index 6bfb95f..0e4d2ae 100644 --- a/index.html +++ b/index.html @@ -62,6 +62,7 @@

Blog