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

fix: Escape Hugo shortcodes in description front-matter #649

Merged
merged 1 commit into from May 31, 2022

Conversation

kaushalmodi
Copy link
Owner

The description front-matter will most likely be parsed as Markdown
string using $.Page.RenderString, and we do not want literal strings
like "{{< .. >}}" in there be interpreted as Hugo shortcode calls.

Shortcodes are now rendered by RenderString starting Hugo v0.100.0:
https://github.com/gohugoio/hugo/releases/tag/v0.100.0.

@kaushalmodi kaushalmodi marked this pull request as ready for review May 31, 2022 21:39
The description front-matter will most likely be parsed as Markdown
string using $.Page.RenderString, and we do not want literal strings
like "{{< .. >}}" in there be interpreted as Hugo shortcode calls.

Shortcodes are now rendered by RenderString starting Hugo v0.100.0:
https://github.com/gohugoio/hugo/releases/tag/v0.100.0.
@kaushalmodi kaushalmodi force-pushed the escape-hugo-sc-in-description-fm branch from 1b2d927 to 4f6517d Compare May 31, 2022 21:41
@kaushalmodi kaushalmodi merged commit df0b12e into main May 31, 2022
@kaushalmodi kaushalmodi deleted the escape-hugo-sc-in-description-fm branch May 31, 2022 21:58
@kaushalmodi
Copy link
Owner Author

The change in this PR probably won't affect any user. The only reason this change was needed was because I literally had the Hugo shortcode braces in the description front-matter of one of the tests.

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.

None yet

1 participant