New website
Personal website #2316542575 is now online, after more than 10 years i have a personal website again. Last time my Wordpress install was so broken the hosting provider called me to have it fixed (affected other customers on the same instance). Since i did not want to spend any time on it, the reason it was neglected it in the first place, i took it offline and never looked back.
This time i wanted to keep things simple, a static website with handcrafted HTML + CSS. No more forced maintenance1, no security headaches, no frameworks that come and go, no dependencies to update, … a simple website that was trivial to maintain which i only have to update when i want to. After my HTML + CSS was done i had a dilemma: write my own (markdown-based) content generator or use an existing (static website) generator.
Because i had no desire to jump in that problem space, i caved, and went for an existing static website generator. There are multiple generators available but i just went with the first that came up:
Hugo (open source static website generator).
Since i’m not planning on forking or keeping an old version of Hugo around i will be forced to updated upon breaking changes. This fails my initial design goal of having no forced maintenance, if this proves to be a problem i will keep an old version around until i feel like upgrading2.
To learn Hugo i preferred to start from an existing theme (+ the official
documentation) and mold it to my previously handcrafted HTML + CSS; this is a method that works very well for me. I got carried away though and started to slap together multiple existing themes into what you’re seeing now. Often only the UI was kept (or recreated) and code re-written3. Unfortunately due to the license of the resume theme i’m prohibited of open sourcing this theme. Since this is a personal site, and i never intended to create/maintain a Hugo theme itself, that was not a deal-breaker for me.
I also briefly looked into using an existing theme (there are many available for free) but found none that completely satisfied me and i already had my handcrafted HTML + CSS. In hindsight i should have picked the best one and call it a day, would have been far more efficient time wise. On the other hand now i’m back up-to-date with the front-end web world; a mixed bag.
Here is a quick overview of all themes this site is based on inspired by, for the resume i took the look and feel from
hugo-devresume-theme (removed bootstrap and rewrote the css), the general layout is custom + based on
hugo-book (heavily modified). Individual elements were taken from
hugo-theme-meme,
hugo-theme-learn and
hugo-theme-dream.
For Javascript I’ve tried to keep it to a minimum (the goal was none, which failed) and the website can function perfectly without. The whole layout is CSS only. I got carried away though with features and even included third party libraries, at the time of writing: lazysizes, clipboardjs, lunr.js, glider, PhotoSwipe, KaTeX and mermaid. However all of them fulfil a specific function and can be easily disabled/removed/replaced if desired. I host their minified version so am not bothered with building them (this website does not use node.js nor npm). At the time of writing they are all still actively maintained. Besides those there are some small custom script snippets as well but all of the layout is done in CSS. I very much on purpose avoided any CSS or Javascript frameworks to avoid lock-in4.
In the end i’m quite pleased with the result although it took way more time than i care to admit5. It still could use more UI polish but i feel like i’m at the 80%6 mark which is sufficient.
Below are some thoughts on my experience with front-end development since my last experience was from more than a decade ago.
Changelog
2020-04-13
- Initial release
i had even set-up automatic back-ups and upgrades for Wordpress (predominantly for security fixes) but they broke at some point. ↩︎
Hugo is written in Go, so as long as my system has support for the required Go version i should be fine. Go is executed on a VM so changes are i will be able to run the same executable for years in the future. ↩︎
because as every developer knows it goes from “that can be done better”, “i will make this better” until finally “why do i spend a whole weekend on aligning elements for a feature i will likely not use”. Mistakes were made. ↩︎
you become dependent on the framework and it requires more work if you decide to drop it or change framework. Some frameworks also have break changes after a while which force maintenance on your end even though you might not want to upgrade but a forced to e.g. due to bug fixes or specific new features. While this might be fine depending on your use-case i aimed to reduce maintenance as much as possible. ↩︎
there have been multiple Hugo version bumps between starting and finishing this website… ↩︎
usually the last 20% of work takes 50% of the time[citation needed]. where 100% is practically speaking never achieved (logarithmic curve)[citation needed]. For many use-cases 80% is more than sufficient. Not to be confused with the Pareto principle or 80/20 rule. ↩︎
e.g. you look at the documentation and implement accordingly but, there it is staring at you. An error. You are mixing up two concepts but do not know it yet, the error is not helpful and the only way to debug is: google, trial and error or hope it clicks after reading through more documentation and stumble upon the concepts after which you make the connection. For people that already know these concepts the existing documentation will indeed be sufficient. ↩︎
might also have been a settings issue on my end but out of the box none worked for HTML nor SCSS with Hugo syntax. ↩︎
some behavior can only be achieved via a certain combination of settings which, for a beginner, are not intuitive and quite annoying e.g. is something wrong in my understanding or do i just need to look up the black magic combination. ↩︎
unfortunately it is opinionated (e.g. request to make imports optional issue1, issue2, issue3, issue4) but still better than plain CSS. It does the job. ↩︎
you really do not want to manually change constants everywhere and splitting up to files is useful as well outside of some other convenience functions it provides (like the
lighten
anddarken
functions for colors) ↩︎lines of code. ↩︎
apart from terrible performance not being typed would be sufficient for me, yes i know TypeScript exists. I will not go in all the details, you can find plenty of books an opinions of people more informed about the subject than me. ↩︎
dependency graphs seem to be large for even small libraries due to the overenthusiastic (?) and ease of using dependencies in libraries i presume. In my opinion every dependency should be carefully evaluated for cost/benefit (and eliminated if possible), but dependency management is a whole other subject on its own. ↩︎
- Permalink: //oostens.me/posts/new-website/
- License: The text and content is licensed under CC BY-NC-SA 4.0. All source code I wrote on this page is licensed under The Unlicense; do as you please, I'm not liable nor provide warranty.