Failed to extract shortcode (template for shortcode "notice" not found)

I have been working on this for weeks but I can’t solve this problem.
My blog is here and here’s the repo.

Everyting is working okay for a long time but github action started to fail a week ago. Here’s the log of github action.

Start building sites … 
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add[5](https://github.com/EM-Tec/EM-Tec.github.io/actions/runs/3016228630/jobs/4848633963#step:4:6)c9f[6](https://github.com/EM-Tec/EM-Tec.github.io/actions/runs/3016228630/jobs/4848633963#step:4:7)6+extended linux/amd64 BuildDate=2022-06-16T0[7](https://github.com/EM-Tec/EM-Tec.github.io/actions/runs/3016228630/jobs/4848633963#step:4:8):09:16Z VendorInfo=gohugoio
Error: Error building site: "/home/runner/work/EM-Tec.github.io/EM-Tec.github.io/content/about.en.md:12:1": failed to extract shortcode: template for shortcode "notice" not found
Total in 79 ms
Error: Process completed with exit code 255.

I try to create a new site at my PC and if I use any shortcode like notice it started to fail again.
here’s the log in VSCode

PS C:\Users\s01\Documents\GitHub\EM-Tec.github.io> hugo server
Start building sites … 
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc windows/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
Error: Error building site: "C:\Users\s01\Documents\GitHub\EM-Tec.github.io\content\post\remove-bg.md:1:1": execute of template failed: template: _default/_markup/render-image.html:47:4: executing "_default/_markup/render-image.html" at <partial "figure" (dict "file" $file "image" $image "diskPath" $.Page.File.Dir "webPath" $.Page.RelPermalink "alt" $alt "cap" $cap "classes" ($scratch.Get "classes") "bundle" $bundle)>: error calling partial: "C:\Users\s01\Documents\GitHub\EM-Tec.github.io\themes\hugo-clarity\layouts\partials\figure.html:42:15": execute of template failed: template: partials/figure.html:42:15: executing "partials/figure.html" at <fileExists $itemDisk>: error calling fileExists: CreateFile C:\Users\s01\Documents\GitHub\EM-Tec.github.io\post\https:\EM-Tec.github.io\images\remove-bg-api.avif: The filename, directory name, or volume label syntax is incorrect.
Built in 244 ms

Very hope that someone can help me >_<

I looked into this topic but I have the themed installed and called in the config.toml file.

I didn’t update anything before commiting.
This is why I’m confused. Commit log is here.

I’ve try updating hugo and theme to solve this problem. But still…
I don’t think my image have any problem. Anything that uses the template code of clarity will cause problem.(Like {{notice}} or ![:inline])

I’m not sure if I’m directing you to the right solution, but perhaps you should explore the following points:

  • if you want to use a shortcode here is the tag: {{< notice >}} and not {{notice}}
  • you’re using the theme as a submodule, perhaps you can find other similar configurations (with Git and GitHub) that works and compare with your own.
1 Like