Open chipzoller opened 3 years ago
@onweru your thoughts on this?
I have been familiarizing myself with the concept. I think we should add it.
Should we try and support in this version or table for 2.0 milestone?
I think we can enable it ASAP
I made a shortcode for this:
{{ $n := .Get 0 }}
<p align="center">
<script id="asciicast-{{ $n }}" src="https://asciinema.org/a/{{ $n }}.js" async></script>
</p>
Put this in a file like asciicast.html
within the directory containing the shortcodes.
You can use it like this in your pages:
{{< asciicast num >}}
where num
is the id number of the asciicast on the asciinema website.
The only drawback is that the player does not scale well on mobile devices since it uses a fixed width font. But changes to the player are outside of my possibilities. The authors themselves just recommend to use the right width of the window at the time of recording.
I think we could support this and add some of the customizing the playback options to that shortcode as well. In terms of the mobile sizing issue:
The latest version of the player uses text auto-scaling which adapts font size to the available space. This prevents truncation at the cost of text being very small for cases where screen is small while the terminal size during recording was large. I think it's way better than it used to be though. (Dec. 21, 2021)
So I think that's reasonably addressed, although I have to say it wasn't really mentioned in their documentation anywhere.
It would be super cool to support asciinema recordings in Clarity. See also here.