Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to extract shortcode: shortcode "alert" has no .Inner, yet a closing tag was provided #96

Closed
2 tasks done
stephansainleger opened this issue Sep 30, 2023 · 7 comments

Comments

@stephansainleger
Copy link

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for support

Describe the bug

Hi!
after the install of LotusDocs theme (manual installation by cloning the theme files), I tried hugo serve and I get an error concerning the alert shortcode.

Here is the shortcode concerned:

{{% alert context="info" %}}
my text
{{% /alert %}}

I wonder if it is not a side effect of the following recent update: `5c59008#diff-83f19c21cf48a204476a2ccf63d323c91bd1310d1f99462e590a4878a2d44846L23

Expected behavior

Shortcode alert is understood by LotusDocs and the hugo serve command run successfully.

Screenshots

No response

Environment

- OS: Linux Mint 21 Vanessa
- Browser: N/A
- Browser Version: N/A
@colinwilson
Copy link
Owner

Thanks. 👍.

Can you post the error itself?

@stephansainleger
Copy link
Author

Here is the complete error message:

$ hugo serve
Start building sites … 
hugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z VendorInfo=ubuntu:0.92.2-1ubuntu0.1
Error: Error building site: "~/my-project-hugo/content/my-first-post.md:7:1": failed to extract shortcode: template for shortcode "alert" not found
Built in 40 ms

@colinwilson
Copy link
Owner

Have you tried with a Hugo version of 0.117.0 or above? (Or the latest version?)

@stephansainleger
Copy link
Author

stephansainleger commented Sep 30, 2023

I tried with v0.119.0 and I get the following error:

$ hugo serve
hugo: downloading modules …
hugo: collected modules in 11837 ms
WARN  Module "lotusdocs" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN  Module "github.com/gohugoio/hugo-mod-bootstrap-scss/v5" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Watching for changes in my-hugo-project/{archetypes,content,themes}
Watching for config changes in my-hugo-project/config.toml, my-hugo-project/themes/lotusdocs/config.toml, my-hugo-project/go.mod
Start building sites … 
hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e linux/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=gohugoio

WARN  calling IsSet with unsupported type "invalid" (<nil>) will always return false.
WARN  found no layout file for "json" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Built in 226 ms
Error: error building site: TOCSS: failed to transform "scss/style.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information

@colinwilson
Copy link
Owner

Looks like you're not using the extended version of 0.119.0. Try with the extended version and see if that resolves the issue.

@stephansainleger
Copy link
Author

Great it solved the issue! Thanks for your help, and I realize it was explained in the README.md... :-/ Really sorry for the inconvenience!!

@colinwilson
Copy link
Owner

No problem, you're welcome 👍.

This will thread will be helpful for the troubleshooting/common-issues section of the theme docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants