Skip to content

Commit 8ae3bb2

Browse files
authored
Merge pull request #122 from Junnygram/doc-filename-support
docs: add examples for the new filename attribute
2 parents 2836594 + a19e433 commit 8ae3bb2

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

content/content-formatting-examples/hextra/asciinema/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Embeds an [asciinema](https://asciinema.org/) terminal recording player. The pla
2323
| `loop` | Loop playback | `false` |
2424
| `poster` | Poster/thumbnail specification | _(none)_ |
2525
| `markers` | Comma-separated time markers (e.g., `"5:Intro,10:Demo"`) | _(none)_ |
26+
| `filename` | Optional filename to display as a header | _(none)_ |
2627

2728
**Example:**
2829

29-
{{< hextra/asciinema file="demo.cast" speed="2" autoplay="true" loop="true" >}}
30+
{{< hextra/asciinema file="demo.cast" speed="2" autoplay="true" loop="true" filename="terminal-session.cast" >}}

content/content-formatting-examples/hextra/jupyter/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Renders a Jupyter Notebook (`.ipynb`) as code blocks and Markdown cells.
1818
|-----------|-------------|---------|
1919
| positional | Path or URL to the `.ipynb` file | _(required)_ |
2020
| `allowUnsafeHTML` | Set to `"true"` to render raw HTML from notebook outputs | `false` |
21+
| `filename` | Optional filename to display as a header | _(none)_ |
2122

2223
**Example:**
2324

24-
{{% hextra/jupyter "example-notebook.ipynb" %}}
25+
{{% hextra/jupyter "example-notebook.ipynb" filename="analysis.ipynb" %}}

content/content-formatting-examples/markdown/code.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,12 @@ draft: true
1010
This is a code block.
1111
```
1212

13+
### Code block with filename
14+
15+
```go {filename="main.go"}
16+
package main
17+
import "fmt"
18+
func main() { fmt.Println("hello") }
19+
```
20+
1321
Inline code like `var foo = "bar";` is supported.

0 commit comments

Comments
 (0)