ToC with anchors in posts

Good question: At first I thought it was just a matter of taste. But it’s a bit more than that.

This seems to be my policy:

  • Use semantic HTML5.
  • Use pure CSS—following a DRY style. (I do not use SASS any more.)
  • Use (vanilla) JavaScript as little as possible, as much as necessary. (CSS3 provides cool stuff that makes at least JS obsolete.)
  • Inline CSS and JS (unless the file sizes are really huge).
  • Use web-optimized, responsive images (I use a shortcode similar to this one.
  • Definitely use Hugo to put it all together and minify everything.

Of course, if JS is necessary, I am happy to use it (or even Vue or React).

All this makes websites extremely fast, easily maintainable, and valid.