Skip to content

Commit

Permalink
feat: clean menu & friends list for users #131
Browse files Browse the repository at this point in the history
  • Loading branch information
Candinya committed Jun 5, 2022
1 parent cb92386 commit 17cde34
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 35 deletions.
48 changes: 48 additions & 0 deletions .demo/_config.kratos-rebirth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
site_logo: https://ga.candinya.com/avatar/a7f9e15fef26e0a540edc977e21cb3eb
avatarUri: https://ga.candinya.com/avatar/a7f9e15fef26e0a540edc977e21cb3eb

menu:
index: /
archives: /archives/
friends: /friends/
sites:
submenu: true
author: https://candinya.com
project: https://github.com/Candinya/Kratos-Rebirth

label:
index: <i class="fa fa-home"></i>首页
archives: <i class="fa fa-file"></i>档案馆
friends: <i class="fa fa-paw"></i>好伙伴
sites:
submenu: <i class="fa fa-link"></i>链接
author: 作者博客
project: 项目链接

friends:
list:
- name: "猫猫①号"
bio: "喵~"
avatar: "../images/avatar.webp"
link: "https://candinya.com"
- name: "猫猫②号"
bio: "喵喵~"
avatar: "../images/avatar.webp"
link: "https://candinya.com"
- name: "猫猫⑨号"
bio: "咪啪~"
avatar: "../images/avatar.webp"
link: "https://candinya.com"

posts:
comments:
provider: gitalk

gitalk:
clientID: 'GitHub Application Client ID'
clientSecret: 'GitHub Application Client Secret'
# repo: 'Kratos-Rebirth-Demo'
# owner: 'Candinya'
# admin:
# - 'Candinya'
# distractionFreeMode: false
12 changes: 6 additions & 6 deletions .github/workflows/build-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
# Environment virables
env:
SITE_URL: kr-demo.candinya.com
AVATAR_LINK: https://ga.candinya.com/avatar/a7f9e15fef26e0a540edc977e21cb3eb

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down Expand Up @@ -60,15 +59,16 @@ jobs:
- name: Pin document
run: |
sed '2 isticky: 1' -i source/_posts/Kratos-Rebirth-Manual.md
# Copy extended theme settings
- name: Copy extended theme settings
run: cp "themes/kratos-rebirth/.demo/_config.kratos-rebirth.yml" "_config.kratos-rebirth.yml"

# Edit theme settings
- name: Edit theme settings
run: |
sed -i "s|site_logo:|site_logo: ${AVATAR_LINK}|" "themes/kratos-rebirth/_config.yml"
sed -i "s|avatarUri: /images/avatar.webp|avatarUri: ${AVATAR_LINK}|" "themes/kratos-rebirth/_config.yml"
sed -i "s|provider: ''|provider: gitalk|" "themes/kratos-rebirth/_config.yml"
sed -i "s|clientID: 'GitHub Application Client ID'|clientID: ${{ secrets.GH_OAUTH_ID }}|" "themes/kratos-rebirth/_config.yml"
sed -i "s|clientSecret: 'GitHub Application Client Secret'|clientSecret: ${{ secrets.GH_OAUTH_SECRET }}|" "themes/kratos-rebirth/_config.yml"
sed -i "s|clientID: 'GitHub Application Client ID'|clientID: ${{ secrets.GH_OAUTH_ID }}|" "_config.kratos-rebirth.yml"
sed -i "s|clientSecret: 'GitHub Application Client Secret'|clientSecret: ${{ secrets.GH_OAUTH_SECRET }}|" "_config.kratos-rebirth.yml"
# Set Pages CNAME file
- name: Set github pages CNAME file
Expand Down
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
1. `hexo init your-awesome-blog` 初始化您的 Hexo 站点目录(已经完成则可以忽略)
2. 进入您的站点目录,使用 `npm install --save hexo-theme-kratos-rebirth``yarn add hexo-theme-kratos-rebirth` 将主题安装到站点目录下的 theme 主题目录中
3. 修改站点目录下的 `_config.yml` 站点配置文件,将默认的 `theme: landscape` 修改成 `theme: kratos-rebirth`
4. 如有自定义配置的需要,您可以从该主题代码仓库中,手动复制一份 `_config.yml` ,并改名为 `_config.kratos-rebirth.yml` ,移动至您的站点目录下,以便更有效地管理您的主题配置文件
4. 如有自定义配置的需要,为更有效地管理您的主题配置文件,您可以从该主题代码仓库中,手动复制一份 `_config.yml` ,并改名为 `_config.kratos-rebirth.yml` ,移动至您的站点目录下;或者您也可以参考 `.demo` 目录下的 `_config.kratos-rebirth.yml` 这个用于构建样例站点的配置文件扩展,将其移动至站点目录下

## 🎁 使用环境小贴士

Expand Down
56 changes: 28 additions & 28 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Global 全局配置
site_analytics:
site_analytics: ''
hoster: <a href="https://github.io" target="_blank">Github Pages</a>
site_logo:
site_logo: ''
snow: false
click_animate_js: 'candy'
enable_dark: true
Expand All @@ -23,22 +23,22 @@ index:

# Top Menu 顶部导航栏配置 (具体格式请参照文档)
menu:
index: /
archives: /archives/
friends: /friends/
sites:
submenu: true
author: https://candinya.com
project: https://github.com/Candinya/Kratos-Rebirth
# index: /
# archives: /archives/
# friends: /friends/
# sites:
# submenu: true
# author: https://candinya.com
# project: https://github.com/Candinya/Kratos-Rebirth

label:
index: <i class="fa fa-home"></i>首页
archives: <i class="fa fa-file"></i>档案馆
friends: <i class="fa fa-paw"></i>好伙伴
sites:
submenu: <i class="fa fa-link"></i>链接
author: 作者博客
project: 项目链接
# index: <i class="fa fa-home"></i>首页
# archives: <i class="fa fa-file"></i>档案馆
# friends: <i class="fa fa-paw"></i>好伙伴
# sites:
# submenu: <i class="fa fa-link"></i>链接
# author: 作者博客
# project: 项目链接

# Footer 页脚配置
group_link:
Expand Down Expand Up @@ -195,16 +195,16 @@ friends:
description: "好伙伴们在哪里~"
updated: "2021-01-18"
list:
- name: "猫猫①号"
bio: "喵~"
avatar: "../images/avatar.webp"
link: "https://candinya.com"
- name: "猫猫②号"
bio: "喵喵~"
avatar: "../images/avatar.webp"
link: "https://candinya.com"
- name: "猫猫⑨号"
bio: "咪啪~"
avatar: "../images/avatar.webp"
link: "https://candinya.com"
# - name: "猫猫①号"
# bio: "喵~"
# avatar: "../images/avatar.webp"
# link: "https://candinya.com"
# - name: "猫猫②号"
# bio: "喵喵~"
# avatar: "../images/avatar.webp"
# link: "https://candinya.com"
# - name: "猫猫⑨号"
# bio: "咪啪~"
# avatar: "../images/avatar.webp"
# link: "https://candinya.com"
verify: true # 验证每个友链的可访问性,炸了会有提示

0 comments on commit 17cde34

Please sign in to comment.