I keep waffling on whether to switch from [Hugo][hugo] to [Nikola][nikola] or some other Static Site Generator. Meanwhile, my Nikola import spare time project continues. Got the basic structure down, and my theme is almost useful. It even improved the Hugo version of the site.
NOTE
nikola check -l
looks for broken internal links on your build output. It found a few in the imported files. I fixed them.And yes. I wrote making-a-mojo-link-checker in 2017. No, I haven’t used it since.
The shortcode
Some posts included embedded YouTube videos. Nikola’s RST extensions include a youtube directive, but I needed something for the Markdown files. Well, okay. media
from the built-in shortcodes would work. I wanted to make a template shortcode, okay?
Here’s what the Hugo shortcode looks like.
I never knew about YouTube privacy configuration for the shortcode. Ah. That’s because it’s not in the shortcode documentation. I like it though. I think I’ll use it.
NOTE
Ah. It’s documented in Hugo and the GDPR.
If you want a Nikola configuration available to your shortcode, add it to conf.py’s `GLOBAL_CONTEXT
dictionary.
And here’s shortcodes/youtube.tmpl
, adapted for Mako.
Not much needed here. It takes the YouTube ID as an argument, picks a host based on youtube_privacy_enhanced
, and adds some HTML.
It works!
What Now?
I’m not sure. The Nikola experiment is fun, but I have ideas for the Hugo flow too.
Backlinks
Added to vault 2024-01-15. Updated on 2024-02-02