Merge pull request #2465 from ZhenShuo2021/feat/timeline-md

 Feat(timeline): support markdown content
This commit is contained in:
Nuno C.
2025-09-15 23:08:24 +01:00
committed by GitHub
5 changed files with 17 additions and 8 deletions

View File

@@ -721,6 +721,7 @@ The `timeline` creates a visual timeline that can be used in different use-cases
<!-- prettier-ignore-start -->
| Parameter | Description |
| ----------- | -------------------------------------------- |
| `md` | render the content as Markdown (true/false) |
| `icon` | the icon to be used in the timeline visuals. |
| `header` | header for each entry |
| `badge` | text to place within the top right badge |

View File

@@ -718,6 +718,7 @@ B-->C[利益]
<!-- prettier-ignore-start -->
| パラメータ | 説明 |
| ----------- | -------------------------------------------- |
| `md` | コンテンツを Markdown としてレンダリングする (true/false) |
| `icon` | タイムラインのビジュアルで使用するアイコン |
| `header` | 各エントリのヘッダーー |
| `badge` | 右上のバッジ内に配置するテキスト |

View File

@@ -728,7 +728,8 @@ The `timeline` creates a visual timeline that can be used in different use-cases
<!-- prettier-ignore-start -->
| Parameter | Description |
| ----------- | -------------------------------------------- |
| `icon` | the icon to be used in the timeline visuals. |
| `md` | render the content as Markdown (true/false) |
| `icon` | the icon to be used in the timeline visuals |
| `header` | header for each entry |
| `badge` | text to place within the top right badge |
| `subheader` | entry's subheader |

View File

@@ -730,8 +730,9 @@ B-->C[Profit]
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ----------- | ------------------------ |
| `icon` | 要在时间线中使用的图标。 |
| ----------- | ----------------------------------- |
| `md` | 将内容渲染为 Markdown (true/false) |
| `icon` | 要在时间线中使用的图标 |
| `header` | 每个条目的标题 |
| `badge` | 放置在右上角徽章内的文本 |
| `subheader` | 每个条目的副标题 |

View File

@@ -1,4 +1,5 @@
{{ $icon := .Get "icon" | default "check" }}
{{ $md := .Get "md" | default false }}
{{ $header := .Get "header" }}
{{ $badge := .Get "badge" }}
{{ $subheader := .Get "subheader" }}
@@ -25,7 +26,11 @@
</h4>
{{ end }}
<div class="mb-6">
{{ if $md }}
{{- .Inner | markdownify -}}
{{ else }}
{{- .Inner -}}
{{ end }}
</div>
</div>
</div>