Hi, I’m writing posts in multiple languages, I would like to reuse some shortcode block cross posts writing in different languages. Is there any way to do that?
For example:
<!-- foobar/index.md -->
{{< myshortcode key="value" >}}
SHORTCODE CONTENT
{{< /myshortcode >}}
<!-- foobar/index.zh-cn.md -->
{{< myshortcode key="value" >}}
SHORTCODE CONTENT
{{< /myshortcode >}}
I want to resue the shortcode block:
{{< myshortcode key="value" >}}
SHORTCODE CONTENT
{{< /myshortcode >}}
Now, I’m doing that by creating a new shortcode myshortcode-content
:
SHORTCODE CONTENT
And then embedded it as follows:
{{< myshortcode key="value" >}}
{{< myshortcode-content >}}
{{< /myshortcode >}}
Is there a better way to do that? Thanks.