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

Docs: Change tabs shortcode example to permit unsafe=false #689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vadcx
Copy link

@vadcx vadcx commented Feb 7, 2025

The syntax of {{% code %}} only expects Markdown inside. That's why it triggers unsafe warning, if used as a shortcode template.

Instead the only the top table shortcode should be used as {{< tabs >}} to include the HTML, while the user may use only {{% tab "Name" %}} inside and be happily restricted to Markdown.

https://gohugo.io/methods/page/rendershortcodes/#shortcode-notation
InfosecForActivistsTeam/infosec-activists#45


I have not added any notes to README.md. Yes, I have tested with unsafe=false and the tabs worked while other pages generated warnings.

The syntax of `{{% code %}}` only expects Markdown inside. That's why it
triggers unsafe warning, if used as a shortcode template.

Instead the only the top table shortcode should be used as
`{{< tabs >}}` to include the HTML, while the user may use only
`{{% tab "Name" %}}` inside and be happily restricted to Markdown.

https://gohugo.io/methods/page/rendershortcodes/#shortcode-notation
InfosecForActivistsTeam/infosec-activists#45
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

Successfully merging this pull request may close these issues.

1 participant