Skip to main content

Moved From Papermod to Blowfish


Intended Audience

Me.
This is a sorta-kinda living document, a record of my idiosyncratic decisions to first move to, and then bend the Blowfish theme to my needs.

Blowfish Hugo theme logo, a pufferfish in blue and white
Blowfish theme logo

Why move to Blowfish?
#

Papermod is perfection. And I outgrew it.
That’s all there was to it.
My needs outgrew what Papermod had to offer.
I wanted menus and possibly submenus and Papermod does not do them.


Blowfish specific things for future Jason to note.
#

Big Picture things
#

  • The theme does a lot. Most of which I don’t think I need.
  • The aim is to match what my site looked with Papermod, as closely as possible.
  • Everything CSS is in assets/css/custom.css, rather than multiple CSS files as it was with Papermod.
  • Pagefind powers search on the site. The inbuilt search is disabled in main.toml.
  • Footnotes use Littlefoot, to appear in popups, so that the need to scroll up and down the page is reduced.

Configuration
#

Blowfish separates everything out in its config. Lots of toml files in there.

  • Base config is in hugo.toml, theme parameters are in params.toml, menus in menus.XX.toml and language + translation related stuff is in languages.XX.toml 1
  • main.toml sets the theme, the baseURL and I’ve added a section to limit RSS entries to only 50 items
  • The author parameters along with the social link set as well as the logo are in languages.XX.toml. I have duplicated them. One for EN and one for FR. The logo that it requires, is in the assets/logo directory.
  • Menus and submenus in menus.XX.toml. Duplicated. The English menus have English names and the French ones.
  • Parameters, the header is set to basic. Every other option creates a sticky header of some sort. Lots of other changes. Most are self explanatory. Turned off “Hero” options everywhere, to stick to a plain, basic layout as much as possible.
  • My split of configuration files for environments have stayed the same with no changes

Content Structure
#

  • Directories and subdirectories for each section.
  • Make sure each section has a corresponding index.XX.md for static pages or _index.XX.md for list pages. This, I think (but am not sure) has fixed my old, nagging issue of page navigation overflowing. I would keep going next in the Talks section for example and when I reached the end, it would show me another entry from some other section. Now the front/back buttons stay restricted to the section they are in.

Archetypes
#

  • All the archetypes have been slightly tweaked. They now also include a template line for an image. It uses the theme’s figure for images.

i18n
#

  • The internationalisation options are easier here. Just defining a term somewhere and then typing it here just works.

Layout Overrides
#

RSS
#

  • Have tweaked the RSS layout. My version is in layouts/_default/rss.xml to include the full text of the post, instead of just a summary.

Search#

  • This pulls in script and the styles for Pagefind, which I use for searching the blog. Layout is in layouts/_default/search.html.

Littlefoot
#

  • Footnotes are powered by Littlefoot. Have used layouts/partials/extend-footer.html to pull in the Littlefoot script and layouts/partials/extend-footer.html to pull in the CSS.

Redirect
#

  • An old redirect template to redirect from one section to the other is still in place in the layouts/redirect directory

Shortcodes
#

  • Most of the old shortcodes made it over. Retired my image and caption shortcodes in favour of using Blowfish’s version. Also created an hsgallery shortcode, so that I could continue using my old Hugo Shortcode Gallery to create image galleries. The gallery shortcode conflicts with Blowfish’s own, which I don’t like and so won’t use.

Static + Tools
#

  • Fonts and Littlefoot reside in the static string, along with all my images.
  • There’s also a tools string which contains the Pagefind binary. This does not get published obviously. But the Forgejo action uses this to generate an index for the site and then sends the whole thing off to the VM.

Themes
#

CSS
#

All in assets/css/custom.css

  1. Import fonts: Valkyrie for the site and Source Code Pro for code.
  2. Tweaked the Janusworx up left on my site, and changed all the nav bar items to use Valkyrie Caps.
  3. Dark mode links were not contrasty enough. So changed the colour and added an underline on hover.
  4. Added an id to figures, so I could center the pics I use.
  5. Added an indent to the figures on the Annual Book List pages, so that the numbers stay under each month.
  6. Style littlefoot footnotes, so that the button is slightly smaller and higher, and the notes use Valkyrie, along with a couple of other tiny tweaks.
  7. Style the Blowfish box, and the results. on the search page
  8. Main thing to note. Use !important; liberally. Changes don’t always cascade down correctly.


Feedback on this post?
Mail me at feedback at this domain.
P.S. Subscribe to my mailing list!


  1. XX is the language code. I have EN for English and FR for French. So menus.fr.toml for e.g. ↩︎