About This Site
There are 4 components regarding building this site
- Development
- Testing
- Domain name
- Hosting
Development
My development and build area is actually a Raspberry Pi 3 running Ubuntu Server 20.04 LTS. This is mainly because I wanted to see how well does it work as a testbed. So far, development has been quite smooth. Opening large files can take a while but the delays are nothing too serious. All my requirements are satisfied.
Content Generation
I'm actually using a minimal static site generator called ssg by Roman Zolotarev, which I heard about from Wolfgang's Channel.
It's light because it's written in simple shell
with 180 LOC, which is just hilarious.
No dependancies or extra libraries (other than lowdown which converts markdown to html
among other formats)
Styling
ssg
simply spits out html
without any styling.
So I had to search for some nice css
templates for markdown.
I thought it would be easy but it took some time to find something decent but not too heavy.
I settled for themes by Typora which is actually meant for their application; a markdown editor.
The current theme that i'm using is called NexT.
It took some manual tweaking to get it just right, specifically getting the code blocks right.
Testing
I'm testing the website on the same Pi using Python's built in web-server.
It can be easily started like this
python3 -m http.server
By default, it runs at port 8000
and hosts the current directory.
Domain name
I bought this domain name from GoDaddy. That's almost the defacto domain market place in India. Remember to properly redirect your domain to your host, otherwise your site will be unreachable. I used this resource to perform the redirection.
Hosting
Since the site is static, Github Pages is good enough.
Conclusion
I like this setup and I intend to keep working on this. Once the site has been setup, with the proper header/footer/theme, making content is quite convenient.
Things to keep in mind
- Have a backup for your markdown content.
- Don't embed your fonts locally, unless your host has a fast connection. Use Google Fonts instead.
- Have a clean/build/deploy script. It saves a lot of time.
- Remember to trim your
css
file. - Adding a custom 404 page looks nice.