It's been a loooong time coming, but I've finally managed to overhaul custard doughnuts. I thought it was about time I had a website that reflected my current level of web development ability. Having said that, consider this the pre-launch - the front end in particular is entirely preliminary and more thrown together than properly designed.
So what's new?
The first and most obvious thing is that custarddoughnuts.co.uk is now my blog. I've not really had one before but for some reason the idea suddenly started to appeal to me. Hopefully I'll be able to sustain a reasonable level of content output, but it's early days yet.
There were a lot of things I wanted to try when it came to rebuilding my website. For example, I was excited to try this new 'Arial' font everyone's been talking about.
Seriously though, one thing I did want to try was using something a bit more structured for organising my pages. Being familiar with the templating systems in django and Twig that seemed like a good thing to try, but as far as my personal work goes, I've always preferred to find out how it works for myself than using someone else's code. So I thought I'd give building a template system a go. That shouldn't be too hard.
As it turned out, it was pretty hard, but mainly of the 'getting stuck on what should be a very small problem but being unable to proceed simply because I'd not done anything like this before and going round in circles a bit' variety. I spent a lot of time shouting at regexes and trawling stackoverflow for information. Anyway, after a few long evenings I now have a working templating system. For those of you not familiar with templating engines, well, you might get a bit lost here. I'm not going to go into any detail about how the code works, mainly because it's an ongoing project and therefore somewhat ramshackle in places, but I will say that it does the following:
- Template extension and extendable blocks (the fundamentals, really) including block.super
- Variable insertion, tied to specific URLs
- For loops
- Include template statements
- If statements, based on variables
On top of this I've added a working URL routing system that compliments it nicely. There's something strangely satisfying about having a website where none of the URLs end with a file extension. I've now found myself starting to look down on other, lesser websites.
It's early days, but it all seems to be working satisfactorily, both in terms of actually working (a key aspect, I feel) and being able to deliver pages to a browser at a speed that doesn't betray the fact that it's doing much more work in the background than a simpler mechanism. As with all my code, I'll put it on github when I feel confident that it's written well enough to not immediately be besieged by rewrite pull requests.
For now my various subsites remain as they were, although eventually I will migrate them across to the new system and redo their aging CSS and clean up their content and so on. Brain Yak is somewhat redundant now the main site is blog-like, so I'll be merging all the old content from there into here over time.
One of the other things I particularly wanted was to make my site responsive, which it now is. Subsites to follow.
It's been a fair bit of work but it feels good to have done it. Hope you enjoy the new site.