Welcome, Hugo.

Welcome, this is basically both a test and a little run-down of what I’ve done with Hugo so far.

What’s Hugo you ask? I have no idea really, but it makes it easy to build a blog using .md (markdown) files so that’s pretty sick.

Theme shopping

I spent many hours looking at themes, here’s some common problems:

  1. They didn’t list (or seem to have?) KaTeX or mathjax support.
  2. They were way too ’narrow’ for my taste.
  3. They were too slow or even the demo page was glitchy and needed 1,000 javascripts.

I think the first point is actually easy to address with a custom header, but that wasn’t obvious to me at first.

Anyway the theme that I went with is gokarna. It’s pretty neat, and the tutorial got me started pretty quick.

Minor adjustments

I used Favicon Generator to convert the avatar for the site into icons used by the Hugo theme. I made the avatar itself with Krita, I love the brushes ✏️

The instructions for KaTeX on the gokarna example were a teeny bit out of date. I used the following addition to config.toml (which is used by Hugo to generate the site) using the header suggested in KaTeX docs - Browser:

[params]
  customHeadHTML = '''
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/katex.min.css" integrity="sha384-bYdxxUwYipFNohQlHt0bjN/LCpueqWz13HufFEV1SUatKs1cm4L6fFgCi1jT643X" crossorigin="anonymous">

    <!-- The loading of KaTeX is deferred to speed up page rendering -->
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/katex.min.js" integrity="sha384-Qsn9KnoKISj6dI8g7p1HBlNpVx0I8p1SvlwOldgi3IorMle61nQy4zEahWYtljaz" crossorigin="anonymous"></script>

    <!-- To automatically render math in text elements, include the auto-render extension: -->
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
        onload="renderMathInElement(document.body);"></script>
  '''

With any luck you can see this equation which I used in my PhD:

$$ \frac{ 1 }{ \pi } \int_{ \Gamma } \frac{ g(\xi) }{ \xi - \alpha } , \mathrm{d} \xi = 0 $$

Not much to add beyond what you’ll find on 🦆🦆, but here are the links that got me this far:

Comments