You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/content-formatting-examples/index.md
+41-9Lines changed: 41 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -522,47 +522,75 @@ Renders an inline SVG icon from `data/hextra/icons.yaml`. Useful for embedding i
522
522
Embeds a PDF file in a responsive iframe.
523
523
524
524
```text
525
-
{{</* hextra/pdf "/path/to/sample.pdf" */>}}
525
+
{{</* hextra/pdf "sample.pdf" */>}}
526
526
```
527
527
528
-
Supply a valid PDF path (page-bundle resource, asset, or absolute path) to render the embedded viewer.
528
+
**Parameters:**
529
+
530
+
| Parameter | Description | Default |
531
+
|-----------|-------------|---------|
532
+
| positional | Path to the PDF file (page resource, asset, or absolute path) |_(required)_|
533
+
534
+
**Example:**
535
+
536
+
{{< hextra/pdf "sample.pdf" >}}
529
537
530
538
---
531
539
532
540
### Include
533
541
534
-
Includes the rendered content of another page inline. The parameter is the page path (relative to the content directory, without the file extension).
542
+
Includes the rendered content of another page inline. This shortcode **must** use the percent-delimiter syntax.
535
543
536
544
```text
537
-
{{%/* hextra/include "page-path" */%}}
545
+
{{%/* hextra/include "include-snippet" */%}}
538
546
```
539
547
548
+
**Parameters:**
549
+
550
+
| Parameter | Description | Default |
551
+
|-----------|-------------|---------|
552
+
| positional | Page path relative to the content directory |_(required)_|
553
+
554
+
**Example (included from a separate page):**
555
+
556
+
{{% hextra/include "include-snippet" %}}
557
+
540
558
---
541
559
542
560
### Term
543
561
544
-
Wraps a glossary term in an `<abbr>` tooltip. Definitions are sourced from `data/<lang>/termbase.yaml` (e.g., `data/en/termbase.yaml`).
562
+
Wraps a glossary term in an `<abbr>` tooltip. Hover over the highlighted terms below to see their definitions. Definitions are sourced from `data/<lang>/termbase.yaml`.
545
563
546
564
```text
547
565
{{</* hextra/term "API" */>}}
548
566
```
549
567
550
-
To use this shortcode, create a termbase data file. For example, `data/en/termbase.yaml`:
568
+
**Parameters:**
569
+
570
+
| Parameter | Description | Default |
571
+
|-----------|-------------|---------|
572
+
|`entry`| Glossary abbreviation or full term (named or positional) |_(required)_|
573
+
574
+
To use this shortcode, create a termbase data file at `data/en/termbase.yaml`:
551
575
552
576
```yaml
553
577
- abbr: API
554
578
term: Application Programming Interface
555
579
definition: A set of protocols for building software.
556
580
```
557
581
582
+
**Examples:**
583
+
584
+
Hugo is an {{< hextra/term "SSG" >}} that can be controlled via its {{< hextra/term "CLI" >}}. Configuration is written in {{< hextra/term "YAML" >}} and sites are commonly served through a {{< hextra/term "CDN" >}}. Most projects use a {{< hextra/term "CI/CD" >}} pipeline to deploy changes automatically. The theme exposes a rich {{< hextra/term "API" >}} of shortcodes and partials.
585
+
558
586
---
559
587
560
588
### Jupyter
561
589
562
590
Renders a Jupyter Notebook (`.ipynb`) as code blocks and Markdown cells.
This paragraph was pulled in from a separate page using the `hextra/include` shortcode. It demonstrates how you can compose content from multiple sources into a single page.
10
+
11
+
- Included content supports **full Markdown** formatting.
12
+
- Lists, `code`, and _emphasis_ all render correctly.
0 commit comments