Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
HolgerHuo committed Aug 26, 2024
0 parents commit 87b25f1
Show file tree
Hide file tree
Showing 17 changed files with 1,513 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/upload_artifact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Upload Docs to JFrog

on:
push:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build with VitePress
run: pnpm docs:build
- name: Create Tarball
uses: a7ul/[email protected]
with:
command: c
cwd: ${{ github.workspace }}/.vitepress/
files: |
./dist
outPath: ${{ github.workspace }}/.vitepress/clab-docs.tar.gz
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ github.workspace }}/.vitepress/
- name: Upload Tarball
uses: fjogeleit/http-request-action@v1
with:
url: 'https://jfrog.lcpu.dev/artifactory/cloud-doc/latest.tar.gz'
method: 'PUT'
bearerToken: ${{ secrets.JFROG_BEARER_TOKEN }}
file: ${{ github.workspace }}/.vitepress/clab-docs.tar.gz
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Logs
logs
*.log
npm-debug.log*

# Dependency directory
**/node_modules/**
_node_modules
.pnp.cjs
.pnpm-store

#
.tmp
_docpress
.DS_Store

lib
tsconfig.tsbuildinfo
test.lib/

# Visual Studio Code configs
.vscode/

# JetBrains IDEs
.idea/

# pnpm uses npm for publishing a new version with
# dependencies bundled but the npm lockfile is not needed
# because pnpm use pnpm for installation
package-lock.json

__package_previews__
.store

privatePackages/store

yarn.lock

RELEASE.md

.jest-cache
.verdaccio-cache
.turbo

## custom modules-dir fixture
__fixtures__/custom-modules-dir/**/fake_modules/
__fixtures__/custom-modules-dir/cache/
__fixtures__/custom-modules-dir/patches/

## VitePress

.vitepress/cache
.vitepress/dist
104 changes: 104 additions & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import { defineConfig } from 'vitepress'

export default defineConfig({
lang: "zh-CN",
title: "PKU Clab 文档",
description: "开箱即用的免费云计算服务,为教学与科研服务。",
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
lastUpdated: true,
base: '/docs',
cleanUrls: true,
rewrites: {
'/index.md': '/getting-started/introduction'
},
themeConfig: {
i18nRouting: false,
logo: "/logo.svg",
logoLink: '/docs/getting-started/introduction',
nav: [
{ text: 'PKU Clab', link: 'https://clab.pku.edu.cn', target: '_self'},
{ text: '文档', link: '/getting-started/introduction', activeMatch: '/' },

],
sidebar: {
'/': [
{
text: '文档',
items: [
{ text: '快速开始', link: '/getting-started/introduction' },
{ text: '网络', items: [
{ text: "自组网", link: '/networking/private-network'},
{ text: "Router和浮动IP", link: '/networking/router-and-floating-ip'},
{ text: "安全组", link: '/networking/security-group'}
]
},
{ text: '储存', items: [
{ text: "Volume类型", link: '/storage/volume-type'},
{ text: "Volume快照和备份", link: '/storage/volume-snapshots-and-backups'},
]
},
{ text: '镜像站使用指南', link: '/getting-started/lcpu-mirror' }
]
}
],
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/lcpu-club' }
],
footer: {
message: '由北京大学学生 Linux 俱乐部开发并维护',
copyright: '© 2024 LCPU Club'
},
docFooter: {
prev: '上一节',
next: '下一节'
},
lastUpdated: {
text: '更新于',
formatOptions: {
dateStyle: 'full',
timeStyle: 'medium'
}
},
editLink: {
pattern: 'https://github.com/lcpu-club/clab-docs/edit/main/:path',
text: '在GitHub上更新本页'
},
darkModeSwitchLabel: "颜色选择",
lightModeSwitchTitle: "切换至亮色模式",
darkModeSwitchTitle: "切换至暗色模式",
sidebarMenuLabel: "目录",
returnToTopLabel: "回到顶部",
externalLinkIcon: true,
search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: '搜索',
buttonAriaLabel: '搜索'
},
modal: {
displayDetails: '显示详细列表',
resetButtonTitle: '重置搜索',
backButtonTitle: '关闭搜索',
noResultsText: '没有结果',
footer: {
selectText: '选择',
selectKeyAriaLabel: '输入',
navigateText: '导航',
navigateUpKeyAriaLabel: '上箭头',
navigateDownKeyAriaLabel: '下箭头',
closeText: '关闭',
closeKeyAriaLabel: 'esc'
}
}
}
}
}
}
}
}
})
1 change: 1 addition & 0 deletions assets/icons/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/server.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/shield_check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added getting-started/introduction.md
Empty file.
Empty file added getting-started/lcpu-mirror.md
Empty file.
Empty file added networking/private-network.md
Empty file.
Empty file.
Empty file added networking/security-group.md
Empty file.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"devDependencies": {
"vitepress": "^1.3.4"
},
"scripts": {
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
}
}
Loading

0 comments on commit 87b25f1

Please sign in to comment.