使用自定义字体

使用 霞鹜文楷 字体.

使用工具 woff2 将字体转成适用web格式的字体.

1
2
3
4
# 安装工具
brew install woff2
# 命令转换
woff2_compress LXGWWenKai-Regular.ttf

修改hexo配置

hexosource 目录下新建 fonts _data 目录,将上面转换的 woff2 格式的字体放到文件夹中;

目录结构如下

1
2
3
4
5
6
7
8
G:\hexo-doc\
├── source\
│ └── _data\
│ └── fonts\
│ └── LXGWWenKai-Regular.woff2 ✅ ← 必须放这里!
├── themes\
│ └── next\
│ └── ...

_data 目录下新建 custom.styl 文件

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
@font-face {
font-family: 'LXGWWenKai';
src: url("/fonts/LXGWWenKai-Regular.woff2") format("woff2");
font-display: swap;
}
// 全文
body {
font-family: 'LXGWWenKai', 'Noto Serif SC', 'Microsoft YaHei', sans-serif;
}
.post-body {
font-family: 'LXGWWenKai', 'Noto Serif SC', 'Microsoft YaHei', sans-serif;
}

// 针对标题的额外覆盖
h1, h2, h3, h4, h5, h6,
.post-title,
.post-title a,
.post-header,
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
font-family: 'LXGWWenKai', sans-serif !important;
}

// 设置字体到所有相关标题和元信息区域
.post-title,
.post-meta,
.post-meta span,
.post-meta time,
.post-header,
.post-header span {
font-family: 'LXGWWenKai', sans-serif !important;
}

在更改next主题的config文件,找到 custom_file_path 配置项,添加如下配置

1
2
custom_file_path:
style: source/_data/custom.styl

windows terminal

使用 powershell 配合 nushell 使用,可以实现类linux上的体验.

linux terminal

使用 omz 配合 powerlevel10k 主题使用,纵享丝滑.

omz 常用的外置插件

omz 常用的内置插件

  • wd z 跳转常用目录
  • docker kubectl brew git 常用基础工具

步骤间参数传递

  • 将当前 step 的结果导出为Output Parameter
  • 将前一个 step 的Output Parameter导入为当前步骤的Input Parameter
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
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: output-parameter-
spec:
entrypoint: output-parameter
templates:
- name: output-parameter
steps:
- - name: generate-parameter
template: hello-world-to-file
- - name: consume-parameter
template: print-message
arguments:
parameters:
# 将第一步写入到文件中的信息读取出来,传递给下一个步骤
- name: message
value: "{{steps.generate-parameter.outputs.parameters.hello-param}}"

- name: hello-world-to-file
container:
image: busybox
command: [sh, -c]
args: ["echo -n Output And Input Test > /tmp/hello_world.txt"] # 将信息输出到文件中
outputs:
parameters:
- name: hello-param # name of output parameter
valueFrom:
path: /tmp/hello_world.txt # set the value of hello-param to the contents of this hello-world.txt

- name: print-message
inputs:
parameters:
- name: message
container:
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]
阅读全文 »
0%