Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
350fc82d
Y
yanglr2010
项目概览
大白技术控
/
yanglr2010
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yanglr2010
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
350fc82d
编写于
7月 27, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Add support with toc & reward & copyright in front-matter
上级
7c312722
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
10 deletion
+23
-10
docs/zh-CN/advanced/theme-config.md
docs/zh-CN/advanced/theme-config.md
+19
-7
layout/_common/sidebar.pug
layout/_common/sidebar.pug
+1
-1
layout/post.pug
layout/post.pug
+3
-2
未找到文件。
docs/zh-CN/advanced/theme-config.md
浏览文件 @
350fc82d
...
...
@@ -225,7 +225,7 @@ gallery_waterfall:
![](
https://raw.githubusercontent.com/liuyib/picBed/master/hexo-theme-stun/doc/20190724170138.png
)
::: tip
-
启用瀑布流效果后,还可以再启用
[
fancybox 效果
](
http
://localhost:8080
/hexo-theme-stun/zh-CN/advanced/assist.html#fancybox
)
。
-
启用瀑布流效果后,还可以再启用
[
fancybox 效果
](
http
s://liuyib.github.io
/hexo-theme-stun/zh-CN/advanced/assist.html#fancybox
)
。
-
通常利用
`photos`
这个属性,来建立一个相册页面 或 专门展示图片的文章。
:::
...
...
@@ -237,15 +237,27 @@ gallery_waterfall:
-
`top_image: https://xxxx.jpg`
<Badge
text=
"stable"
/>
用于设置文章顶部的大图。详情:
[
指定顶部图
](
http
://localhost:8080
/hexo-theme-stun/zh-CN/advanced/theme-config.html#指定顶部图
)
用于设置文章顶部的大图。详情:
[
指定顶部图
](
http
s://liuyib.github.io
/hexo-theme-stun/zh-CN/advanced/theme-config.html#指定顶部图
)
-
`toc_max_depth: 6`
<Badge
text=
"stable"
/>
用于设置文章中,解析标题生成目录的最大深度。取值
`1 ~ 6`
。例如:
`toc_max_depth: 3`
,只会解析文中的
`h1`
,
`h2`
,
`h3`
来生成目录。详情:
[
文章目录
](
http
://localhost:8080
/hexo-theme-stun/zh-CN/advanced/theme-config.html#文章目录
)
用于设置文章中,解析标题生成目录的最大深度。取值
`1 ~ 6`
。例如:
`toc_max_depth: 3`
,只会解析文中的
`h1`
,
`h2`
,
`h3`
来生成目录。详情:
[
文章目录
](
http
s://liuyib.github.io
/hexo-theme-stun/zh-CN/advanced/theme-config.html#文章目录
)
-
`math: true`
<Badge
text=
"stable"
/>
<Badge
text=
"v1.1.2"
/>
是否需要解析数学公式。详情:
[
数学公式
](
http://localhost:8080/hexo-theme-stun/zh-CN/advanced/third-part.html#数学公式
)
是否需要解析数学公式。详情:
[
数学公式
](
https://liuyib.github.io/hexo-theme-stun/zh-CN/advanced/third-part.html#数学公式
)
-
`toc: true`
<Badge
text=
"stable"
/>
<Badge
text=
"v1.2.0"
/>
文章是否启用目录。会覆盖主题配置文件中的全局设置。详情:
[
文章目录
](
https://liuyib.github.io/hexo-theme-stun/zh-CN/advanced/theme-config.html#%E6%96%87%E7%AB%A0%E7%9B%AE%E5%BD%95
)
-
`reward: true`
<Badge
text=
"stable"
/>
<Badge
text=
"v1.2.0"
/>
文章是否启用打赏功能。会覆盖主题配置文件中的全局设置。详情:
[
赞赏码
](
https://liuyib.github.io/hexo-theme-stun/zh-CN/advanced/theme-config.html#%E8%B5%9E%E8%B5%8F%E7%A0%81
)
-
`copyright: true`
<Badge
text=
"stable"
/>
<Badge
text=
"v1.2.0"
/>
文章是否启用版权信息。会覆盖主题配置文件中的全局设置。详情:
[
知识共享许可协议(cc)
](
https://liuyib.github.io/hexo-theme-stun/zh-CN/advanced/theme-config.html#%E7%9F%A5%E8%AF%86%E5%85%B1%E4%BA%AB%E8%AE%B8%E5%8F%AF%E5%8D%8F%E8%AE%AE%EF%BC%88cc%EF%BC%89
)
---
...
...
@@ -255,11 +267,11 @@ gallery_waterfall:
-
`top: true`
<Badge
text=
"stable"
/>
文章是否置顶。详情:
[
文章置顶
](
http
://localhost:8080
/hexo-theme-stun/zh-CN/advanced/theme-config.html#文章置顶
)
文章是否置顶。详情:
[
文章置顶
](
http
s://liuyib.github.io
/hexo-theme-stun/zh-CN/advanced/theme-config.html#文章置顶
)
-
`no-emoji: true`
<Badge
text=
"disrelated"
type=
"warning"
/>
是否解析文章中的 emoji 代码。详情:
[
添加-emoji-支持
](
http
://localhost:8080
/hexo-theme-stun/zh-CN/advanced/third-part.html#%E6%B7%BB%E5%8A%A0-emoji-%E6%94%AF%E6%8C%81
)
是否解析文章中的 emoji 代码。详情:
[
添加-emoji-支持
](
http
s://liuyib.github.io
/hexo-theme-stun/zh-CN/advanced/third-part.html#%E6%B7%BB%E5%8A%A0-emoji-%E6%94%AF%E6%8C%81
)
## Favicon <Badge text="stable"/>
...
...
@@ -551,7 +563,7 @@ toc:
max_depth: 6
```
其中 `expand_all` <Badge text="v1.0.2"/>
其中 `expand_all` <Badge text="v1.0.2"/>
。可以在文章的 markdown 源文件中的 `Front-matter` 里,指定 `toc: true / false` 来设置某篇文章是否启用目录。
## 订阅设置 <Badge text="stable"/>
...
...
layout/_common/sidebar.pug
浏览文件 @
350fc82d
aside#sidebar
div.sidebar-inner
- var isShowPostToc =
theme.toc.enable && is_post(
)
- var isShowPostToc =
page.toc === false ? page.toc : (theme.toc.enable && is_post()
)
if isShowPostToc
div.sidebar-nav
span.sidebar-nav-toc.current= _p("sidebar.catalog")
...
...
layout/post.pug
浏览文件 @
350fc82d
...
...
@@ -20,7 +20,8 @@ block content
span= _p("post.end")
span= "------"
if theme.creative_commons.enable && theme.creative_commons.post
- let themeConfigCC = theme.creative_commons.enable && theme.creative_commons.post
if page.copyright === false ? page.copyright : themeConfigCC
include ./_components/copyright.pug
if theme.post_widget.tags
...
...
@@ -30,7 +31,7 @@ block content
each tag in page.tags.data
span!= link_to(tag.permalink, tag.name)
if
theme.reward && theme.reward.enable
if
page.reward === false ? page.reward : (theme.reward && theme.reward.enable)
include ./_components/reward.pug
include ./_components/pagination.pug
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录