Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
YangRucheng committed Sep 22, 2024
0 parents commit 568aa8c
Show file tree
Hide file tree
Showing 18 changed files with 593 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/hexo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Hexo Deploy

on:
push:
branches:
- main

jobs:
build-blog:
runs-on: ubuntu-latest

steps:
- name: 签出仓库
uses: actions/checkout@v4
with:
ref: main

- name: 签出主题仓库
uses: actions/checkout@v4
with:
repository: jerryc127/hexo-theme-butterfly
path: themes/butterfly

- name: 安装Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: 设置包缓存目录
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: ${{ runner.OS }}-npm-cache

- name: 安装依赖
run: npm install

- name: 构建
run: npm run build

- name: 上传构建产物
uses: actions/upload-pages-artifact@v3
with:
path: ./public

- name: Deploy to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "Misaka-1314"
cd public
git init --initial-branch=main
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git add .
git commit -m "Deploy to GitHub Pages"
git push --force origin main:pages
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
_multiconfig.yml
package-lock.json

themes/*
!themes/.gitkeep
**/.git
68 changes: 68 additions & 0 deletions _config.butterfly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Hexo 配置文件
nav:
logo: /favicon.ico
display_title: true
fixed: false # fixed navigation bar

# 网站
default_top_img: /static/images/默认背景.jpg
favicon: /favicon.ico

# 社交图标
social:
fab fa-github: https://github.com/YangRucheng || Github
fab fa-qq: https://qm.qq.com/q/rtZpWJIgPQ || QQ
fab fa-bilibili: https://space.bilibili.com/472876342 || 哔哩哔哩
fab fa-house: https://misaka-network.top || 御坂网络工作室
fas fa-envelope: mailto:[email protected] || Email

# 头像
avatar:
img: https://avatars.githubusercontent.com/u/60175467?v=4
effect: true

# 侧边栏
aside:
enable: true
hide: false
button: true
mobile: true
position: right
card_author:
enable: true
description:
button:
enable: true
icon: fab fa-github
text: 关注我的GitHub
link: https://github.com/YangRucheng
card_announcement:
enable: true
content: 欢迎来到我的小站👏🏻
# 菜单
menu:
首页: / || fa fa-home
时间轴: /archives/ || fa fa-archive
标签: /tags/ || fa fa-tags
分类: /categories/ || fa fa-folder-open
友链: /link/ || fa fa-link

# 右下角按钮
darkmode:
enable: true
button: true
autoChangeMode: 1
rightside_scroll_percent: true

# 评论
# Giscus https://giscus.app/
giscus:
repo: "YangRucheng/Blog-Hexo"
repo_id: "R_kgDOI4-j6Q"
category_id: "DIC_kwDOI4-j6c4CUaSX"
theme:
light: light
dark: dark

# 页脚内容
custom_text: <a href="icp链接"><img class="icp-icon" src="icp图片"><span>备案号:xxxxxx</span></a>
61 changes: 61 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Hexo 配置文件
## 文档: https://hexo.io/docs/configuration.html

# 网站
title: "符号看象限"
subtitle: ""
description: "博客、分享、经验、教程"
keywords: "御坂网络工作室,博客,分享,经验,教程"
author: "YangRucheng"
language: "zh-CN"
timezone: "Asia/Shanghai"
favicon:
small: /favicon.ico

# 链接
url: https://blog.yangrucheng.top
permalink: posts/:year:month/:hash/
pretty_urls:
trailing_index: false
trailing_html: false

# 目录
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# 文章
new_post_name: :title.md
default_layout: post
post_meta:
page:
date_type: created # created or updated or both 主頁文章日期是創建日或者更新日或都顯示
date_format: date # date/relative 顯示日期還是相對日期
categories: true # true or false 主頁是否顯示分類
tags: true # true or false 主頁是否顯示標籤
post:
date_type: both # created or updated or both 文章頁日期是創建日或者更新日或都顯示
date_format: relative # date/relative 顯示日期還是相對日期
categories: true # true or false 文章頁是否顯示分類
tags: true # true or false 文章頁是否顯示標籤

# 日期时间格式
date_format: YYYY-MM-DD
time_format: HH:mm
updated_option: "date"

# 扩展
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: "butterfly"

# 访问统计
busuanzi:
site_uv: true
site_pv: true
page_pv: true
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": "7.3.0"
},
"dependencies": {
"hexo": "^7.3.0",
"hexo-abbrlink": "^2.2.1",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^4.0.0",
"hexo-generator-tag": "^2.0.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-marked": "^6.3.0",
"hexo-renderer-pug": "^3.0.0",
"hexo-renderer-stylus": "^3.0.1",
"hexo-server": "^3.0.0",
"hexo-theme-landscape": "^1.0.0"
}
}
4 changes: 4 additions & 0 deletions scaffolds/draft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: {{ title }}
tags:
---
4 changes: 4 additions & 0 deletions scaffolds/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: {{ title }}
date: {{ date }}
---
5 changes: 5 additions & 0 deletions scaffolds/post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: {{ title }}
date: {{ date }}
tags:
---
8 changes: 8 additions & 0 deletions source/_data/link.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- class_name: 推荐博客
flink_style: flexcard
link_list:
- name: Zeng的炼丹房
link: https://csuer411.github.io
avatar: https://avatars.githubusercontent.com/u/97239215?v=4
descr: 努力成为Kaggle Master
siteshot: https://csuer411.github.io/img/favicon.ico
Loading

0 comments on commit 568aa8c

Please sign in to comment.