Fix asciinema player in news articles

This commit is contained in:
Blaž Hrastnik
2022-10-13 13:27:12 +09:00
parent 59a32e5602
commit 1abbdf7168
4 changed files with 10 additions and 3 deletions

View File

@@ -131,7 +131,6 @@ The next release is sure to be exciting as well. Contribute and follow
along with development in the [GitHub repository][helix-git] and be sure to
join in on discussions in the [Matrix channel][matrix].
<script src="/asciinema-player.js"></script>
[changelog]: https://github.com/helix-editor/helix/blob/master/CHANGELOG.md#2203-2022-03-28
[docs]: https://docs.helix-editor.com/
[master-docs]: https://docs.helix-editor.com/master/

View File

@@ -119,7 +119,6 @@ Contribute and follow along with development in the
[GitHub repository][helix-git] and be sure to join in on discussions in the
[Matrix channel][matrix].
<script src="/asciinema-player.js"></script>
[changelog]: https://github.com/helix-editor/helix/blob/master/CHANGELOG.md#2205-2022-05-17
[default language configuration]: https://docs.helix-editor.com/guides/adding_languages.html#language-configuration
[helix-git]: https://github.com/helix-editor/helix/

View File

@@ -131,7 +131,6 @@ Contribute and follow along with development in the
[Helix GitHub repository][helix-git] and be sure to join in on discussions in
the [Matrix channel][matrix].
<script src="/asciinema-player.js"></script>
[changelog]: https://github.com/helix-editor/helix/blob/master/CHANGELOG.md#2208-2022-08-31
[helix-git]: https://github.com/helix-editor/helix/
[matrix]: https://matrix.to/#/#helix-community:matrix.org

View File

@@ -7,4 +7,14 @@
{{ page.content | safe }}
<script src="/asciinema-player.min.js"></script>
<script>
for (const player of document.getElementsByTagName("asciinema-player")) {
AsciinemaPlayer.create(player.attributes["src"].value, player, {
cols: parseInt(player.attributes["cols"].value),
rows: parseInt(player.attributes["rows"].value),
});
}
</script>
{% endblock content %}