Hugo shortcode for Kotlin Playground
<script src="https://unpkg.com/kotlin-playground@1" data-selector=".kotlin-code"></script> |
<!-- kotlin --> | |
<code class="language-kotlin kotlin-code" | |
{{- if .Get "compilerVersion" }}data-version="{{ .Get "compilerVersion" }}"{{ end -}} | |
{{- if .Get "foldedButton" }}folded-button="{{ .Get "foldedButton" }}"{{ end -}} | |
{{- if .Get "height" }}data-output-height="{{ .Get "height" }}"{{ end -}} | |
{{- if .Get "highlightOnly" }}data-highlight-only{{ end -}} | |
{{- if .Get "jsLibs" }}data-js-libs="{{ .Get "jsLibs" }}"{{ end -}} | |
{{- if .Get "targetPlatform" }}data-target-platform="{{ .Get "targetPlatform" }}"{{ end -}} | |
{{- if .Get "theme" }}theme="{{ .Get "theme" }}"{{ end -}} | |
>{{htmlUnescape .Inner}}</code> | |
<!-- /kotlin --> |
This comment has been minimized.
This comment has been minimized.
Thanks @hakimrie, gist updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
thank you for the gist.
I want to ask, how to make hugo to not strip out tag/edge bracket?
for example this code
will result:
because
<String>
it removed (by hugo)update: never mind
{{htmlUnescape .Inner}}
solve the bug