hugo-hero-theme icon indicating copy to clipboard operation
hugo-hero-theme copied to clipboard

Getting error when building: failed to extract shortcode: template for shortcode "content-stip-left" not found

Open meggenberger opened this issue 1 year ago • 6 comments

Hi.

I followed the instructions for the installation on my Mac (M1) with Hugo extended installed (Hugo v0.115.2+extended darwin/arm64 BuildDate=unknown)

When I enter hugo to create the site I get the error

Start building sites …
hugo v0.115.2+extended darwin/arm64 BuildDate=unknown

Total in 22 ms
Error: error building site: assemble: "/Users/me/Code/Skarp/hero-theme/content/pages/about/index.md:11:1": failed to extract shortcode: template for shortcode "content-strip-left" not found

Any idea what I'm doing wrong?

meggenberger avatar Jul 30 '23 13:07 meggenberger

Hi! I had the same problem. I deleted the file hugo.toml from the site root directory. After that everything works. Seems like the file is automatically generated by hugo when you create a new site. The theme has its own config.toml.

fschimpf avatar Aug 02 '23 08:08 fschimpf

@meggenberger I can't reproduce the issue. I can see the shortcode does exist layouts/shortcodes/content-strip-left.html

@fschimpf I'm not sure what file you are referring too, there is not hugo.toml file.

I need more information to continue debugging.

JugglerX avatar Nov 26 '23 06:11 JugglerX

if you copy the files over from a new hugo site, the hugo.toml file exists. I can verify that, once that file is deleted, a hugo build works

lgwapnitsky avatar Dec 03 '23 07:12 lgwapnitsky

Can someone provide exact steps? I dont see a hugo.toml file. Maybe you can link to it in the repo.

JugglerX avatar Dec 03 '23 23:12 JugglerX

The file is generated by hugo if you follow step 2 of your installation instructions in the file readme.md: "2. Create a new Hugo site This will create a fresh Hugo site in the folder mynewsite. hugo new site mynewsite"

I think if this step is removed, everything should be fine :-)

fschimpf avatar Dec 04 '23 10:12 fschimpf

Yes, it you do not need to do the init and the cp -a does not remove it, I can submit a PR to remove the README.md line

richtong avatar Dec 25 '23 03:12 richtong