2023-10-20 09:11:26 +08:00
|
|
|
---
|
2023-10-20 09:26:04 +08:00
|
|
|
title: Linear 入门
|
2023-10-20 11:19:36 +08:00
|
|
|
top: 2
|
2023-10-20 09:11:26 +08:00
|
|
|
categories:
|
|
|
|
- Hexo
|
|
|
|
status: doing
|
|
|
|
---
|
|
|
|
|
2023-10-20 11:19:36 +08:00
|
|
|
# hexo配置
|
2023-10-20 09:11:26 +08:00
|
|
|
|
2023-10-20 11:19:36 +08:00
|
|
|
在 `hexo` 的 `_config.yml` 中调整
|
|
|
|
|
|
|
|
## 基础配置
|
|
|
|
|
|
|
|
```yml
|
|
|
|
# 网页标题
|
|
|
|
title: 17px blog
|
|
|
|
# 侧边栏顶部显示
|
|
|
|
subtitle: "Mozzie"
|
|
|
|
# 用于SEO的html元描述
|
|
|
|
description: ""
|
|
|
|
# 用于SEO的html关键字
|
|
|
|
keywords:
|
|
|
|
# 文章版权声明显示作者名称
|
|
|
|
author: Mozzie
|
|
|
|
|
|
|
|
# 在此处设置您的网站url
|
|
|
|
url: https://mozzie.cn
|
|
|
|
```
|
|
|
|
|
|
|
|
## 国际化切换
|
|
|
|
|
|
|
|
```yml
|
|
|
|
language: en
|
|
|
|
```
|
|
|
|
|
|
|
|
## 文章语法高亮
|
|
|
|
|
|
|
|
```yml
|
|
|
|
# 关闭hexo默认的highlight.js语法高亮
|
|
|
|
highlight:
|
|
|
|
enable: false
|
|
|
|
line_number: true
|
|
|
|
auto_detect: false
|
|
|
|
tab_replace: ""
|
|
|
|
wrap: true
|
|
|
|
hljs: false
|
|
|
|
prismjs:
|
|
|
|
enable: true
|
|
|
|
preprocess: true
|
|
|
|
line_number: true
|
|
|
|
line_threshold: 0
|
|
|
|
tab_replace: ""
|
|
|
|
```
|
|
|
|
|
|
|
|
## algolia搜索
|
|
|
|
|
|
|
|
```yml
|
|
|
|
# search service
|
|
|
|
algolia:
|
|
|
|
# 替换
|
|
|
|
appId: appId
|
|
|
|
# 替换
|
|
|
|
apiKey: apiKey
|
|
|
|
# 请勿泄露,用于上报,替换
|
|
|
|
adminApiKey: adminApiKey
|
|
|
|
# 替换
|
|
|
|
SearchOnlyAPIKey: SearchOnlyAPIKey
|
|
|
|
chunkSize: 5000
|
|
|
|
# 替换
|
|
|
|
indexName: indexName
|
|
|
|
fields:
|
|
|
|
- content:strip
|
|
|
|
- categories
|
|
|
|
- date
|
|
|
|
- permalink
|
|
|
|
- slug
|
|
|
|
- tags
|
|
|
|
- title
|
|
|
|
```
|
|
|
|
|
|
|
|
# Linear主题配置
|
|
|
|
|
|
|
|
下面的配置基于 `hexo-theme-linear` 下的 `_config.yml`
|
|
|
|
|
|
|
|
## 文章分类图标
|
|
|
|
|
|
|
|
按照顺序,依次设置 `svg` 图标,可以在 [xicon](https://www.xicons.org/) 方面的获取丰富的图标
|
|
|
|
|
|
|
|
```yml
|
|
|
|
postCategoryIcons:
|
|
|
|
- <svg>...</svg>
|
|
|
|
- <svg>...</svg>
|
|
|
|
- <svg>...</svg>
|
|
|
|
```
|
|
|
|
|
|
|
|
## 天气卡片
|
|
|
|
|
|
|
|
[和风天气API - 注册](https://id.qweather.com/#/register)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
weather:
|
|
|
|
enable: true
|
|
|
|
# 替换
|
|
|
|
cityCode: cityCode
|
|
|
|
appKey: appKey
|
|
|
|
```
|
|
|
|
|
|
|
|
配置中的 `cityCode` 可以在 [官方的地区列表仓库](https://github.com/qwd/LocationList) 中的 `China-City-List-latest.csv` 找到你所在城市的 `cityCode`
|
|
|
|
|
|
|
|
## 网站图标 favicon
|
|
|
|
|
|
|
|
- 支持 `svg`
|
|
|
|
- 支持 `图片url`,如:`/img/favicon.png`
|
|
|
|
|
|
|
|
```yml
|
|
|
|
favicon: ''
|
|
|
|
```
|
|
|
|
|
|
|
|
## ICP备案号
|
|
|
|
|
|
|
|
😁 如不需要备案号,可直接删除
|
|
|
|
|
|
|
|
```yml
|
|
|
|
icp: 苏ICP备xxxxxxx号-x
|
|
|
|
```
|
|
|
|
|
|
|
|
## 首页底部文字
|
|
|
|
|
|
|
|
😁 如不需要,可直接删除,或者改为 `false`
|
|
|
|
|
|
|
|
```yml
|
|
|
|
motto: false
|
|
|
|
```
|
|
|
|
|
|
|
|
## 文章版权申明
|
|
|
|
|
|
|
|
默认开启,当 `enable: false`,默认关闭
|
|
|
|
|
|
|
|
```yml
|
|
|
|
postCopyright:
|
|
|
|
enable: true
|
|
|
|
license: CC BY-NC-SA 4.0
|
|
|
|
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
|
|
```
|
|
|
|
|
|
|
|
## katex 数学公式
|
|
|
|
|
|
|
|
可自行配置 `cdn`
|
|
|
|
|
|
|
|
```yml
|
|
|
|
katex:
|
|
|
|
enable: true
|
|
|
|
jsCdn: //cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.js
|
|
|
|
cssCdn: //cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css
|
|
|
|
```
|
|
|
|
|
|
|
|
## mermaid 流程图
|
|
|
|
|
|
|
|
在撰写时,请使用 `{% mermaid %}` 和 `{% endmermaid %}` 包裹
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
{% mermaid %}
|
|
|
|
graph TD;
|
|
|
|
A --> B;
|
|
|
|
A --> C;
|
|
|
|
B --> D;
|
|
|
|
C --> D;
|
|
|
|
{% endmermaid %}
|
|
|
|
```
|
|
|
|
|
|
|
|
相应配置如下
|
|
|
|
|
|
|
|
```yml
|
|
|
|
mermaid:
|
|
|
|
enable: true
|
|
|
|
cdn: //cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js
|
|
|
|
```
|
|
|
|
|
|
|
|
## valine 文章评论
|
|
|
|
|
|
|
|
首先需要注册 `LeanCloud` 国际区用户,创建数据库
|
|
|
|
|
|
|
|
请根据相关地区法规,酌情
|
|
|
|
|
|
|
|
```yml
|
|
|
|
valine:
|
|
|
|
enable: true
|
|
|
|
# 替换
|
|
|
|
appId: appId
|
|
|
|
# 替换
|
|
|
|
appKey: appKey
|
|
|
|
avatar: monsterid
|
|
|
|
cdn: //unpkg.com/valine@latest/dist/Valine.min.js
|
|
|
|
# 替换
|
|
|
|
serverURLs: //xxxxxxxx.api.lncldglobal.com
|
|
|
|
```
|