diff options
author | metamuffin <metamuffin@disroot.org> | 2025-10-03 23:15:32 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-10-03 23:15:32 +0200 |
commit | 9c329f0871979023765a34fc92a5a984993898bc (patch) | |
tree | 05caeb7cc706d9a3ba0a10956aab3fa91ff34080 | |
parent | 007525c871ab64a6a33cb549ac2496ae6e74d5e4 (diff) | |
download | metamuffin-website-9c329f0871979023765a34fc92a5a984993898bc.tar metamuffin-website-9c329f0871979023765a34fc92a5a984993898bc.tar.bz2 metamuffin-website-9c329f0871979023765a34fc92a5a984993898bc.tar.zst |
add rewrite blog entry
-rw-r--r-- | blog/2025-10-03-website-rewrite.md | 22 |
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. |