Skip to content

Commit 4097fca

Browse files
authored
Merge pull request #29205 from sftim/20210803_improve_katacoda_button
Improve Katacoda button
2 parents 5703199 + e3b6ab9 commit 4097fca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

layouts/partials/hooks/body-end.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{{ if .HasShortcode "kat-button" }}
2+
<div id="katacoda-environment" data-katacoda-ondemand="true" data-katacoda-port="30000" data-katacoda-env="minikube" data-katacoda-command="start.sh" data-katacoda-ui="panel"></div>
3+
{{ end }}
14
{{ with .Site.Params.algolia_docsearch }}
25
<!-- scripts for algolia docsearch -->
36
{{ end }}

layouts/shortcodes/kat-button

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
<div id="my-panel" data-katacoda-ondemand="true" data-katacoda-port="30000" data-katacoda-env="minikube" data-katacoda-command="start.sh" data-katacoda-ui="panel"></div>
2-
<script src="https://katacoda.com/embed.js"></script>
1+
<script defer src="https://katacoda.com/embed.js"></script>
32
<button class="button" onclick="window.katacoda.init(); ">Launch Terminal</button>

0 commit comments

Comments
 (0)