Skip to content

Commit

Permalink
feat: add the asciinema shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Aug 12, 2022
1 parent e42d16b commit aa103ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion exampleSite/content/docs/shortcodes/media/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ tags = [
"Tencent",
"Youku",
"iQiyi",
"Netease Music"
"Netease Music",
"asciinema",
]
series = [
"Docs"
Expand Down Expand Up @@ -71,3 +72,11 @@ A detailed description of media shortcodes, such as Bilibili, Tencent, Youku, iQ
| `type` | The `type` parameter is optional. Default to `2`.

{{< neteasemusic "24953439" false >}}

## asciinema

```markdown
{{</* asciinema id */>}}
```

{{< asciinema 514468 >}}
4 changes: 4 additions & 0 deletions layouts/shortcodes/asciinema.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- $id := .Get 0 }}
<div class="ratio ratio-16x9 asciinema mb-4">
<script id="asciicast-{{ $id }}" src="https://asciinema.org/a/{{ $id }}.js" async></script>
</div>

0 comments on commit aa103ce

Please sign in to comment.