A remark plugin that transforms asciinema links into either an embedded asciinema player or screenshot that links to the recording.
<script>
embeds for live asciinema players<img>
tags for static cast thumbnails that link to the recordingBefore:
Check out this demo: https://asciinema.org/a/12345
After (HTML output):
Check out this demo:
<script
id="asciicast-12345"
src="https://asciinema.org/a/12345.js"
async
></script>
pnpm install remark-asciinema
import { remark } from "remark";
import asciinema from "remark-asciinema";
const file = await remark()
.use(asciinema)
.process("Check out: https://asciinema.org/a/abc123");
console.log(String(file));
Note: After integrating the Remark plugin, ensure you include the necessary asciinema JavaScript and CSS files to enable proper playback and styling. You can load them via UNPKG: