Vastiny

May 20, 2024

Serverless Blog 使用手册

发布文章到网站

文章在点击发布或者更新后,会自动发布到中,如果出现异常,可以通过访问下面的链接手动生成:
http://hexo.vastiny.com/generate/vastiny-com

自定义文章元信息

可以通过每篇文章最前面添加下面的 front matter,自定义当前文章的标题、创建日期、隐私状态、多语言等。

1
2
3
4
5
title: 文章标题
date: 2024-05-20 23:24
status: private
lang: en
---

具体在一个文章里面就是这样:

支持英文网站

当前 leedom 以及 leedom2 已经适配好了多语言,自己通过添加导航 xxx/en/ 就可以访问,比如 https://vastiny.com/en/ 一定要加后面的 /才能访问。如果要写一篇英文文章, 不会出现在中文页面,需要定制英文文章的元信息:

1
2
3
lang:en
---
正文内容

之后,网站就会在 /en/ 的路径下展示英文文章。

自定义网站配置

使用 Hexo 的 _config.yml 转为 语雀的 json 网站配置:

  1. 在知识库中新建一个文件
  2. 添加文章元信息,设置 status 为 private ,避免出现在网站中
  3. 添加一个代码块,配置网站元信息
  4. 设置当前文章的路径是 config,可以通过 文档设置 -> 高级选项 -> 路径,进行配置
  5. 发布当前文章即可

配置示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
"title": "Vastiny",
"subtitle": "",
"description": "Hi 与天",
"keywords": null,
"author": "yantze",
"language": ["zh-CN", "en"],
"timezone": "Asia/Shanghai",
"url": "https://vastiny.com",
"permalink": "post/:name.html",
"permalink_defaults": null,
"default_category": "other",
"theme": "leedom2",
"theme_config_override": {
"favicon": {
"enable": false,
"icon": "/images/favicon.png",
"touch_icon": "/images/favicon.png"
},
"avatar": {
"author_photo": "/images/avatar.png",
"author_nickname": "Vastiny",
"path": "/"
},
"search": {
"enable": true,
"placeholder": "搜索"
},
"link": [
{
"name": "github",
"icon": "github",
"path": "https://github.com/yantze",
"target": "_blank"
},
{
"name": "twitter",
"icon": "twitter",
"path": "https://twitter.com/ivastiny",
"target": "_blank"
}
],
"footer": [
{
"name": "Copyright © Yantze 2023-3",
"path": "https://vastiny.com"
},
{
"name": "Theme by Leedom | Powered by Hexo",
"path": "https://github.com/leedom92/hexo-theme-leedom"
}
],
"google_analytics": ""
}
}
OLDER >