From f487e616bfc0d8c2f92f6cb9d8cb1c63074c5081 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Mon, 15 Dec 2025 21:17:57 +0800 Subject: [PATCH] docs: update code block sample --- .../content/samples/markdown/index.it.md | 22 +++------------- .../content/samples/markdown/index.ja.md | 26 +++++-------------- exampleSite/content/samples/markdown/index.md | 22 +++------------- .../content/samples/markdown/index.zh-cn.md | 22 +++------------- 4 files changed, 18 insertions(+), 74 deletions(-) diff --git a/exampleSite/content/samples/markdown/index.it.md b/exampleSite/content/samples/markdown/index.it.md index f151c04f..96f060c3 100755 --- a/exampleSite/content/samples/markdown/index.it.md +++ b/exampleSite/content/samples/markdown/index.it.md @@ -65,7 +65,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou ## Code Blocks -### Code block with backticks +### General code block ```html @@ -80,23 +80,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou ``` -### Code block indented with four spaces - - - - - - Example HTML5 Document - - -

Test

- - - -### Code block with Hugo's internal highlight shortcode - -{{< highlight html "linenos=table,hl_lines=4 7-9" >}} +### Code block with title and line highlight +```html {title="example.html" lineNos=inline hl_lines=[4,"7-9"]} @@ -107,7 +93,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou

Test

-{{< /highlight >}} +``` ## List Types diff --git a/exampleSite/content/samples/markdown/index.ja.md b/exampleSite/content/samples/markdown/index.ja.md index 270673db..2640cdbd 100755 --- a/exampleSite/content/samples/markdown/index.ja.md +++ b/exampleSite/content/samples/markdown/index.ja.md @@ -80,34 +80,20 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap ``` -### 4スペースのインデントによるコードブロック - - - - - - HTML5 資料の例 - - -

テスト

- - - -### Hugo 内のショートコード・ハイライトを利用したコードブロック - -{{< highlight html "linenos=table,hl_lines=4 7-9" >}} +### タイトルと行ハイライト機能付きのコードブロック +```html {title="example.html" lineNos=inline hl_lines=[4,"7-9"]} - + - HTML5 資料の例 + Example HTML5 Document -

テスト

+

Test

-{{< /highlight >}} +``` ## リスト形式 diff --git a/exampleSite/content/samples/markdown/index.md b/exampleSite/content/samples/markdown/index.md index f151c04f..96f060c3 100755 --- a/exampleSite/content/samples/markdown/index.md +++ b/exampleSite/content/samples/markdown/index.md @@ -65,7 +65,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou ## Code Blocks -### Code block with backticks +### General code block ```html @@ -80,23 +80,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou ``` -### Code block indented with four spaces - - - - - - Example HTML5 Document - - -

Test

- - - -### Code block with Hugo's internal highlight shortcode - -{{< highlight html "linenos=table,hl_lines=4 7-9" >}} +### Code block with title and line highlight +```html {title="example.html" lineNos=inline hl_lines=[4,"7-9"]} @@ -107,7 +93,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou

Test

-{{< /highlight >}} +``` ## List Types diff --git a/exampleSite/content/samples/markdown/index.zh-cn.md b/exampleSite/content/samples/markdown/index.zh-cn.md index db3fee4e..d90cd085 100755 --- a/exampleSite/content/samples/markdown/index.zh-cn.md +++ b/exampleSite/content/samples/markdown/index.zh-cn.md @@ -65,7 +65,7 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap ## 代码块 -### 带反引号的代码块 +### 一般的代码块 ```html @@ -80,23 +80,9 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap ``` -### 缩进四个空格的代码块 - - - - - - Example HTML5 Document - - -

Test

- - - -### 带有 Hugo 内部高亮简码的代码块 - -{{< highlight html "linenos=table,hl_lines=4 7-9" >}} +### 带有标题和行高亮的代码块 +```html {title="example.html" lineNos=inline hl_lines=[4,"7-9"]} @@ -107,7 +93,7 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap

Test

-{{< /highlight >}} +``` ## 列表