New Theme, New Code
Posted: Sunday, 4th November 2018
Oh yeah! And the site is also a little more optimised for mobile devices. Gnarly!
In addition, the page's <title> element is now automatically generated based on which page you're on which saves some time. And I can also add BBCodes, like say, [YOUTUBE], to my page processor, to save having to copy and paste all that YouTube embed HTML every time.
The slight catch here is that all but the home page URLs have changed, so Google's gonna have to re-index everything, and the two people that visit my site will have to update their bookmarks. D'oh! Sorry xD.
The way the site code works is that it gets which page has been requested from the URL from a parameter, page, so for this page, if you look at the address bar now, the requested page is "blog/2018-11-04-new-theme-new-code". An XMLHttpRequest is then done to the server for that page as well as the currently selected theme. It then mixes it all together and boom there's your final page :).
Edit (Sun 11th November 2018): There's been a few changes. It's the same basic idea, but now the page is determined using the actual filename e.g. somepage.html, ratheer than using index.html for everything.
I have an idea for a small project which y'all, especially other Neocities members, might appreciate. You can use it to generate some fun, interactive content which you can put on your website, which your visitors might enjoy! I think I can create it in a day or two's work, so next time I'm not working on real life or my Crash 1 N. Sane playthrough, I'll get that done! I'll provide more details nearer the time.