This is a theme built with docusaurus, which combines the simplicity and ease of use of docusaurus with other open source page design solutions, supports MDX and React, is extensible and customizable, and also has a beautiful design, a blog and documentation integrated theme, providing you with an excellent personal page solution.This theme Built with🦖 Docusaurus
- 主页+博客+文档三合一
- 利用Typescript自定义页面
- 生成全静态网页文件
- 优化页面符合现代美观(毛玻璃虚化样式,pwa优化...)
- 支持国际化
- 代码项目展示
- 代码块显示行号
- 结合obsidian进行写作
- 直接转为幻灯片格式,可在线浏览放映
- 个人简历页面
- 分享功能
├── blog # blog
│ ├── first-blog.md
│ └── authors.yml # author information (can have multiple authors)
├── docs # documentation/notes
│ └── stack
│ └──introduction.md # notes introduction
├── data #project/navigation/friend link data
│ ├── friend.ts # friend link
│ ├── project.ts # project
│ └── resource.ts #resource navigation
├── i18n #internation alization
├── src
│ ├── components # components
│ ├── css # custom CSS
│ ├── pages # custom pages
│ ├── plugin # custom plugin
│ └── theme # custom theme components
├── static # static resource files
│ └── assets # static files
├── docusaurus.config.js # site configuration information
├── sidebars.js # document sidebar
├── package.json
└── yarn.lock # recommended to use yarn to keep
Clone the repository and install the dependencies.
git clone https://github.com/wrm244/docusaurus-theme-zen.git ./blog
cd blog
yarn
yarn start
Generate static web page code(./build).
yarn run build
Start the web service.
yarn run serve
The process configuration is deployed to the cloud server and GitHub Pages simultaneously:
Modify the configuration file under the /.github/workflows/ci.yml
path.
name: ci
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js v18.5
uses: actions/setup-node@v3
with:
node-version: '18.5.0'
#Use caching
- name: Cache node modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install
- name: Build Project
run: |
yarn run build
# Use SSH to synchronize to the cloud server
# - name: SSH Deploy
# uses: easingthemes/[email protected]
# env:
# SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
# ARGS: '-avzr --delete'
# SOURCE: './build'
# REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
# REMOTE_USER: 'root'
# TARGET: '/www/wwwroot/wrm244'
- name: Github page Deploy
uses: wrm244/docusaurus-deploy-action@master
env:
PERSONAL_TOKEN: ${{ secrets.PERSION_TOKEN }} # Github personal account key
PUBLISH_REPOSITORY: wrm244/docusaurus-theme-zen # Public repository, format: GitHub username/repository name
BRANCH: gh-pages # Deploy the branch
PUBLISH_DIR: ./build # Deploy the files in the ./build directory
MIT © RiverMountain 100%