Skip to content

Commit c517d5d

Browse files
committed
init
0 parents  commit c517d5d

File tree

7 files changed

+632
-0
lines changed

7 files changed

+632
-0
lines changed

.github/workflows/build.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'source/**'
8+
- 'config/**'
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
# Setup Node.js env
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 'latest'
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 9
26+
run_install: false
27+
28+
# Get Hexo test utils
29+
- uses: actions/checkout@v4
30+
with:
31+
repository: 'kratos-rebirth/quickstart'
32+
33+
# Clone Demo site configurations & assets into tmp
34+
- uses: actions/checkout@v4
35+
with:
36+
path: 'custom-files'
37+
38+
# Apply custom settings
39+
- name: Apply custom settings
40+
run: |
41+
rm _config.yml
42+
rm _config.kratos-rebirth.yml
43+
mv custom-files/config/_config.yml _config.yml
44+
mv custom-files/config/_config.kratos-rebirth.yml _config.kratos-rebirth.yml
45+
46+
# Apply custom files
47+
- name: Apply custom files
48+
run: |
49+
mv source/assets custom-files/source/
50+
rm -rf source
51+
mv custom-files/source source
52+
53+
# Install Hexo env
54+
- name: Install Hexo environment
55+
run: pnpm install
56+
57+
# Hexo build demo site
58+
- name: Hexo build demo site
59+
run: npx hexo generate --force
60+
61+
- name: Upload artifacts for pages
62+
uses: actions/upload-pages-artifact@v3
63+
with:
64+
path: public
65+
66+
deploy:
67+
needs: build
68+
69+
permissions:
70+
pages: write
71+
id-token: write
72+
73+
environment:
74+
name: github-pages
75+
url: ${{ steps.deployment.outputs.page_url }}
76+
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Deploy to GitHub Pages
80+
id: deployment
81+
uses: actions/deploy-pages@v4

ReadMe.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Kratos : Rebirth 的周边生态
2+
3+
## 新项目贡献规范
4+
5+
目前暂时设置以下分类:
6+
7+
1. 评论 `comment`
8+
2. 访问统计 `viewcount`
9+
3. 工具挂件 `widget`
10+
4. 站点特效 `effect`
11+
5. 其他 `other`
12+
13+
- 文章路径:`sources/_posts` 目录下
14+
- 文件命名:`对应分类的英文-新增支持的项目名称(小写).md`
15+
- 例如对下雪特效的支持: `effect-snow.md`
16+
- 文章元信息 (Front Matter):
17+
- 分类:对应分类的中文
18+
- 标题:项目的名称
19+
- 资源文件夹:可以使用 asset folder 管理资源,推荐使用传统 asset_img 标签写法,以提升兼容性。

config/_config.kratos-rebirth.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
search:
2+
includes:
3+
- post
4+
- page
5+
6+
image:
7+
favicon: "/assets/favicon.png"
8+
avatar: "https://dev.krt.moe/demo-assets/logo.webp"
9+
banner:
10+
light: "https://dev.krt.moe/demo-assets/banner.webp"
11+
dark: "https://dev.krt.moe/demo-assets/banner_dark.webp"
12+
background:
13+
light: "https://dev.krt.moe/demo-assets/bg.webp"
14+
dark: "https://dev.krt.moe/demo-assets/bg.webp"
15+
16+
nav:
17+
items:
18+
- label: 首页
19+
icon: home
20+
url: /
21+
- label: 评论
22+
icon: comments
23+
url: /categories/评论/
24+
- label: 访问统计
25+
icon: star
26+
url: /categories/访问统计/
27+
- label: 工具挂件
28+
icon: music
29+
url: /categories/工具挂件/
30+
- label: 站点特效
31+
icon: snowflake-o
32+
url: /categories/站点特效/
33+
- label: 其他
34+
icon: plug
35+
url: /categories/其他/
36+
- label: 其他链接
37+
icon: link
38+
float_right: true
39+
submenu:
40+
- label: 主题仓库
41+
url: https://github.com/Candinya/Kratos-Rebirth
42+
- label: 主题文档
43+
url: https://wiki.krt.moe
44+
- label: 实例列表
45+
url: https://awesome.krt.moe
46+
47+
footer:
48+
links:
49+
- icon: github
50+
link: https://github.com/kratos-rebirth/wiki
51+
- icon: rss
52+
link: /atom.xml
53+
components:
54+
uptime:
55+
since: "2024-06-23 00:08:16"
56+
additional:
57+
- - 由 <a href="https://hexo.io" target="_blank" rel="nofollow">Hexo</a> 强力驱动
58+
- 在 <a href="https://github.io" target="_blank">Github Pages</a> 暖心托管
59+
60+
sidebar:
61+
widgets:
62+
- about
63+
- splitter
64+
- toc
65+
- category
66+
- tagcloud
67+
- posts
68+
69+
share:
70+
title: "分享内容"
71+
message: "扫描此处的二维码即可分享。"
72+
73+
donate:
74+
enable: false
75+
76+
inactive_notice:
77+
enable: false
78+
79+
copyright_notice:
80+
append_copy:
81+
enable: false

config/_config.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Hexo Configuration
2+
## Docs: https://hexo.io/docs/configuration.html
3+
## Source: https://github.com/hexojs/hexo/
4+
5+
# Site
6+
title: 'Kratos : Rebirth'
7+
subtitle: '主题的周边生态支持'
8+
description: '感谢使用这个主题,希望能给您带来美好的体验。'
9+
keywords:
10+
- hexo
11+
- theme
12+
- kratos-rebirth
13+
- ecosystem
14+
author: All contributors
15+
language: zh
16+
timezone: ''
17+
18+
# URL
19+
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
20+
url: https://eco.krt.moe
21+
permalink: posts/:title/
22+
permalink_defaults:
23+
pretty_urls:
24+
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
25+
trailing_html: true # Set to false to remove trailing '.html' from permalinks
26+
27+
# Directory
28+
source_dir: source
29+
public_dir: public
30+
tag_dir: tags
31+
archive_dir: archives
32+
category_dir: categories
33+
code_dir: downloads/code
34+
i18n_dir: :lang
35+
skip_render:
36+
37+
# Writing
38+
new_post_name: :title.md # File name of new posts
39+
default_layout: post
40+
titlecase: false # Transform title into titlecase
41+
external_link:
42+
enable: true # Open external links in new tab
43+
field: site # Apply to the whole site
44+
exclude: ''
45+
filename_case: 0
46+
render_drafts: false
47+
post_asset_folder: true
48+
marked:
49+
prependRoot: true
50+
postAsset: true
51+
relative_link: false
52+
future: true
53+
syntax_highlighter: highlight.js
54+
highlight:
55+
line_number: true
56+
auto_detect: false
57+
tab_replace: ''
58+
wrap: true
59+
hljs: false
60+
prismjs:
61+
preprocess: true
62+
line_number: true
63+
tab_replace: ''
64+
65+
# Home page setting
66+
# path: Root path for your blogs index page. (default = '')
67+
# per_page: Posts displayed per page. (0 = disable pagination)
68+
# order_by: Posts order. (Order by date descending by default)
69+
index_generator:
70+
path: ''
71+
per_page: 10
72+
order_by: -date
73+
74+
# Category & Tag
75+
default_category: 无家可归的文章君T-T
76+
category_map:
77+
tag_map:
78+
79+
# Metadata elements
80+
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
81+
meta_generator: true
82+
83+
# Date / Time format
84+
## Hexo uses Moment.js to parse and display date
85+
## You can customize the date format as defined in
86+
## http://momentjs.com/docs/#/displaying/format/
87+
date_format: YYYY-MM-DD
88+
time_format: HH:mm:ss
89+
## updated_option supports 'mtime', 'date', 'empty'
90+
updated_option: 'mtime'
91+
92+
# Pagination
93+
## Set per_page to 0 to disable pagination
94+
per_page: 10
95+
pagination_dir: page
96+
97+
# Include / Exclude file(s)
98+
## include:/exclude: options only apply to the 'source/' folder
99+
include:
100+
exclude:
101+
ignore:
102+
103+
# Extensions
104+
## Plugins: https://hexo.io/plugins/
105+
## Themes: https://hexo.io/themes/
106+
theme: kratos-rebirth
107+
108+
plugin:
109+
- hexo-generator-feed
110+
- hexo-generator-sitemap
111+
112+
feed:
113+
type: atom
114+
path: atom.xml
115+
limit: 20
116+
117+
sitemap:
118+
path: sitemap.xml
119+
template: ./sitemap_template.xml
120+
rel: false
121+
122+
# Deployment
123+
## Docs: https://hexo.io/docs/one-command-deployment
124+
deploy:
125+
type: ''

0 commit comments

Comments
 (0)