Filesystem soft links broken?

I’ve been using hugo for several years to great effect for my little niche need. Thank you!

This weekend I updated my OS (Ubuntu) to 24.10 – I was quite a bit overdue. Today I discovered that my site will no longer build. My assumption is that the OS upgrade updated hugo (installed via apt).

I make extensive use of shortcodes in my site. There are numerous examples of pieces of text being reused in different contexts. In an effort to stay DRY I use filesystem soft links (ln -s) to reproduce shortcodes when I want to reference them in different ways for the same text.

I believe my site build is failing because it doesn’t like the soft-linked shortcodes any more. The example below is from a minimal reproduction of the issue:

Error: error building site: process: readAndProcessContent: "/home/todd/gh/testlinks/content/_index.md:8:1": failed to extract shortcode: template for shortcode "b" not found

Shortcode “a.md” works just fine. Shortcode “b.md” softlinks to a.md, and causes hugo to fail.

I use a large number of these links for different purposes, some of them adding a modicum of intelligence to the way my site is built. Moving away from them would be arduous and make my site significantly more difficult to administer going forward.

Was this change on purpose? Do I have something mis-configured? Is something in my upgraded OS wonky and I just need to fix it? I would greatly appreciate any help or suggestions you might offer.

edit: system info:

xx@xx:~/gh/testlinks$ hugo env
hugo v0.129.0+extended linux/amd64 BuildDate=2024-08-13T17:51:38Z VendorInfo=ubuntu:0.129.0-2
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.23.0"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"

Support for symbolic links, also known as soft links or junctions, was removed in v0.123.0.

Use mounts instead.
https://gohugo.io/getting-started/directory-structure/#union-file-system

1 Like

Joe,

I’ve seen you posting help for all kinds of people for… several years!

And here you respond with the info I am looking for in mere minutes after I ask. Thank you!

I’ll investigate unions and hope I can adapt. (And possibly run a pre-0.123.0 version of hugo until I get it figured out!)

Thank you for your help.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.