Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xiayuanOvO committed Dec 26, 2023
0 parents commit 73267c8
Show file tree
Hide file tree
Showing 7 changed files with 2,042 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: docs

on:
push:
branches: [wiki]
workflow_dispatch:

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# 选择要使用的 pnpm 版本
version: 8
# 使用 pnpm 安装依赖
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
# 选择要使用的 node 版本
node-version: 18
# 缓存 pnpm 依赖
cache: pnpm

# 运行构建脚本
- name: Build VuePress site
run: pnpm docs:build

# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
# 部署到 gh-pages 分支
target_branch: wiki
# 部署目录为 VuePress 的默认输出目录
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.temp
.cache
56 changes: 56 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { defaultTheme } from 'vuepress'

export default {
base: "/Modernia/",
lang: 'zh-CN',
title: 'Modernia Wiki',
description: '基于botpy的娱乐QQ机器人。',
theme: defaultTheme({
navbar: [
{
text: '首页',
link: '/',
},
{
text: '指南',
link: '/guide/',
},
{
text: '设计模式',
link: '/designPatterns/',
},
],
// 侧边栏对象
// 不同子路径下的页面会使用不同的侧边栏
sidebar: {
'/network/': [
{
text: '网络',
children: [
{
text: '一张图帮你看懂,在浏览器输入网址回车后,都发生了什么?',
link: '/network/一张图帮你看懂,在浏览器输入网址回车后,都发生了什么?.md',
},
{
text: '在Jekyll中创建一个新的列表页面',
link: '/network/在Jekyll中创建一个新的列表页面.md',
}
],
},
],
'/designPatterns/': [
{
text: '设计模式',
collapsible: true,
children: [
{
text: '单例模式--我的机器人女友',
link: '/designPatterns/单例模式--我的机器人女友.md',
}
],
},
],
},

}),
}
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 开始使用

9 changes: 9 additions & 0 deletions docs/guide/start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 开始

欢迎使用 Modernia Bot

## 基础教程

### 下载

![release]()
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "vuepress-starter",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@vuepress/client": "2.0.0-rc.0",
"vue": "^3.3.13",
"vuepress": "2.0.0-rc.0"
}
}
Loading

0 comments on commit 73267c8

Please sign in to comment.