Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Investigate nested shortcodes (how to use .Parent variables) #227

Open
RichieEscarez opened this issue Oct 7, 2020 · 0 comments
Open

Investigate nested shortcodes (how to use .Parent variables) #227

RichieEscarez opened this issue Oct 7, 2020 · 0 comments

Comments

@RichieEscarez
Copy link
Contributor

A PR from last Oct added this to the Hugo docs: https://gohugo.io/content-management/shortcodes/#nested-shortcodes

"You can call shortcodes within other shortcodes by creating your own templates that leverage the .Parent variable. .Parent allows you to check the context in which the shortcode is being called."

The example: https://gohugo.io/templates/shortcode-templates/#nested-shortcode-image-gallery

Action: Look into whether this fixes the issues with using our readfile shortcode to add README files (today, any shortcodes in the README.md files simply render the shortcode as text and fails to process the shortcode - for example dynamically add version numbers or branch names

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

No branches or pull requests

1 participant