发布前提

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
title:
date:
tags:
categories:
keywords:
description:
top_img: (除非特定需要,可以不寫)
comments 是否顯示評論(除非設置false,可以不寫)
cover: 縮略圖
toc: 是否顯示toc (除非特定文章設置,可以不寫)
toc_number: 是否顯示toc數字 (除非特定文章設置,可以不寫)
copyright: 是否顯示版權 (除非特定文章設置,可以不寫)
mathjax:
katex:
hide:
---

文章置顶

1.你要在文章的front-matter区域里添加top: True属性来放入这篇文章置顶。
2.你可以参考hexo-generator-index-pin-top这个仓库来了解更多细节。

举个例子:

你的某篇文章开头如下:
1
2
3
4
5
6
title: xxxx
tags:
- xxx
date: 2018-08-08 08:08:08
---
// ....
现在把top: True加进去:
1
2
3
4
5
6
7
title: xxxx
tags:
- xxx
date: 2018-08-08 08:08:08
top: True
---
// ....

文章隐藏

1.如果想要隐藏文章,可以在文章的Front-matter添加

1
hide: true

为特定的文章配置是否显示TOC和特定的目录章节数字

你在文章的md文件的头部,加入toc_number状语从句:toc项,配置并true或者false即可。

toc是否显示文章TOC

toc_number 是否显示章节数

配置之后你的特定的文章将会拥有它自己的目录数字的显示与否,而不会受累的配置影响。

外挂标签

标签外挂是Hexo独有的功能,并非标准的Markdown格式
用法
1
2
3
4
5
6
7
8
{% note [class] [no-icon] %}
Any content (support inline tags too.io).
{% endnote %}

[class] : default | primary | success | info | warning | danger.
[no-icon] : Disable icon in note.

All parameters are optional.
例如:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{% note default %}
default 提示塊標籤
{% endnote %}

{% note primary no-icon %}
primary 提示塊標籤
{% endnote %}

{% note success %}
success 提示塊標籤
{% endnote %}

{% note info %}
info 提示塊標籤
{% endnote %}

{% note warning %}
warning 提示塊標籤
{% endnote %}

{% note danger %}
danger 提示塊標籤
{% endnote %}

标签

版权

转载文章不需要显示版权

1
copyright: false

画廊相册图库

一个图库集合。
写法
1
2
3
4
5
<div class="gallery-group-main">
{% galleryGroup name description link img-url %}
{% galleryGroup name description link img-url %}
{% galleryGroup name description link img-url %}
</div>
  1. name:图库名字

  2. description:图库描述

  3. link:连接到对应相册的地址

  4. img-url:图库封面的地址

    例如:

    1
    2
    3
    4
    5
    <div class="gallery-group-main">
    {% galleryGroup '壁紙' '收藏的一些壁紙' '/Gallery/wallpaper' https://i.loli.net/2019/11/10/T7Mu8Aod3egmC4Q.png %}
    {% galleryGroup '漫威' '關於漫威的圖片' '/Gallery/marvel' https://i.loli.net/2019/12/25/8t97aVlp4hgyBGu.jpg %}
    {% galleryGroup 'OH MY GIRL' '關於OH MY GIRL的圖片' '/Gallery/ohmygirl' https://i.loli.net/2019/12/25/hOqbQ3BIwa6KWpo.jpg %}
    </div>

    图库

画廊相册

写法:
1
2
3
{% gallery %}
markdown 圖片格式
{% endgallery %}
例如:
1
2
3
4
5
6
7
8
{% gallery %}
![](https://gratisography.com/wp-content/uploads/2019/10/gratisography-scary-pumpkin-hand-900x600.jpg)
![](https://gratisography.com/wp-content/uploads/2019/10/gratisography-fresh-fish-dinner-900x600.jpg)
![](https://gratisography.com/wp-content/uploads/2019/10/gratisography-mountain-cloud-landscape-900x600.jpg)
![](https://picjumbo.com/wp-content/uploads/iphone-free-stock-photos-2210x3315.jpg)
![](https://picjumbo.com/wp-content/uploads/young-millennial-girl-drinking-lemonade-and-overlooking-the-city-2210x1473.jpg)
![](https://picjumbo.com/wp-content/uploads/modern-graphic-designer-essentials_free_stock_photos_picjumbo_HNCK4919-2210x1474.jpg)
{% endgallery %}

图片

# 隐藏标签
如果你想把一些文字,内容隐藏起来,并提供按钮让用户点击显示。可以使用这个标签外挂。

写法:

inline 在文本里面添加按钮隐藏内容,只限文字

(content不能包含当引号,可用&apos;)
1
{% hideInline content,display,bg,color %}
  1. content:文本内容

  2. display:按钮显示的文字(任选)

  3. bg:按钮的背景颜色(任选)

  4. color:按钮文字的颜色(任选)

    block独立的block隐藏内容,可以隐藏很多内容,包括图片,代码块等等

    1
    2
    3
    {% hideBlock display,bg,color %}
    content
    {% endhideBlock %}
  5. content:文本内容

  6. display:按钮显示的文字(任选)

  7. bg:按钮的背景颜色(任选)

  8. color:按钮文字的颜色(任选)

    例如:inline

    1
    2
    3
    哪個英文字母最酷? {% hideInline 因為西裝褲(C裝酷),查看答案,#FF7242,#fff %}

    門裏站着一個人? {% hideInline 閃 %}

    图片

    例如:block

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    {% hideBlock 查看答案 %}
    {% gallery %}
    ![](https://i.loli.net/2019/12/25/Fze9jchtnyJXMHN.jpg)
    ![](https://i.loli.net/2019/12/25/ryLVePaqkYm4TEK.jpg)
    ![](https://i.loli.net/2019/12/25/gEy5Zc1Ai6VuO4N.jpg)
    ![](https://i.loli.net/2019/12/25/d6QHbytlSYO4FBG.jpg)
    ![](https://i.loli.net/2019/12/25/6nepIJ1xTgufatZ.jpg)
    ![](https://i.loli.net/2019/12/25/E7Jvr4eIPwUNmzq.jpg)
    ![](https://i.loli.net/2019/12/25/mh19anwBSWIkGlH.jpg)
    ![](https://i.loli.net/2019/12/25/2tu9JC8ewpBFagv.jpg)
    {% endgallery %}
    {% endhideBlock %}

    图片

steam游戏

使用方法

  • 嵌入单个游戏
    1
    {% steamgame appid description %}
  • 批量嵌入游戏
    1
    2
    3
    4
    5
    6
    7
    8
    {% steamgames %}
    appid
    appid
    appid
    appid
    appid
    appid
    {% endsteamgames %}

    参数

    appid: Steam 游戏 id.
    description(可选): 用于替换默认游戏简介。

    Demo

    1
    {% steamgame 1057090 %}
    1
    {% steamgame 1057090 "I like it." %}
    1
    2
    3
    4
    {% steamgames %}
    261570
    1057090
    {% endsteamgames %}

    License

    MIT

播放器

使用

标签参数

  • title : 曲目标题
  • author: 曲目作者
  • url: 音乐文件 URL 地址
  • picture_url: (可选) 音乐对应的图片地址
  • narrow: (可选)播放器袖珍风格
  • autoplay: (可选) 自动播放,移动端浏览器暂时不支持此功能
  • width:xxx: (可选) 播放器宽度 (默认: 100%)
  • lrc:xxx: (可选)歌词文件 URL 地址
1
{% aplayer "寻" "华晨宇" "https://link.hhtjim.com/163/472137749.mp3" "/music/xun.png" %}

        
1
{% meting "2802022828" "netease" "playlist" "autoplay" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%}