-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
松鼠
committed
Oct 30, 2024
0 parents
commit 6d5d620
Showing
226 changed files
with
38,261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "multi-site-plume", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "pnpm clean && pnpm build:package", | ||
"build:package": "pnpm -r --stream build", | ||
"clean": "pnpm -r --stream clean", | ||
"dev": "pnpm --stream '/(dev:package|docs:dev)/'", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"eslint": "^9.13.0", | ||
"typescript": "^5.6.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: deploy | ||
|
||
on: | ||
# 每当 push 到 main 分支时触发部署 | ||
# Deployment is triggered whenever a push is made to the main branch. | ||
push: | ||
branches: [main] | ||
# 手动触发部署 | ||
# Manually trigger deployment | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | ||
# "Last updated time" and other git log-related information require fetching all commit records. | ||
fetch-depth: 0 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
# 选择要使用的 node 版本 | ||
node-version: 20 | ||
|
||
|
||
# 安装依赖 | ||
# Install dependencies | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
|
||
# 运行构建脚本 | ||
# Run the build script | ||
- name: Build VuePress site | ||
run: pnpm run 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: gh-pages | ||
# 部署目录为 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
shell-emulator=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# fuzhou | ||
|
||
The Site is generated using [vuepress](https://vuepress.vuejs.org/) and [vuepress-theme-plume](https://github.com/pengzhanbo/vuepress-theme-plume) | ||
|
||
## Install | ||
|
||
```sh | ||
pnpm i | ||
``` | ||
|
||
## Usage | ||
|
||
```sh | ||
# start dev server | ||
pnpm docs:dev | ||
# build for production | ||
pnpm docs:build | ||
# preview production build in local | ||
pnpm docs:preview | ||
# update vuepress and theme | ||
pnpm vp-update | ||
``` | ||
|
||
## Deploy to GitHub Pages | ||
|
||
The plume theme has been created with GitHub Actions: `.github/workflows/docs-deploy.yml`. You also need to make the following settings in the GitHub repository: | ||
|
||
- [ ] `settings > Actions > General`, Scroll to the bottom of the page, under `Workflow permissions`, check `Read and write permissions`, and click the save button. | ||
|
||
- [ ] `settings > Pages`, In `Build and deployment`, select `Deploy from a branch` for `Source`, choose `gh-pages` for `Branch`, and click the save button. | ||
(The `gh-pages` branch may not exist upon first creation. You can complete the above setup first, push the code to the main branch, wait for `github actions` to finish, and then proceed with the setup.) | ||
|
||
- [ ] Modify the `base` option in `docs/.vuepress/config.ts`: | ||
- If you are planning to deploy to `https://<USERNAME>.github.io/`, you can skip this step as `base` defaults to `"/"`. | ||
- If you are planning to deploy to `https://<USERNAME>.github.io/<REPO>/`, meaning your repository URL is `https://github.com/<USERNAME>/<REPO>`, set `base` to `"/<REPO>/"`. | ||
|
||
To customize a domain name, please refer to [Github Pages](https://docs.github.com/zh/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages) | ||
|
||
## Documents | ||
|
||
- [vuepress](https://vuepress.vuejs.org/) | ||
- [vuepress-theme-plume](https://theme-plume.vuejs.press/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# fuzhou | ||
|
||
网站使用 [vuepress](https://vuepress.vuejs.org/) 和 [vuepress-theme-plume](https://github.com/pengzhanbo/vuepress-theme-plume) 构建生成。 | ||
|
||
## Install | ||
|
||
```sh | ||
pnpm i | ||
``` | ||
|
||
## Usage | ||
|
||
```sh | ||
# 启动开发服务 | ||
pnpm docs:dev | ||
# 构建生产包 | ||
pnpm docs:build | ||
# 本地预览生产服务 | ||
pnpm docs:preview | ||
# 更新 vuepress 和主题 | ||
pnpm vp-update | ||
``` | ||
|
||
## 部署到 GitHub Pages | ||
|
||
主题已创建 github actions: `.github/workflows/docs-deploy.yml`,你还需要在 github 仓库中进行以下设置: | ||
|
||
- [ ] `settings > Actions > General`,拉到页面底部,在 `Workflow permissions` 下,勾选 `Read and write permissions`,并点击保存按钮 | ||
|
||
- [ ] `settings > Pages`, 在 `Build and deployment` 中,`Source` 选择 `Deploy from a branch`, `Branch` 选择 `gh-pages`,并点击保存按钮 | ||
(首次创建可能没有 `gh-pages`分支,你可以先完成上面的设置后,推送一次代码到主分支,等待 `github actions` 完成后再进行设置) | ||
|
||
- [ ] 修改 `docs/.vuepress/config.ts` 中的 `base` 选项: | ||
- 如果你准备发布到 `https://<USERNAME>.github.io/` ,你可以省略这一步,因为 `base` 默认就是 `"/"` 。 | ||
- 如果你准备发布到 `https://<USERNAME>.github.io/<REPO>/` ,也就是说你的仓库地址是 `https://github.com/<USERNAME>/<REPO>` ,则将 `base` 设置为 `"/<REPO>/"`。 | ||
|
||
如需要自定义域名,请查看 [Github Pages 文档](https://docs.github.com/zh/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages) | ||
|
||
## 文档 | ||
|
||
- [vuepress](https://vuepress.vuejs.org/) | ||
- [vuepress-theme-plume](https://theme-plume.vuejs.press/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineClientConfig } from 'vuepress/client' | ||
// import RepoCard from 'vuepress-theme-plume/features/RepoCard.vue' | ||
// import CustomComponent from './theme/components/Custom.vue' | ||
|
||
// import './theme/styles/custom.css' | ||
|
||
export default defineClientConfig({ | ||
enhance({ app }) { | ||
// app.component('RepoCard', RepoCard) | ||
// app.component('CustomComponent', CustomComponent) | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { viteBundler } from '@vuepress/bundler-vite' | ||
import { defineUserConfig } from 'vuepress' | ||
import { plumeTheme } from 'vuepress-theme-plume' | ||
|
||
export default defineUserConfig({ | ||
base: '/', | ||
lang: 'zh-CN', | ||
locales: { | ||
'/': { | ||
title: 'fuzhou', | ||
lang: 'zh-CN', | ||
description: '福州市所有公园景点的信息', | ||
}, | ||
'/en/': { | ||
title: 'fuzhou', | ||
lang: 'en-US', | ||
description: '福州市所有公园景点的信息', | ||
}, | ||
}, | ||
|
||
bundler: viteBundler(), | ||
|
||
theme: plumeTheme({ | ||
// 添加您的部署域名 | ||
// hostname: 'https://your_site_url', | ||
|
||
plugins: { | ||
/** | ||
* Shiki 代码高亮 | ||
* @see https://theme-plume.vuejs.press/config/plugins/code-highlight/ | ||
*/ | ||
// shiki: { | ||
// 强烈建议预设代码块高亮语言,插件默认加载所有语言会产生不必要的时间开销 | ||
// languages: ['shell', 'bash', 'typescript', 'javascript'], | ||
// }, | ||
|
||
/** | ||
* markdown enhance | ||
* @see https://theme-plume.vuejs.press/config/plugins/markdown-enhance/ | ||
*/ | ||
markdownEnhance: { | ||
demo: true, | ||
// include: true, | ||
// chart: true, | ||
// echarts: true, | ||
// mermaid: true, | ||
// flowchart: true, | ||
}, | ||
|
||
/** | ||
* markdown power | ||
* @see https://theme-plume.vuejs.press/config/plugin/markdown-power/ | ||
*/ | ||
// markdownPower: { | ||
// pdf: true, | ||
// caniuse: true, | ||
// plot: true, | ||
// bilibili: true, | ||
// youtube: true, | ||
// icons: true, | ||
// codepen: true, | ||
// replit: true, | ||
// codeSandbox: true, | ||
// jsfiddle: true, | ||
// repl: { | ||
// go: true, | ||
// rust: true, | ||
// kotlin: true, | ||
// }, | ||
// }, | ||
|
||
/** | ||
* 评论 comments | ||
* @see https://theme-plume.vuejs.press/guide/features/comments/ | ||
*/ | ||
// comment: { | ||
// provider: '', // "Artalk" | "Giscus" | "Twikoo" | "Waline" | ||
// comment: true, | ||
// repo: '', | ||
// repoId: '', | ||
// categoryId: '', | ||
// mapping: 'pathname', | ||
// reactionsEnabled: true, | ||
// inputPosition: 'top', | ||
// }, | ||
}, | ||
}), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { defineNavbarConfig } from 'vuepress-theme-plume' | ||
|
||
export const zhNavbar = defineNavbarConfig([ | ||
{ text: '首页', link: '/' }, | ||
{ text: '博客', link: '/blog/' }, | ||
{ text: '标签', link: '/blog/tags/' }, | ||
{ text: '归档', link: '/blog/archives/' }, | ||
{ | ||
text: '笔记', | ||
items: [{ text: '示例', link: '/notes/demo/README.md' }] | ||
}, | ||
]) | ||
|
||
export const enNavbar = defineNavbarConfig([ | ||
{ text: 'Home', link: '/en/' }, | ||
{ text: 'Blog', link: '/en/blog/' }, | ||
{ text: 'Tags', link: '/en/blog/tags/' }, | ||
{ text: 'Archives', link: '/en/blog/archives/' }, | ||
{ | ||
text: 'Notes', | ||
items: [{ text: 'Demo', link: '/en/notes/demo/README.md' }] | ||
}, | ||
]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineNoteConfig, defineNotesConfig } from 'vuepress-theme-plume' | ||
|
||
/* =================== locale: zh-CN ======================= */ | ||
|
||
const zhDemoNote = defineNoteConfig({ | ||
dir: 'demo', | ||
link: '/demo', | ||
sidebar: ['', 'foo', 'bar'], | ||
}) | ||
|
||
export const zhNotes = defineNotesConfig({ | ||
dir: 'notes', | ||
link: '/', | ||
notes: [zhDemoNote], | ||
}) | ||
|
||
/* =================== locale: en-US ======================= */ | ||
|
||
const enDemoNote = defineNoteConfig({ | ||
dir: 'demo', | ||
link: '/demo', | ||
sidebar: ['', 'foo', 'bar'], | ||
}) | ||
|
||
export const enNotes = defineNotesConfig({ | ||
dir: 'en/notes', | ||
link: '/en/', | ||
notes: [enDemoNote], | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { defineThemeConfig } from 'vuepress-theme-plume' | ||
import { enNavbar, zhNavbar } from './navbar' | ||
import { enNotes, zhNotes } from './notes' | ||
|
||
/** | ||
* @see https://theme-plume.vuejs.press/config/basic/ | ||
*/ | ||
export default defineThemeConfig({ | ||
logo: 'https://theme-plume.vuejs.press/plume.png', | ||
// your git repo url | ||
docsRepo: '', | ||
docsDir: 'docs', | ||
|
||
appearance: true, | ||
|
||
social: [ | ||
{ icon: 'github', link: '/' }, | ||
], | ||
|
||
locales: { | ||
'/': { | ||
profile: { | ||
avatar: 'https://theme-plume.vuejs.press/plume.png', | ||
name: 'fuzhou', | ||
description: '福州市所有公园景点的信息', | ||
// circle: true, | ||
// location: '', | ||
// organization: '', | ||
}, | ||
|
||
navbar: zhNavbar, | ||
notes: zhNotes, | ||
}, | ||
'/en/': { | ||
profile: { | ||
avatar: 'https://theme-plume.vuejs.press/plume.png', | ||
name: 'fuzhou', | ||
description: '福州市所有公园景点的信息', | ||
// circle: true, | ||
// location: '', | ||
// organization: '', | ||
}, | ||
|
||
navbar: enNavbar, | ||
notes: enNotes, | ||
}, | ||
}, | ||
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
packages/fujian/fuzhou/docs/.vuepress/theme/components/Custom.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const message = ref('Hello World!') | ||
</script> | ||
|
||
<template> | ||
<div class="my-custom-content"> | ||
{{ message }} | ||
</div> | ||
</template> |
Oops, something went wrong.