跳转到内容

Markdown Guide & Syntax

此内容尚不支持你的语言。

HugoBlox uses GitHub Flavored Markdown (GFM) with powerful extensions. This guide covers the essentials for writing content.

Common syntax you’ll use every day.

DescriptionSyntaxResult
Bold**Bold**Bold
Italic*Italic*Italic
Strikethrough~~Strike~~Strike
Subscript<sub>Sub</sub>Sub
Superscript<sup>Super</sup>Super
Underline<ins>Underline</ins>Underline
Code`Code`Code
Link[Link](url)Link

Highlight critical information using GitHub-style callouts.

Syntax

> [!NOTE]
> Useful information.
> [!TIP]
> Helpful advice.
> [!WARNING]
> Urgent warning!

Preview

Display code snippets with automatic highlighting.

```python {2}
def hello():
print("Hello, world!") # This line is highlighted!
```

For non-standard languages, you may need to enable them in your configuration.

Advanced rendering for technical content.

Inline: $E = mc^2$

Block:

$$
E = mc^2
$$

Math is auto-detected, but you can always force it to be parsed with the front matter: math: true.

Shortcodes are special Hugo templates that insert rich components.

ShortcodeDescriptionExample Input
ButtonsCTA links{{< button url="/start/" >}}Get Started{{< /button >}}
IconsSVG icons{{< icon name="hero/rocket" >}}
StepsNumbered lists{{< steps >}} ... {{< /steps >}}
SpoilersCollapsible details{{< spoiler text="Click me" >}}Content{{< /spoiler >}}
TOCIn-page Table of Contents{{< toc >}}

Render Jupyter Notebooks (.ipynb) directly in your content. Preserves code, markdown, and rich outputs (plots, HTML, JSON).

Local File (in assets/notebooks/ or page bundle):

{{< notebook src="analysis.ipynb" >}}

Remote URL:

{{< notebook src="https://raw.githubusercontent.com/user/repo/main/demo.ipynb" >}}

Use standard syntax for best compatibility, but shortcodes offer more control.

# Video with poster
{{< video src="demo.mp4" poster="thumb.jpg" >}}
# Audio player
{{< audio src="podcast.mp3" >}}
# YouTube/Vimeo/etc.
{{< embed src="https://www.youtube.com/watch?v=..." >}}
# Figure with caption
{{< figure src="image.jpg" caption="My Image" >}}
  • Relative Links: Use [Link](../page) instead of full URLs. This keeps links working in previews and forks.
  • Asset Location: Keep images in assets/media/ for global use, or in the page bundle for page-specific use.
  • Accessibility: Always add alt text to images: ![Alt text](image.jpg).