Anatomy of a Website
When I decided to redo my personal website, I had a few things that I wanted it to be able to support:-
- Customisation of the content (i.e. I could write code to make it do things, so no-code was out, and preferably in C#/.net as that's my favourite environment)
- Static content generation. Because I would like it to be cheaper, faster and less prone to security problems
- Support some dynamic content for things like contact forms.
It took me a little time to figure out the favoured approach to this problem. After looking into various tech, this is what I came up with:-
Blogging with Miniblog.core
This probably wasn't the best start, and perhaps would have been done another way, but I started with Miniblog.Core, which is a lightweight blogging engine from Mads Kristensen. I like this engine as it's light. No database, just content stored in XML. It doesn't do a huge amount, but that's what I wanted, a simple foundation.
To this, I added Pages as well as posts, which was not too tricky. And a menu.
I then stumbled across ASPNetStatic, which runs at startup and generates all the pages you give it. So, I could generate all the pages and blog posts into a folder.
Hosting with Netlify
I looked at various hosting options. I thought about AWS and Azure, but really, I needed something simple. And I looked at Netlify and it did the job. I could zip up the static content, and drop it onto Netlify and it would update the website.
Oh and while I'm not doing too much with it, it's free!
It was also simple to point the domain and get a certificate.
Netlify Forms
There's also Netlify Forms, which is cool way to do forms. So, you put in the fields and a tag, and it submits it. And then, you can get notified to your email.
There's a few things to add..