New Website Design

I'm in the process of porting my site to ASP.NET Razor Pages using .NET 7.0, hosted on Azure. I'm still very early in the process, so it's quite rough around the edges, but it's already much easier to use that my old host on WordPress.

I like to write posts where I play with different scripts and CSS, and that's not easy to do on WordPress. Yes, it's possible, but it's a pain to maintain. What I've always wanted to do is just write plain HTML pages with custom CSS and script inline, so I've finally designed something that will let me do that.

I have a lot of content that I still need to port over from my old site, but fortunately I have some help in this regard. WordPress exposes an API that I can use to pull in pages and posts, so I wrote a Razor Page that uses that API so that I can pull the old content as save it as HTML files in my new repository.

How It Works (Short Version)

The entire site runs as an ASP.NET Core Razor Pages application in a Docker container running Debian Linux. It loads the actual site content from an Azure File Storage share, so I can easily edit and update raw HTML, JS, and CSS files and have them picked up by the site engine. For example, the content of this page is coming from a plain HTML file stored on the file system. When I want to serve it though the standard site layout, I pull out the body and any other bits I need from the header and add those to the layout. It is SO much nicer to write and edit content now!

While editing the content directly is nice and convenient for now, it's not how I'd like to run the system long-term. I'm going to define a REST API (and by this, I mean actual, RESTful, REST API) using POST and PUT to abstract away the details of the underlying storage. That way, if I do eventually decide to use a database instead of a file system, it will be easier to do so, and even if I keep the content on the file system I can coordinate site updates with the engine so I don't get into a race condition with pages that are loading content.

Once I get things cleaned up a bit I'll post another article explaining how the new system works, and I'll also share the GitHub repository where I keep the site code.

Please let me know if you encounter any errors or other problems.