-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d2f379b
Showing
7 changed files
with
284 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
# Setup Node.js env | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'latest' | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
# Get Hexo test utils | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: 'kratos-rebirth/quickstart' | ||
|
||
# Clone Demo site configurations & assets into tmp | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: 'custom-files' | ||
|
||
# Apply custom settings | ||
- name: Apply custom settings | ||
run: | | ||
rm _config.yml | ||
rm _config.kratos-rebirth.yml | ||
mv custom-files/config/_config.yml _config.yml | ||
mv custom-files/config/_config.kratos-rebirth.yml _config.kratos-rebirth.yml | ||
# Apply custom files | ||
- name: Apply custom files | ||
run: | | ||
mv source/assets custom-files/source/ | ||
rm -rf source | ||
mv custom-files/source source | ||
mkdir source/_data | ||
mv custom-files/awesome.yml source/_data/linklist.yml | ||
# Install Hexo env | ||
- name: Install Hexo environment | ||
run: pnpm install | ||
|
||
# Hexo build demo site | ||
- name: Hexo build demo site | ||
run: npx hexo generate --force | ||
|
||
- name: Upload artifacts for pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: public | ||
|
||
deploy: | ||
needs: build | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# 使用 Kratos : Rebirth 作为主题的站点合集 | ||
|
||
- 列表请参见 https://awesome.krt.moe | ||
- 加入文档请参见 https://awesome.krt.moe/show-my-site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
awesome: | ||
- title: "糖菓·部落" | ||
description: "Never drown the flame of hope" | ||
image: "https://candinya.com/images/candinya.webp" | ||
link: "https://candinya.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
search: | ||
provider: none | ||
|
||
image: | ||
favicon: "/assets/favicon.png" | ||
avatar: "https://dev.krt.moe/demo-assets/logo.webp" | ||
banner: | ||
light: "https://dev.krt.moe/demo-assets/banner.webp" | ||
dark: "https://dev.krt.moe/demo-assets/banner_dark.webp" | ||
background: | ||
light: "https://dev.krt.moe/demo-assets/bg.webp" | ||
dark: "https://dev.krt.moe/demo-assets/bg.webp" | ||
|
||
nav: | ||
items: | ||
- label: 列表 | ||
icon: link | ||
url: / | ||
- label: 看看我的 | ||
icon: heartbeat | ||
url: /show-my-site/ | ||
|
||
footer: | ||
components: | ||
uptime: | ||
since: "2024-06-23 00:08:16" | ||
|
||
sidebar: | ||
location: none | ||
|
||
share: | ||
enable: false | ||
|
||
donate: | ||
enable: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# Hexo Configuration | ||
## Docs: https://hexo.io/docs/configuration.html | ||
## Source: https://github.com/hexojs/hexo/ | ||
|
||
# Site | ||
title: 'Kratos : Rebirth' | ||
subtitle: '使用主题的站点合集' | ||
description: '使用 Kratos : Rebirth 作为主题的站点合集' | ||
keywords: hexo, theme, kratos-rebirth, awesome | ||
author: All contributors | ||
language: zh | ||
timezone: '' | ||
|
||
# URL | ||
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' | ||
url: https://awesome.krt.moe | ||
permalink: posts/:title/ | ||
permalink_defaults: | ||
pretty_urls: | ||
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks | ||
trailing_html: true # Set to false to remove trailing '.html' from permalinks | ||
|
||
# Directory | ||
source_dir: source | ||
public_dir: public | ||
tag_dir: tags | ||
archive_dir: archives | ||
category_dir: categories | ||
code_dir: downloads/code | ||
i18n_dir: :lang | ||
skip_render: | ||
|
||
# Writing | ||
new_post_name: :title.md # File name of new posts | ||
default_layout: post | ||
titlecase: false # Transform title into titlecase | ||
external_link: | ||
enable: true # Open external links in new tab | ||
field: site # Apply to the whole site | ||
exclude: '' | ||
filename_case: 0 | ||
render_drafts: false | ||
post_asset_folder: false | ||
relative_link: false | ||
future: true | ||
syntax_highlighter: highlight.js | ||
highlight: | ||
line_number: true | ||
auto_detect: false | ||
tab_replace: '' | ||
wrap: true | ||
hljs: false | ||
prismjs: | ||
preprocess: true | ||
line_number: true | ||
tab_replace: '' | ||
|
||
# Home page setting | ||
# path: Root path for your blogs index page. (default = '') | ||
# per_page: Posts displayed per page. (0 = disable pagination) | ||
# order_by: Posts order. (Order by date descending by default) | ||
index_generator: | ||
path: '/disabled' | ||
per_page: 10 | ||
order_by: -date | ||
|
||
# Category & Tag | ||
default_category: 无家可归的文章君T-T | ||
category_map: | ||
tag_map: | ||
|
||
# Metadata elements | ||
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta | ||
meta_generator: true | ||
|
||
# Date / Time format | ||
## Hexo uses Moment.js to parse and display date | ||
## You can customize the date format as defined in | ||
## http://momentjs.com/docs/#/displaying/format/ | ||
date_format: YYYY-MM-DD | ||
time_format: HH:mm:ss | ||
## updated_option supports 'mtime', 'date', 'empty' | ||
updated_option: 'mtime' | ||
|
||
# Pagination | ||
## Set per_page to 0 to disable pagination | ||
per_page: 10 | ||
pagination_dir: page | ||
|
||
# Include / Exclude file(s) | ||
## include:/exclude: options only apply to the 'source/' folder | ||
include: | ||
exclude: | ||
ignore: | ||
|
||
# Extensions | ||
## Plugins: https://hexo.io/plugins/ | ||
## Themes: https://hexo.io/themes/ | ||
theme: kratos-rebirth | ||
|
||
plugin: | ||
- hexo-generator-feed | ||
- hexo-generator-sitemap | ||
|
||
feed: | ||
type: atom | ||
path: atom.xml | ||
limit: 20 | ||
|
||
sitemap: | ||
path: sitemap.xml | ||
template: ./sitemap_template.xml | ||
rel: false | ||
|
||
# Deployment | ||
## Docs: https://hexo.io/docs/one-command-deployment | ||
deploy: | ||
type: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: 超棒的站点们 | ||
date: 2024-06-23 00:08:16 | ||
description: "使用 Kratos : Rebirth 作为主题的站点们" | ||
--- | ||
|
||
{% linklist random awesome %} | ||
{% endlinklist %} | ||
|
||
想要加入列表?记得来[这里](/show-my-site/)瞅瞅 😉 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: 秀秀我的站点 | ||
date: 2024-06-23 00:08:16 | ||
--- | ||
当您使用 Kratos : Rebirth 作为您站点的主题时,加入列表非常简单,只需要这样三步(全都可以在网页上完成): | ||
|
||
1. 注册一个 GitHub 账号(如果已经有的话可以跳过); | ||
2. 前往 [kratos-rebirth/awesome](https://github.com/kratos-rebirth/awesome) 仓库页面,fork 一份,并在根目录的 `awesome.yml` 文件里添加上您的站点信息; | ||
3. 保存,提交,向上游开启一个 Pull request 。 | ||
|
||
这样就完成了!我们会检查您提交的信息,一切没问题的话您的站点很快就能在这里看到啦。 | ||
|
||
其中,站点信息的格式是这样的(请注意第一行最开始的减号): | ||
|
||
```yaml | ||
- title: "站点名称" | ||
description: "站点的一句话描述" | ||
image: "站点的 LOGO (可以是头像)" | ||
link: "站点的地址" | ||
``` | ||
一个填充完成的信息看起来像是这样: | ||
```yaml | ||
- title: "糖菓·部落" | ||
description: "Never drown the flame of hope" | ||
image: "https://candinya.com/images/candinya.webp" | ||
link: "https://candinya.com" | ||
``` | ||
当然您也可以直接在文件中找到更多其他站点的样例来参考。 | ||
如果您有问题的话欢迎随时开启一个 issue 来和我们联系,未来我们也可能会推出基于 issue 自动化的加入机制,以便尽可能地进一步简化操作流程。预祝您使用愉快! |