Can't build the example site when there are files under content folder.
DipeshAggarwal opened this issue · 11 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.
I believe you are using an old version of the theme. Trg updating to the latest version.
I cloned the repo so I should be on the latest version.
Don't see any content
directory in your repo. Can you try creating that directory?
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.
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.
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 Did you run the above command in theme/toha
directory?
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 git@github.com:hugo-toha/toha.git themes/toha
I'm a complete beginner with hugo, so thanks @hossainemruz for the hint !
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.
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 ?
Hi @DipeshAggarwal, feel free to reopen if the issue hasn't been resolved for you.