https://github.com/hugo-fixit/shortcode-asciinema
A Hugo theme component with asciinema-embed shortcode.
https://github.com/hugo-fixit/shortcode-asciinema
asciinema hugo shortcodes theme-component
Last synced: 3 months ago
JSON representation
A Hugo theme component with asciinema-embed shortcode.
- Host: GitHub
- URL: https://github.com/hugo-fixit/shortcode-asciinema
- Owner: hugo-fixit
- License: mit
- Created: 2025-01-08T09:20:48.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-07-04T02:45:22.000Z (3 months ago)
- Last Synced: 2025-07-04T03:34:06.573Z (3 months ago)
- Topics: asciinema, hugo, shortcodes, theme-component
- Language: HTML
- Homepage: https://fixit.lruihao.cn/documentation/installation/#cli
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
- License: LICENSE
Awesome Lists containing this project
README
shortcode-asciinema | FixIt
A Hugo theme component with
asciinema-embed
shortcode.
简体中文 |
繁體中文 |
English |
Français |
Русский язык |
Español |
हिन्दी |
deutsch |
한국어 |
しろうと## Demo
[Installation Theme#CLI | FixIt](https://fixit.lruihao.cn/documentation/installation/#cli)
## Requirements
Applicable to all Hugo themes.
## Install Component
The installation method is the same as [installing a theme](https://fixit.lruihao.cn/documentation/installation/). There are several ways to install, choose one, Here are two mainstream ways.
### Install as Hugo Module
First make sure that your project itself is a [Hugo module](https://gohugo.io/hugo-modules/use-modules/#initialize-a-new-module).
Then add this theme component to your `hugo.toml` configuration file:
```toml
[module]
[[module.imports]]
path = "github.com/hugo-fixit/FixIt"
[[module.imports]]
path = "github.com/hugo-fixit/shortcode-asciinema"
```On the first start of Hugo it will download the required files.
To update to the latest version of the module run:
```bash
hugo mod get -u
hugo mod tidy
```### Install as Git Submodule
Clone [FixIt](https://github.com/hugo-fixit/FixIt) and this git repository into your theme folder and add it as submodules of your website directory.
```bash
git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
git submodule add https://github.com/hugo-fixit/shortcode-asciinema.git themes/shortcode-asciinema
```Next edit `hugo.toml` of your project and add this theme component to your themes:
```toml
theme = ["FixIt", "shortcode-asciinema"]
```## Record Terminal
You can use the `asciinema` command to record the terminal and upload it to [asciinema.org](https://asciinema.org/).
```bash
asciinema rec demo.cast
# press or type "exit" when you're done
asciinema upload demo.cast
```## Use Shortcode
Here is an example of usage:
```markdown
{{< asciinema-embed 697494 >}}
```The rendering effect is as follows:
[](https://asciinema.org/a/697494)
## References
- [Develop Theme Components | FixIt](https://fixit.lruihao.cn/contributing/components/)
- [How to Develop a Hugo Theme Component | FixIt](https://fixit.lruihao.cn/components/dev-component/)