March 2nd, 2023
All you may need is HTML
Readers occasionally request which static HTML generator is used by
fabiensanglard.net, and if they can take the same stylesheet/ fonts to start their own blog. I usually send back the whole 134 lines of
gen.php and invite them to copy whatever they need to get started.
I also add a, somewhat unsolicited, piece of advice. Writers who are getting started may not need any of this stuff. All you may need is HTML.
The bare minimum
Starter pack I recommend.
- A host for your
index.htmlfiles ➔ Hostgator $33/year plan.
- A DNS pointing to the host ➔ Hostgator for an extra $12.95/year.
- Editor to write
index.htmlfiles ➔ Sublime Text on all platforms.
- Tool to upload the
index.htmlto the host ➔ Cyberduck on Win/Mac and sshfs on Linux.
Why you may not need css
The fluff does not really matter much. Several articles in my hall of fame use the default font
Times New Roman and blue hyperlinks.
- The 3D Software Rendering Technology of 1996’s Thief: The Dark Project (nothings.org).
- Lode’s Computer Graphics Tutorial (lodev.org).
- The Truth about Visplane Overflows (leekillough.com).
nothings.org‘s beauty. It has everything it needs. An author, a date, and awesome content for someone interested in real-time 3D.
Another example is Paul Graham’s straight-from-1998 layout website which does not prevent him from being a highly-regarded author.
The problems css solves
If you can stick to the same style long enough and also write articles for long enough, your style sheet can become your brand. Some people will love your style and some people will despise it. Mostly css appeals to our vanity and ego.
Why you may not need a website generator
By starting with a markup based generator, you rob yourselves of the opportunity to learn the core technology running the whole internet. Instead you will learn to use a layer built on top of it with little to no re-usable knowledge. Inevitably, you will want to do something the framework did not forecast and will come up with convoluted ways to do it anyway.
Additionally, depending on how long you will write and how often you do it, setting up a generator may be counterproductive.
The problems a generator solves
Pages on this website used to be authored with pure HTML. Now a script,
src.php files into
index.html files. There are three reasons for that.
- I like to use drawings and screenshots but
imgtags trigger layout reflow. The PHP script generates
imgtags including the
src. By integrating these values in the markup, the browser layout engine can reserve space for an image before it is downloaded.
- Articles can be sandwiched with header/footer automatically which allows to tune all articles at once. This is by far the most appealing once you have a lot of content.
If #3 is all you need, you may be better off using a recursive sandwich bash script turning
There used to be a fourth reason. To save bandwidth,
img were presented within a
picture tag so browsers supporting it could use
webp while others fell back to
png. Automatic webp conversion and
picture generation are no longer needed since Safari added
webp support in late 2020.
Why you may not need custom fonts
Custom fonts are a waste of bandwidth and a visual annoyance because they come with one of three evils called latency, FOUT, and FOIT. If you don’t need monospace, go with a websafe font.
Verdana is a great choice. It looks fantastic and ships on all major OSes so your website will look the same on all platforms.
The problems custom font solves
If you want to use monospace, a custom font may be useful. The one monospace safefont,
Courier New, is not legible. Originally this website’s
font-family simply requested
monospace. This approach resulted in varying reading experience depending on the OS. Windows browsers got
Consolas, Linux users got
DejaVu Sans Mono, and macOS people got
Courier. Using a custom
DejaVU makes the reading experience consistent (at the, barely tolerable, cost of FOUT).
The problems that everything else creates
The more tech you add to your stack, the more maintenance work will be required to keep it up and running. Recognizing cycle eaters helps to not waste motivation on overhead.
- Avoid CMS. Stuff like WordPress have to be updated constantly to patch vulnerabilities.
- Avoid anything requiring a database. It is annoying to backup and a pain to migrate. This website used to be hosted by
asmallorange. When I became dissatisfied, all I had to do was to open an account on
hostgator, upload my
htmlfiles, and change the DNS entry.
- Avoid comment systems. Custom ones will be spammed. Disqus-like will need key maintenance and could be suggested to term changes.
- Avoid external dependencies. Stuff like analytic engines can 404, 503, or become sluggish.