hugo-toha.github.io icon indicating copy to clipboard operation
hugo-toha.github.io copied to clipboard

Can't build the example site when there are files under content folder.

Open DipeshAggarwal opened this issue 2 years ago • 7 comments

Current Behaviour

When I try to build the website, this is the error that I get.

Start building sites …
hugo v0.102.1-e9c3ce16abc391ee5be38f88b0499d0e8e19104c+extended windows/amd64 BuildDate=2022-08-29T12:58:13Z VendorInfo=gohugoio
Error: Error building site: "hugo-toha.github.io-main\content\notes\bash\basic\index.bn.md:13:1": failed to extract shortcode: template for shortcode "note" not found

When I remove the notes folder, this is the error that I get

Start building sites …
hugo v0.102.1-e9c3ce16abc391ee5be38f88b0499d0e8e19104c+extended windows/amd64 BuildDate=2022-08-29T12:58:13Z VendorInfo=gohugoio
Error: Error building site: "hugo-toha.github.io-main\content\posts\shortcodes\index.md:23:1": failed to extract shortcode: template for shortcode "alert" not found
Built in 22 ms

When I remove both the folders, then I'm able to build the website without any issue. But the website that is built shows just an empty white page. On Firefox, Chrome and Edge.

DipeshAggarwal avatar Sep 08 '22 18:09 DipeshAggarwal

I believe you are using an old version of the theme. Trg updating to the latest version.

hossainemruz avatar Sep 09 '22 02:09 hossainemruz

I cloned the repo so I should be on the latest version.

DipeshAggarwal avatar Sep 09 '22 03:09 DipeshAggarwal

Don't see any content directory in your repo. Can you try creating that directory?

hossainemruz avatar Sep 09 '22 06:09 hossainemruz

Any resolution on this? I get the same error right after cloning the repo. I have the content directory so that can't be it.

rexposadas avatar Sep 21 '22 18:09 rexposadas

Hi @rexposadas , look like you are using an old version of the theme. Go to themes/toha directory and run git fetch --all, git checkout main then git reset --hard origin/main. This will update the theme to the latest commit.

hossainemruz avatar Sep 22 '22 02:09 hossainemruz

Hi, I have tried running the above and am having the same issue others have listed with "failed to extract shortcode: template for shortcode "note" not found" when serving the site. I have a content folder and my theme is up to date. How should I proceed?

averywil avatar Oct 24 '22 15:10 averywil

@averywil Did you run the above command in theme/toha directory?

hossainemruz avatar Oct 24 '22 15:10 hossainemruz

FWIW, I had this issue because I followed these instructions : https://toha-guides.netlify.app/posts/quickstart/ I had only cloned the sample repo, which did not include the theme as a submodule, but does include an empty themes/toha folder. I simply removed it:

git rm themes/toha/

then added the submodule:

git submodule add [email protected]:hugo-toha/toha.git themes/toha

I'm a complete beginner with hugo, so thanks @hossainemruz for the hint !

qbonnard avatar Oct 30 '22 15:10 qbonnard

I suspect you had missed --recursive flag during cloning the repo. This flag tell to pull the sub-modules. Btw, can you please close the issue if it has been fixed.

hossainemruz avatar Oct 30 '22 16:10 hossainemruz

You're right, I did miss the --recursive flag from the https://toha-guides.netlify.app/posts/quickstart/ guide! AFAIC I would close this issue, but I'm not the one who opened it, so it seems I can't. @DipeshAggarwal do you think you can close it ?

qbonnard avatar Oct 30 '22 20:10 qbonnard

Hi @DipeshAggarwal, feel free to reopen if the issue hasn't been resolved for you.

hossainemruz avatar Oct 31 '22 03:10 hossainemruz