Search code examples
jekyllhugo

Hugo: Translate filesystem paths to site paths (i.e. like jekyll-relative-links


I'm trying to migrate my blog from Jekyll to Hugo. I'd like to be able to follow links between posts and pages pre-compilation.

This requires that compilation translates relative filesystem links to site links (relative or absolute doesn't matter to me).

I can accomplish this in Jekyll with jekyll-relative-links. Is there an equivalent option for Hugo?


Solution

  • A delightful person made a module for this https://github.com/danielfdickinson/link-handling-mod-hugo-dfd

    Looks a bit new yet, but it worked for me. It even provides compile-time checking that the linked file exists!