mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge pull request #2656 from ZhenShuo2021/feat/codeblock-title
✨ Feat: support title in code block
This commit is contained in:
@@ -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
|
||||
<!DOCTYPE html>
|
||||
@@ -80,23 +80,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block indented with four spaces
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### 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"]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -107,7 +93,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
## List Types
|
||||
|
||||
|
||||
@@ -80,34 +80,20 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
|
||||
</html>
|
||||
```
|
||||
|
||||
### 4スペースのインデントによるコードブロック
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>HTML5 資料の例</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>テスト</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### Hugo 内のショートコード・ハイライトを利用したコードブロック
|
||||
|
||||
{{< highlight html "linenos=table,hl_lines=4 7-9" >}}
|
||||
### タイトルと行ハイライト機能付きのコードブロック
|
||||
|
||||
```html {title="example.html" lineNos=inline hl_lines=[4,"7-9"]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>HTML5 資料の例</title>
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>テスト</p>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
## リスト形式
|
||||
|
||||
|
||||
@@ -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
|
||||
<!DOCTYPE html>
|
||||
@@ -80,23 +80,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block indented with four spaces
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### 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"]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -107,7 +93,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
## List Types
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
|
||||
|
||||
## 代码块
|
||||
|
||||
### 带反引号的代码块
|
||||
### 一般的代码块
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
@@ -80,23 +80,9 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
|
||||
</html>
|
||||
```
|
||||
|
||||
### 缩进四个空格的代码块
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### 带有 Hugo 内部高亮简码的代码块
|
||||
|
||||
{{< highlight html "linenos=table,hl_lines=4 7-9" >}}
|
||||
### 带有标题和行高亮的代码块
|
||||
|
||||
```html {title="example.html" lineNos=inline hl_lines=[4,"7-9"]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -107,7 +93,7 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
## 列表
|
||||
|
||||
|
||||
Reference in New Issue
Block a user