{% note 'danger modern' %}
內置的外掛標籤滿足大部分用戶的需求,不需要額外安裝插件。
插件的外掛標籤需要安裝對應的插件,滿足部分用戶的特殊需求。
{% endnote %}
內置標籤#
Article#
文章列表標籤,用於顯示文章列表。
{% tabs Article %}
{% article %}
参数 | 说明 | 默认值 |
---|---|---|
path | 文章路徑 | 無 |
{% article 'p/96204d3d.html' %}
{% article 'p/96204d3d.html' %}
{% endtabs %}
Chart#
圖表標籤,用於顯示圖表。
打開配置文件中開關
chart: true
{% tabs Chart %}
{% chart %}
不需要參數。
{% chart %}
{% endchart %}
{% chart %}
type: 'bar',
data: {
labels: [' 紅 ', ' 藍 ', ' 黃 ', ' 綠 ', ' 紫 ', ' 橙 '],
datasets: [{
label: '# 的投票 ',
data: [12, 19, 3, 5, 2, 3],
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true,
}
}
}
{% endchart %}
{% endtabs %}
Gallery#
圖片列表標籤,用於顯示圖片列表。
{% tabs gallery %}
{% gallery %}
{% endgallery %}
{% gallery %}





{% endgallery %}
{% gallery %}
{% endgallery %}
{% endtabs %}
GalleryGroup#
圖片組標籤,用於顯示圖片組。
{% tabs GalleryGroup %}
{% galleryGroup 'name' 'desc' 'url' 'img' %}
参数 | 说明 | 默认值 |
---|---|---|
name | 圖片組名稱 | 無 |
desc | 圖片組描述 | 無 |
url | 圖片組鏈接 | 無 |
img | 圖片組預覽圖 | 無 |
<div class='gallery-group-main'>
{% galleryGroup '旅行' '出行拍攝的雜七雜八' 'https://hsbc.com.cv' 'https://s3.qjqq.cn/47/674c6e226855e.png!color' %}
{% galleryGroup '旅行' '出行拍攝的雜七雜八' 'https://hsbc.com.cv' 'https://s3.qjqq.cn/47/674c6e5d63fda.png!color' %}
</div>
{% endtabs %}
Mermaid#
Mermaid 標籤,用於顯示 Mermaid 圖表。
mermaid: true
{% tabs Mermaid %}
{% mermaid %}
content
{% endmermaid %}
{% mermaid %}
pie
title 產品 X 的關鍵元素
"鈣" : 42.96
"鉀" : 50.05
"鎂" : 10.01
"鐵" : 5
{% endmermaid %}
{% endtabs %}
Typeit#
Typeit 標籤,用於顯示 Typeit 動畫。
typeit: true
{% tabs Typeit %}
{% typeit 'div' %}
options
{% endtypeit %}
参数 | 说明 | 默认值 |
---|---|---|
div | 標籤名 | 無 |
{% typeit 'div' }
waitUntilVisible: true,
strings: "Alex MacArthur",
{% endtypeit %}
{% typeit 'div' %}
waitUntilVisible: true,
strings: "Alex MacArthur"
{% endtypeit %}
{% endtabs %}
Tabs#
標籤頁標籤,用於顯示標籤頁。
{% tabs Tabs %}
{% tabs 唯一名稱, [index] %}
<!-- tab [唯一Tab] [@icon] -->
任何內容(也支持內聯標籤)。
<!-- endtab -->
{% endtabs %}
{% tabs test1 %}
<!-- tab -->
**這是標籤 1。**
<!-- endtab -->
<!-- tab -->
**這是標籤 2。**
<!-- endtab -->
<!-- tab -->
**這是標籤 3。**
<!-- endtab -->
{% endtabs %}
{% note 'primary flat' 'fas fa-wand-magic-sparkles' %}
基礎
{% endnote %}
{% tabs test1 %}
這是標籤 1。
這是標籤 2。
這是標籤 3。
{% endtabs %}
{% note 'primary flat' 'fas fa-wand-magic-sparkles' %}
預選擇標籤
{% endnote %}
{% tabs test2 2 %}
這是標籤 1。
這是標籤 2。
這是標籤 3。
{% endtabs %}
{% endtabs %}
插件標籤#
安裝插件
npm i hexo-solitude-tag
Youtube#
Youtube 標籤,用於顯示 Youtube 視頻。
{% tabs Youtube %}
{% youtube video_id [type] [cookie] %}
参数 | 说明 | 默认值 |
---|---|---|
video_id | 視頻 ID | 無 |
type | 視頻類型 | video |
cookie | 是否使用 cookie | false |
{% youtube 'P2BTRcX0AV0' %}
{% youtube 'P2BTRcX0AV0' %}
{% endtabs %}
Bilibili#
Bilibili 標籤,用於顯示 Bilibili 視頻。
{% tabs Bilibili %}
{% bvideo video_id %}
参数 | 说明 | 默认值 |
---|---|---|
video_id | 視頻 ID | 無 |
{% bvideo 'BV1jb4y1j7eM' %}
{% bvideo 'BV1jb4y1j7eM' %}
{% endtabs %}
Audio#
Audio 標籤,用於顯示音頻。
{% tabs Audio %}
{% audio url %}
参数 | 说明 | 默认值 |
---|---|---|
url | 音頻鏈接 | 無 |
{% audio 'https://music.163.com/song/media/outer/url?id=1973678968.mp3' %}
{% audio 'https://music.163.com/song/media/outer/url?id=1973678968.mp3' %}
{% endtabs %}
Video#
Video 標籤,用於顯示視頻。
{% tabs Video %}
{% video url %}
参数 | 说明 | 默认值 |
---|---|---|
url | 視頻鏈接 | 無 |
{% video 'https://media.w3.org/2010/05/sintel/trailer.mp4' %}
{% video 'https://media.w3.org/2010/05/sintel/trailer.mp4' %}
{% endtabs %}
Videos#
Videos 標籤,用於顯示視頻列表。
{% tabs Videos %}
{% videos [col] %}
{% endvideos %}
参数 | 说明 | 默认值 |
---|---|---|
col | 列數 | 1 |
{% videos 2 %}
{% video 'https://media.w3.org/2010/05/sintel/trailer.mp4' %}
{% video 'https://media.w3.org/2010/05/bunny/trailer.mp4' %}
{% endvideos %}
{% videos 2 %}
{% video 'https://media.w3.org/2010/05/sintel/trailer.mp4' %}
{% video 'https://media.w3.org/2010/05/bunny/trailer.mp4' %}
{% endvideos %}
{% endtabs %}
P#
沒錯,就是 P 標籤。
{% tabs P %}
{% p [cls] [content] %}
参数 | 说明 | 默认值 |
---|---|---|
cls | 類名 | 無 |
content | 內容 | 無 |
cls: center, left, right, h1, h2, h3, h4, h5, h6, red, green, blue, yellow, purple, orange, gray
{% p 'center h2' 'Hello World!' %}
{% p 'center h2' 'Hello World!' %}
{% endtabs %}
Span#
沒錯,就是 Span 標籤。
{% tabs Span %}
{% span [cls] [content] %}
参数 | 说明 | 默认值 |
---|---|---|
cls | 類名 | 無 |
content | 內容 | 無 |
{% span 'red h2' 'Hello World!' %}
{% span 'red h2' 'Hello World!' %}
{% endtabs %}
Fold#
折疊標籤,用於顯示折疊內容。
{% tabs Fold %}
{% fold 'title' open %}
content
{% endfold %}
参数 | 说明 | 默认值 |
---|---|---|
title | 標題 | 無 |
open | 是否展開 | 不填不顯示 |
{% fold 'title' open %}
content
{% endfold %}
{% fold 'title' open %}
content
{% endfold %}
{% endtabs %}
Img#
圖片標籤,用於顯示圖片。
{% tabs Img %}
{% img url [alt] [style] %}
参数 | 说明 | 默认值 |
---|---|---|
url | 圖片鏈接 | 無 |
alt | 圖片描述 | 無 |
style | 圖片樣式 | 無 |
{% img 'https://hsbc.com.cv/pic/avatar.jpeg/cover' 'cover' 'width: 200px' %}
{% endtabs %}
Inline Img#
內聯圖片標籤,用於顯示內聯圖片。
{% tabs InlineImg %}
{% inline_img url [alt] [style] %}
参数 | 说明 | 默认值 |
---|---|---|
url | 圖片鏈接 | 無 |
alt | 圖片描述 | 無 |
style | 圖片樣式 | 無 |
{% inline_img 'https://hsbc.com.cv/pic/avatar.jpeg/cover' 'cover' '20px' %}
{% endtabs %}
Note#
Note 標籤,用於顯示提示。
{% tabs Note %}
{% note 'type' 'icon' %}
content
{% endnote %}
参数 | 说明 | 默认值 |
---|---|---|
type | 類型 | 無 |
icon | 圖標 | 無 |
type: primary, success, warning, danger, info, modern, flat, simple
icon: fantawesome 圖標(例如: fas fa-mail)
{% note 'danger modern' 'fas fa-wand-magic-sparkles' %}
content
{% endnote %}
{% note 'danger modern' 'fas fa-wand-magic-sparkles' %}
content
{% endnote %}
{% endtabs %}
Card#
Card 標籤,用於顯示卡片。
{% tabs Card %}
{% card 'title','url','cover','score','desc','icon','tag','width','height' %}
参数 | 说明 | 默认值 |
---|---|---|
title | 標題 | 無 |
url | 鏈接 | 無 |
cover | 封面 | 無 |
score | 評分 | 無 |
desc | 評價 | 無 |
icon | 圖標 | 無 |
tag | 標籤 | 無 |
width | 寬度 | 無 |
height | 高度 | 無 |
{% card '詭秘之主','https://book.qidian.com/info/1010868264/','https://bookcover.yuewen.com/qdbimg/349573/1010868264/300','4.5','第一次接觸這種西方文學小說,剛開始感覺看不懂,斷斷續續看了很多次。後來越看越覺好看,每次看甚至都需要查“文檔”','fa-solid fa-book-open','小說' %}
{% card ' 詭秘之主 ','https://book.qidian.com/info/1010868264/','https://bookcover.yuewen.com/qdbimg/349573/1010868264/300','4.5',' 第一次接觸這種西方文學小說,剛開始感覺看不懂,斷斷續續看了很多次。後來越看越覺好看,每次看甚至都需要查 “文檔”','fa-solid fa-book-open',' 小說 ' %}
{% endtabs %}
Link#
用於展示鏈接
{% tabs Link %}
{% link 'titke' 'subtitke' 'url' %}
参数 | 说明 | 默认值 |
---|---|---|
title | 標題 | 無 |
subtitke | 副標題 | 無 |
url | 鏈接 | 無 |
{% link 'Solitude' '一款簡潔優雅並易用的 Hexo 博客主題' 'https://solitude.js.org/zh' %}
{% link 'Solitude' ' 一款簡潔優雅並易用的 Hexo 博客主題 ' 'https://solitude.js.org/zh' %}
{% endtabs %}
Checkbox#
展示複選框
{% tabs checkbox %}
{% checkbox 'style' 'checked' 'content' %}
参数 | 说明 | 默认值 |
---|---|---|
style | 樣式 | 無 |
checked | 是否選中 | checked |
content | 內容 | 無 |
{% checkbox 'times red' checked '選中' %}
{% checkbox 'plus blue' 'checked' '未選中' %}
{% checkbox 'times red' checked ' 選中 ' %}
{% checkbox 'plus blue' 'checked' ' 未選中 ' %}
{% endtabs %}
Button#
展示按鈕
{% tabs Button %}
{% button 'icon' 'content' 'url' %}
参数 | 说明 | 默认值 |
---|---|---|
icon | 圖標 | 無 |
content | 內容 | 無 |
url | 鏈接 | 無 |
{% button 'fas fa-wand-magic-sparkles' '按鈕' 'https://hsbc.com.cv/zh' %}
{% button 'fas fa-wand-magic-sparkles' ' 按鈕 ' 'https://hsbc.com.cv/zh' %}
{% endtabs %}
Github Repo#
展示 Github 倉庫
{% tabs GithubRepo %}
{% github 'repo' %}
参数 | 说明 | 默认值 |
---|---|---|
repo | 倉庫 | 無 |
{% github 'dstansice/hexo-theme-solitude' %}
{% github 'dstansice/hexo-theme-solitude' %}
{% endtabs %}
Gitea Repo#
展示 Gitea 倉庫
{% tabs GiteaRepo %}
{% gitea 'server' 'repo' %}
参数 | 说明 | 默认值 |
---|---|---|
server | 伺服器 | 無 |
repo | 倉庫 | 無 |
{% gitea 'https://git.fsfe.org' 'FSFE/fsfe-website' %}
{% gitea 'https://git.fsfe.org' 'FSFE/fsfe-website' %}
{% endtabs %}
Gitee Repo#
展示 Gitee 倉庫
{% tabs GiteeRepo %}
{% gitee 'repo' %}
参数 | 说明 | 默认值 |
---|---|---|
repo | 倉庫 | 無 |
{% gitee 'skycf/small-rocket-lua-file-backup' %}
{% gitee 'skycf/small-rocket-lua-file-backup' %}
{% endtabs %}
Gitlab Repo#
展示 Gitlab 倉庫
{% tabs GitlabRepo %}
{% gitlab 'id' %}
参数 | 说明 | 默认值 |
---|---|---|
id | 倉庫 ID | 無 |
{% gitlab 'gitlab-org/gitlab' %}
{% gitlab 'gitlab-org/gitlab' %}
{% endtabs %}
Bubble#
展示氣泡
{% tabs Bubble %}
{% bubble 'content' 'notation' 'color' %}
参数 | 说明 | 默认值 |
---|---|---|
content | 內容 | 無 |
notation | 符號 | 無 |
color | 顏色 | 無 |
{% bubble '我是一段文字內容,這是我寫的東西' '我是提示文字' 'red' %}
{% bubble ' 我是一段文字內容,這是我寫的東西 ' ' 我是提示文字 ' 'blue' %}
{% endtabs %}
Keyboard#
展示鍵盤按鍵
{% tabs Keyboard %}
{% keyboard 'key' %}
参数 | 说明 | 默认值 |
---|---|---|
key | 按鍵 | 無 |
{% keyboard 'ctrl' %}
{% keyboard 'ctrl' %}
{% endtabs %}
Spoiler#
展示劇透
{% tabs Spoiler %}
{% spoiler 'style' 'content' %}
参数 | 说明 | 默认值 |
---|---|---|
style | 樣式 | blur / block |
content | 內容 | 無 |
{% spoiler 'block' '我是一段文字內容,這是我寫的東西' %}
{% spoiler 'blur' '我是一段文字內容,這是我寫的東西' %}
{% spoiler 'block' ' 我是一段文字內容,這是我寫的東西 ' %}
{% spoiler 'blur' ' 我是一段文字內容,這是我寫的東西 ' %}
{% endtabs %}