From 9c329f0871979023765a34fc92a5a984993898bc Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 3 Oct 2025 23:15:32 +0200 Subject: add rewrite blog entry --- blog/2025-10-03-website-rewrite.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 blog/2025-10-03-website-rewrite.md 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 `` +(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. -- cgit v1.2.3-70-g09d2