I use Xmind to creat my Mindmap.
How can I set it up in the Hugo when I sharing my Xmind embed code?
thanks~~~~
Method A
1) Configure your site to allow HTML in markdown.
[markup.goldmark.renderer]
unsafe = true
It’s not unsafe if you control the content.
2) Paste the iframe element into your markdown file:
<iframe src="https://xmind.ai/embed/5mjC1hcX?sheet-id=84d84f40-9204-481f-bff0-eca82cc17a69" width="900px" height="540px" frameborder="0" scrolling="no" allow="fullscreen"></iframe>
Method B
1) Create a shortcode that takes the embed URL as a positional parameter.
layouts/shortcodes/embed-xmind.html
{{ $src := or (.Get 0) (errorf "The %q shortcode requires a single positional parameter: the embed URL. See %s" .Name .Position) }}
<iframe
src="{{ $src }}"
width="900px"
height="540px"
frameborder="0"
scrolling="no"
allow="fullscreen"
></iframe>
2) Then call the shortcode from markdown.
{{< embed-xmind "https://xmind.ai/embed/5mjC1hcX?sheet-id=84d84f40-9204-481f-bff0-eca82cc17a69" >}}
2 Likes