Skip to content
Permalink
Browse files

update runkit shortcode

  • Loading branch information...
nguyenvanduocit committed Apr 5, 2019
1 parent 084fbac commit 22bbeae56060dde79542d083912206ce2db62a78
Showing with 6 additions and 4 deletions.
  1. +2 −2 content/pages/shortcodes.md
  2. +4 −2 themes/blog/layouts/shortcodes/runkit.html
@@ -94,12 +94,12 @@ https://12bit.vn là nơi chia sẻ kiến thức lập trình web.
## runkit
```markdown
{{%/* runkit unique-id */%}}
{{%/* runkit */%}}
your code block with ``` code and ```
{{%/* /runkit */%}}
```
{{% runkit abc %}}
{{% runkit %}}
```
const object1 = {};
Reflect.set(object1, 'property1', 42);
@@ -1,2 +1,4 @@
<div class="runkit" id="{{ .Get 0 }}">{{ .Inner }}</div>
<script src="https://embed.runkit.com" data-element-id="{{ .Get 0 }}" defer></script>
{{ .Page.Scratch.Add "runkitID" 1 }}
{{ $runitID := .Page.Scratch.Get "runkitID" }}
<div class="runkit" id="{{ $runitID }}">{{ .Inner }}</div>
<script src="https://embed.runkit.com" data-element-id="{{ $runitID }}" defer></script>

0 comments on commit 22bbeae

Please sign in to comment.
You can’t perform that action at this time.