Skip to content

Commit 4b4cfcd

Browse files
committed
build: migrate docs into a separate repo
0 parents  commit 4b4cfcd

File tree

164 files changed

+27902
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+27902
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
!.vuepress/
2+
!.*.js
3+
.cache/
4+
.temp/
5+
node_modules/
6+
dist/

.eslintrc.cjs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
root: true,
3+
extends: 'vuepress',
4+
overrides: [
5+
{
6+
files: ['*.ts', '*.vue'],
7+
extends: 'vuepress-typescript',
8+
parserOptions: {
9+
project: ['tsconfig.json'],
10+
},
11+
},
12+
],
13+
}

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* text eol=lf
2+
*.txt text eol=crlf
3+
4+
*.png binary
5+
*.jpg binary
6+
*.jpeg binary
7+
*.ico binary
8+
*.tff binary
9+
*.woff binary
10+
*.woff2 binary

.github/ISSUE_TEMPLATE/bug_report.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
title: '[Bug report] '
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: textarea
10+
id: bug-description
11+
attributes:
12+
label: Description
13+
description: A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem. If you intend to submit a PR for this issue, tell us in the description. Thanks!
14+
placeholder: Bug description
15+
validations:
16+
required: true

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question & Discussion
4+
url: https://github.com/vuepress/docs/discussions
5+
about: Please ask and answer questions here.

.github/workflows/check-docs.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: check-docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
check-docs:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
node: ['18', '20']
19+
bundler: ['vite', 'webpack']
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v2
28+
29+
- name: Use Node.js ${{ matrix.node }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node }}
33+
cache: pnpm
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Build source code
39+
run: pnpm build
40+
41+
- name: Build docs with ${{ matrix.bundler }}
42+
run: pnpm docs:build
43+
env:
44+
DOCS_BUNDLER: ${{ matrix.bundler }}
45+
46+
check-docs-result:
47+
if: ${{ always() }}
48+
name: check-docs result
49+
runs-on: ubuntu-latest
50+
needs: [check-docs]
51+
steps:
52+
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
53+
run: exit 1

.github/workflows/docs.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
docs:
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
DOCS_GA_ID: G-CTB8FQ7VMW
15+
NODE_VERSION: '18'
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v2
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ env.NODE_VERSION }}
29+
cache: pnpm
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build documentation site
35+
run: pnpm docs:build
36+
37+
- name: Deploy to GitHub Pages
38+
uses: crazy-max/ghaction-github-pages@v4
39+
with:
40+
repo: vuepress/vuepress.github.io
41+
target_branch: main
42+
build_dir: docs/.vuepress/dist
43+
env:
44+
GH_PAT: ${{ secrets.GH_PAGES_TOKEN }}

.github/workflows/issue-commented.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: issue-commented
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
issue-commented:
9+
name: remove stale on commented
10+
if: contains(github.event.issue.labels.*.name, 'stale')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions-cool/issues-helper@v3
14+
with:
15+
actions: 'remove-labels'
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
labels: 'stale'

.github/workflows/issue-daily.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: issue-daily
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
issue-label-stale:
9+
name: label stale issues
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions-cool/issues-helper@v3
13+
with:
14+
actions: 'check-inactive'
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
inactive-day: 15
17+
inactive-label: 'stale'
18+
exclude-labels: 'bug, documentation, enhancement, feature, help wanted, need reproduction, need review, stale'
19+
body: |
20+
This issue is marked as `stale` because it has not had recent activity. Issues marked with `stale` will be closed if they have no activity within 7 days.
21+
22+
issue-close-stale:
23+
name: close stale issues
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions-cool/issues-helper@v3
27+
with:
28+
actions: 'close-issues'
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
labels: 'stale'
31+
inactive-day: 7
32+
33+
issue-close-need-reproduction:
34+
name: close need-reproduction issues
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions-cool/issues-helper@v3
38+
with:
39+
actions: 'close-issues'
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
labels: 'need reproduction'
42+
inactive-day: 7

.github/workflows/issue-labeled.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: issue-labeled
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
jobs:
8+
issue-invalid:
9+
name: close invalid issue
10+
if: github.event.label.name == 'invalid'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions-cool/issues-helper@v3
14+
with:
15+
actions: 'close-issue, create-comment'
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
body: |
18+
Hello @${{ github.event.issue.user.login }}. This issue is marked as `invalid` and closed. Please follow the issue template.
19+
20+
issue-need-reproduction:
21+
name: need reproduction
22+
if: github.event.label.name == 'need reproduction'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions-cool/issues-helper@v3
26+
with:
27+
actions: 'create-comment'
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
body: |
30+
Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [v2.vuepress.vuejs.org/new](https://v2.vuepress.vuejs.org/new). Issues marked with `need reproduction` will be closed if they have no activity within 7 days.

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# VuePress files
2+
docs/.vuepress/.temp/
3+
docs/.vuepress/.cache/
4+
docs/.vuepress/dist/
5+
6+
# Node modules
7+
node_modules/
8+
9+
# MacOS Desktop Services Store
10+
.DS_Store
11+
12+
# Log files
13+
*.log

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm lint-staged

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pnpm-lock.yaml
2+
*.html
3+
*.md

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"vue.volar"
6+
]
7+
}

.vscode/settings.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.insertSpaces": true,
5+
"editor.tabSize": 2,
6+
"files.encoding": "utf8",
7+
"files.eol": "\n",
8+
"files.trimFinalNewlines": true,
9+
"files.trimTrailingWhitespace": true,
10+
"[markdown]": {
11+
"files.trimTrailingWhitespace": false
12+
},
13+
"typescript.tsdk": "node_modules/typescript/lib",
14+
"eslint.validate": [
15+
"javascript",
16+
"javascriptreact",
17+
"typescript",
18+
"typescriptreact",
19+
"vue"
20+
],
21+
"cSpell.words": [
22+
"composables",
23+
"devtool",
24+
"docsearch",
25+
"envinfo",
26+
"esbuild",
27+
"frontmatter",
28+
"globby",
29+
"gtag",
30+
"mdit",
31+
"nprogress",
32+
"prefetch",
33+
"preload",
34+
"prismjs",
35+
"shiki",
36+
"slugify",
37+
"unmount",
38+
"vuejs",
39+
"vuepress",
40+
"vueuse",
41+
"zoomable"
42+
]
43+
}

CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# VuePress Documentation Contributing Guide
2+
3+
## Overview
4+
5+
VuePress documentation is powered by VuePress itself, which is built from the source code of this repository.
6+
7+
All the markdown source files are placed in `docs` directory. We are maintaining two translations:
8+
9+
- English (en-US) in `/` path
10+
- Chinese (zh-CN) in `/zh/` path
11+
12+
We have two different deployments:
13+
14+
- Release deployment powered by [Netlify](https://www.netlify.com). This deployment is built from the latest released version, so users will not see unreleased changes. The domain name is [https://v2.vuepress.vuejs.org](https://v2.vuepress.vuejs.org).
15+
- Developer deployment powered by [GitHub Pages](https://pages.github.com). This deployment is built from the latest commit, so developers could preview the latest changes. The domain name is [https://vuepress.github.io](https://vuepress.github.io).

CONTRIBUTING_zh.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# VuePress 文档贡献指南
2+
3+
## 概览
4+
5+
VuePress 的文档是由 VuePress 自己驱动的,是由该仓库中的源码构建而来。
6+
7+
所有的 Markdown 源文件都放置在 `docs` 目录下。我们维护了两种翻译:
8+
9+
- 英语 (en-US) 在 `/` 路径下
10+
- 中文 (zh-CN) 在 `/zh/` 路径下
11+
12+
我们部署了两套站点:
13+
14+
-[Netlify](https://www.netlify.com) 部署的 Release 版本。该站点是从最新发布的版本中构建而来,因此用户不会看到未发布的改动。域名为 [https://v2.vuepress.vuejs.org](https://v2.vuepress.vuejs.org)
15+
-[GitHub Pages](https://pages.github.com) 部署的 Developer 版本。该站点是从最新的提交中构建而来,因此开发者可以预览最新的改动。域名为 [https://vuepress.github.io](https://vuepress.github.io)

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018-present, VuePress Community
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)