summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blog/2025-10-03-website-rewrite.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/blog/2025-10-03-website-rewrite.md b/blog/2025-10-03-website-rewrite.md
new file mode 100644
index 0000000..a2eb1db
--- /dev/null
+++ b/blog/2025-10-03-website-rewrite.md
@@ -0,0 +1,22 @@
+# Rewriting my website the second time
+
+My previous website was using a custom rust HTTP server that rendered the site
+from scratch on every request; this allowed for some really nice interactive
+features but was overall not necessary. I am replacing that system now because
+it had problems compiling and was overly complicated which lead to me never
+updating it.
+
+That is why my new website system is as simple as possible (not really). All
+pages are rendered statically from a HTML template and a markdown content file.
+
+For few places where I need some kind of scripting I use XML Processing
+Instruction syntax which is interpreted by the python script I use to render
+markdown aswell. These instructions take the form `<?ex echo "Hello world" ?>`
+(yes. PHP uses that syntax too); This example would run the `echo` command with
+the system shell and replace the PI with its output. Currently all of instances
+of these PIs are processed seperately with no way to pass variables between them
+but I might actually write a proper implementation of this where it works;
+basically creating "PHP but shell".
+
+This entire system is implemented in only about 40 lines of combined source code
+in python and makefile. That's it, hope that was interesting.