Skip to content

Commit 6953f24

Browse files
authored
[Feature] Custom archetypes (#12)
* feat: custom default archetype * 补充默认模板中的数学设置和类别格式 * more archetypes * Add build configuration to default archetype * Add build configuration to course archetype * Add build configuration to contest.md * Add build option to notification.md Add build configuration to notification archetype * 更新投稿指南,添加内容合规性要求
1 parent 52c306a commit 6953f24

File tree

6 files changed

+77
-14
lines changed

6 files changed

+77
-14
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ G --> C
4040
- 转载的文章***必须***特别在 Markdown Front Matter 的 license 字段和 PR 描述内注明授权信息
4141
3. 投稿文章***必须***放到 `content/external` 目录下
4242

43+
> [!IMPORTANT]
44+
> 文章内容要保证合法合规, 不得包含任何政治敏感、色情暴力、反动等不当内容, 违反上述要求的文章将被拒绝, 且提交者可能会被永久禁止投稿
45+
4346
## PR 要求
4447

4548
1. 一个 PR 一件事:
@@ -51,17 +54,4 @@ G --> C
5154

5255
## Front Matter 模板
5356

54-
```markdown
55-
---
56-
title: 文章标题
57-
description: 文章简介
58-
author: 你的名字
59-
date: 2024-01-01
60-
license: "CC BY-SA 4.0" # 转载文章必须注明授权信息
61-
categories: # 仓库内有所有可用的 tags 和 categories 的列表
62-
- Contest
63-
tags:
64-
- 数论
65-
- 解题技巧
66-
---
67-
```
57+
[`archetypes/post.md`](archetypes/post.md)

archetypes/contest.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
date: {{ .Date }}
5+
image:
6+
math: true
7+
license:
8+
draft: true
9+
build:
10+
list: always # Change to "never" to hide the page from the list
11+
categories:
12+
- Contests
13+
tags:
14+
-
15+
---

archetypes/course.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
date: {{ .Date }}
5+
image:
6+
math: true
7+
license:
8+
draft: true
9+
build:
10+
list: always # Change to "never" to hide the page from the list
11+
categories:
12+
- Courses
13+
tags:
14+
-
15+
---

archetypes/default.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
date: {{ .Date }}
5+
image:
6+
math: true
7+
license:
8+
draft: true
9+
build:
10+
list: always # Change to "never" to hide the page from the list
11+
categories:
12+
- Articles
13+
tags:
14+
-
15+
---

archetypes/notification.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
date: {{ .Date }}
5+
image:
6+
math: true
7+
license:
8+
draft: true
9+
build:
10+
list: always # Change to "never" to hide the page from the list
11+
categories:
12+
- Notifications
13+
tags:
14+
-
15+
---

archetypes/post.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
date: {{ .Date }}
5+
image:
6+
math: true
7+
license:
8+
draft: true
9+
categories:
10+
- Articles
11+
tags:
12+
-
13+
---

0 commit comments

Comments
 (0)