From ac4cbf89ec50ad3a747ace3ec36402f0313eb0e3 Mon Sep 17 00:00:00 2001 From: wompmacho Date: Sun, 12 Apr 2026 06:56:36 +0000 Subject: [PATCH] take 3 --- projects/hugo/hugo_shortcodes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/hugo/hugo_shortcodes.md b/projects/hugo/hugo_shortcodes.md index 24213d5..e26975b 100644 --- a/projects/hugo/hugo_shortcodes.md +++ b/projects/hugo/hugo_shortcodes.md @@ -16,19 +16,19 @@ Custom shortcodes defined in `layouts/shortcodes/`. * **`include`**: Inject the contents of external files into your page. Supports local Hugo content paths and absolute paths mounted from the host (e.g., `/srv/configs/...`, `/srv/dev/hugo/wiki/...`). **CRITICAL: Angle Brackets (`< >`) vs. Percentage Signs (`% %`)** - * Use **`{{%/* %*/}}`** when you want the included text to be **parsed as Markdown**. This is required when including other `.md` files so their headers, lists, and links render properly. - * Use **`{{*/}}`** to output the raw text directly *without* Markdown processing. + * Use **`{{% include %}}`** when you want the included text to be **parsed as Markdown**. This is required when including other `.md` files so their headers, lists, and links render properly. + * Use **`{{< include >}}`** to output the raw text directly *without* Markdown processing. **Example 1: Including another Markdown file** ```markdown - {{/*% include "/srv/dev/hugo/wiki/README.md" %*/}} + {{% /* include "/srv/dev/hugo/wiki/README.md" */ %}} ``` **Example 2: Including raw code into a Code Block** Wrap the shortcode in standard Markdown code fences to syntax-highlight an external configuration file: ````markdown ```yaml - {{/*% include "/srv/configs/docker_compose/homepage/docker-compose.yaml" %*/}} + {{% /* include "/srv/configs/docker_compose/homepage/docker-compose.yaml" */ %}} ``` ```` * **`video`**: Embed local or remote videos.