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

what does it mean: failed to extract shortcode: shortcode "children" must be closed or self-closed? #10838

Closed
agilob opened this issue Mar 15, 2023 · 3 comments

Comments

@agilob
Copy link

agilob commented Mar 15, 2023

I'm getting this error:

$ hugo --minify
Start building sites … 
hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio
Error: Error building site: "content/linux/_index.md:8:1": failed to extract shortcode: shortcode "children" must be closed or self-closed

when trying to compile:

---
alwaysopen: true
date: "2020-08-20T16:42:11.812Z"
title: Linux
weight: 2
---

{{%children%}}

But the same files are working fine locally with hugo:

❯ hugo version
hugo v0.110.0+extended linux/amd64 BuildDate=unknown

how do it fix it and what does the error mean that it must be closed?

@deining
Copy link
Contributor

deining commented Mar 15, 2023

As of version 0.111, hugo does more strict error checking here. For details, refer to this issue.

how do it fix it

Do what the error message tells you: close the shortcode (note the aditional slash):

{{% children /%}}

The code block above uses the self closing syntax, with inner content you have to write:

{{% children %}}
My inner content
{{% /children %}}

@bep bep closed this as completed Mar 15, 2023
@agilob
Copy link
Author

agilob commented Mar 15, 2023

oh, thanks!

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants