Skip to content

Commit

Permalink
docs: update links (#523)
Browse files Browse the repository at this point in the history
* docs: update links

* docs: fix 3xx urls

* chore: fix typo
  • Loading branch information
brc-dd authored Feb 22, 2022
1 parent 779b789 commit 33a59cd
Show file tree
Hide file tree
Showing 24 changed files with 69 additions and 74 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "\U0001F41E Bug report"
description: Create a report to help us improve
labels: ["bug: pending triage"]
labels: ['bug: pending triage']
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -52,9 +52,9 @@ body:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://vuejs.org/coc)
- label: Follow our [Code of Conduct](https://vuejs.org/about/coc.html)
required: true
- label: Read the [docs](https://vitepress.vuejs.org/).
- label: Read the [docs](https://vitepress.vuejs.org).
required: true
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
required: true
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ body:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://vuejs.org/coc)
- label: Follow our [Code of Conduct](https://vuejs.org/about/coc.html)
required: true
- label: Read the [docs](https://vitepress.vuejs.org/).
- label: Read the [docs](https://vitepress.vuejs.org).
required: true
- label: Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).
- label: Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).
required: true
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- label: Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
required: true
10 changes: 5 additions & 5 deletions .github/commit-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Messages must be matched by the following regex:

``` js
```js
/^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/
```

Expand Down Expand Up @@ -44,7 +44,7 @@ This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

### Full Message Format

A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:

```
<type>(<scope>): <subject>
Expand Down Expand Up @@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp

The subject contains a succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

### Body

Expand Down
4 changes: 2 additions & 2 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Hi! We're really excited that you are interested in contributing to VitePress. B

- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.

- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated.
- Commit messages must follow the [commit message convention](./commit-convention) so that changelogs can be automatically generated.

## Development Setup

You will need [pnpm](https://pnpm.io/)
You will need [pnpm](https://pnpm.io)

After cloning the repo, run:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"
cache: 'pnpm'

- name: Install deps
run: pnpm install
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@

---

VitePress is [VuePress](http://vuepress.vuejs.org/)' spiritual successor, built on top of [vite](https://github.com/vuejs/vite).
VitePress is [VuePress](https://vuepress.vuejs.org)' spiritual successor, built on top of [vite](https://github.com/vitejs/vite).

## Documentation

To check out docs, visit [vitepress.vuejs.org](https://vitepress.vuejs.org).

## Changelog

Detailed changes for each release are documented in the [CHANGELOG](https://github.com/vuejs/vitepress/blob/master/CHANGELOG.md).
Detailed changes for each release are documented in the [CHANGELOG](./CHANGELOG).

## Contribution

Please make sure to read the [Contributing Guide](./.github/contributing.md) before making a pull request.
Please make sure to read the [Contributing Guide](./.github/contributing) before making a pull request.

## License

[MIT](https://opensource.org/licenses/MIT)
[MIT](./LICENSE)

Copyright (c) 2019-present, Yuxi (Evan) You
2 changes: 1 addition & 1 deletion docs/components/ComponentInHeader.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<template>
<span>&#x26A1;</span>
</template>
</template>
4 changes: 2 additions & 2 deletions docs/config/algolia-search.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Theme Config: Algolia Search

The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://docsearch.algolia.com/). To enable it, you need to provide at least apiKey and indexName:
The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://docsearch.algolia.com). To enable it, you need to provide at least apiKey and indexName:

```js
module.exports = {
Expand All @@ -13,7 +13,7 @@ module.exports = {
}
```

For more options, check out [Algolia DocSearch's documentation](https://docsearch.algolia.com/docs/behavior). You can pass any extra option alongside other options, e.g. passing `searchParameters`:
For more options, check out [Algolia DocSearch's documentation](https://docsearch.algolia.com/docs/api/). You can pass any extra option alongside other options, e.g. passing `searchParameters`:

```js
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion docs/config/basics.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# App Config: Basics

::: tip
The config reference is incomplete since the config format may still receive further changes. For a complete reference of the current available options, refer to [config.ts](https://github.com/vuejs/vitepress/blob/master/src/node/config.ts#L15).
The config reference is incomplete since the config format may still receive further changes. For a complete reference of the current available options, refer to [config.ts](https://github.com/vuejs/vitepress/blob/45b65ce8b63bd54f345bfc3383eb2416b6769dc9/src/node/config.ts#L30-L65).
:::

## base
Expand Down
1 change: 0 additions & 1 deletion docs/config/homepage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ features:
details: VitePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded.
footer: MIT Licensed | Copyright © 2019-present Evan You
---

```
6 changes: 3 additions & 3 deletions docs/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The following methods are globally importable from `vitepress` and are typically used in custom theme Vue components. However, they are also usable inside `.md` pages because markdown files are compiled into Vue single-file components.

Methods that start with `use*` indicates that it is a [Vue 3 Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html) function that can only be used inside `setup()` or `<script setup>`.
Methods that start with `use*` indicates that it is a [Vue 3 Composition API](https://vuejs.org/guide/introduction.html#composition-api) function that can only be used inside `setup()` or `<script setup>`.

### `useData`

Expand Down Expand Up @@ -63,15 +63,15 @@ interface Router {

- **Type**: `(path: string) => string`

Appends the configured [`base`](/config/basics.html#base) to a given URL path. Also see [Base URL](/guide/assets.html#base-url).
Appends the configured [`base`](../config/basics#base) to a given URL path. Also see [Base URL](./assets#base-url).

## Global Components

VitePress comes with few built-in component that can be used globally. You may use these components in your markdown or your custom theme configuration.

### `<Content/>`

The `<Content/>` component displays the rendered markdown contents. Useful [when creating your own theme](https://vitepress.vuejs.org/guide/customization.html).
The `<Content/>` component displays the rendered markdown contents. Useful [when creating your own theme](./theming).

```vue
<template>
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ However, if you are authoring a theme component that links to assets dynamically
<img :src="theme.logoPath" />
```

In this case it is recommended to wrap the path with the [`withBase` helper](/guide/api.html#withbase) provided by VitePress:
In this case it is recommended to wrap the path with the [`withBase` helper](./api#withbase) provided by VitePress:

```vue
<script setup>
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
}
```

Check out the [Config Reference](/config/basics) for a full list of options.
Check out the [Config Reference](../config/basics) for a full list of options.

## Config Intellisense

Expand Down
18 changes: 9 additions & 9 deletions docs/guide/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git main
# if you are deploying to https://<USERNAME>.github.io/<REPO>
# git push -f [email protected]:<USERNAME>/<REPO>.git master:gh-pages
# git push -f [email protected]:<USERNAME>/<REPO>.git main:gh-pages
cd -
```
Expand All @@ -106,7 +106,7 @@ You can also run the above script in your CI setup to enable automatic deploymen

3. Run `yarn` or `npm install` locally and commit the generated lockfile (that is `yarn.lock` or `package-lock.json`).

4. Use the GitHub Pages deploy provider template, and follow the [Travis CI documentation](https://docs.travis-ci.com/user/deployment/pages/).
4. Use the GitHub Pages deploy provider template, and follow the [Travis CI documentation](https://docs.travis-ci.com/user/deployment/pages).

```yaml
language: node_js
Expand All @@ -125,7 +125,7 @@ deploy:
github_token: $GITHUB_TOKEN
keep_history: true
on:
branch: master
branch: main
```
## GitLab Pages and GitLab CI
Expand Down Expand Up @@ -153,12 +153,12 @@ pages:
paths:
- public
only:
- master
- main
```

## Netlify

1. On [Netlify](https://netlify.com), setup up a new project from GitHub with the following settings:
1. On [Netlify](https://www.netlify.com/), setup up a new project from GitHub with the following settings:

- **Build Command:** `vitepress build docs` or `yarn docs:build` or `npm run docs:build`
- **Publish directory:** `docs/.vitepress/dist`
Expand Down Expand Up @@ -247,17 +247,17 @@ $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git

```bash
# publish site
$ git push heroku master
$ git push heroku main
# opens a browser to view the Dashboard version of Heroku CI
$ heroku open
```

## Vercel

To deploy your VitePress app with a [Vercel for Git](https://vercel.com/docs/git), make sure it has been pushed to a Git repository.
To deploy your VitePress app with a [Vercel for Git](https://vercel.com/docs/concepts/git), make sure it has been pushed to a Git repository.

Go to https://vercel.com/import/git and import the project into Vercel using your Git of choice (GitHub, GitLab or BitBucket). Follow the wizard to select the project root with the project's `package.json` and override the build step using `yarn docs:build` or `npm run docs:build` and the output dir to be `./docs/.vitepress/dist`
Go to https://vercel.com/new and import the project into Vercel using your Git of choice (GitHub, GitLab or BitBucket). Follow the wizard to select the project root with the project's `package.json` and override the build step using `yarn docs:build` or `npm run docs:build` and the output dir to be `./docs/.vitepress/dist`

![Override Vercel Configuration](../images/vercel-configuration.png)

Expand Down
7 changes: 4 additions & 3 deletions docs/guide/differences-from-vuepress.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
sidebarDepth: 2
---

# Differences from VuePress

VitePress and VuePress have different [design goals](../index.md). Both projects share similar config naming conventions. VitePress aims to have the bare minimum features needed for authoring docs. Other features are pushed to Themes. On the other hand, VuePress has more features out-of-the-box or enabled by its ecosystem of plugins.
Expand All @@ -22,11 +23,11 @@ In case you decide to move your project to VitePress, this is a list of differen
- [Plugins](https://vuepress.vuejs.org/plugin/) support, features are implemented in themes
- [permalink support](https://vuepress.vuejs.org/guide/permalinks.html)
- `.vitepress/templates`
- Components in `.vitepress/components` [are not auto registered as global components](https://vuepress.vuejs.org/)
- Components in `.vitepress/components` [are not auto registered as global components](https://vuepress.vuejs.org)
- Differences
- [Public files](https://vuepress.vuejs.org/guide/assets.html#public-files) that are directly copied to dist root moved from `.vitepress/public/` is `public/`
- [styling](https://vuepress.vuejs.org/config/#styling) `.vitepress/styles/index.styl` and `.vitepress/styles/palette.styl` is not supported. See [Customizing CSS](/guide/theming.html#customizing-css).
- [App Level Enhancements](https://vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements) API, app enhancements `.vitepress/enhanceApp.js` is now done in `.vitepress/theme/index.js`. See [Extending the Default Theme](/guide/theming.html#extending-the-default-theme).
- [styling](https://vuepress.vuejs.org/config/#styling) `.vitepress/styles/index.styl` and `.vitepress/styles/palette.styl` is not supported. See [Customizing CSS](./theming#customizing-css).
- [App Level Enhancements](https://vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements) API, app enhancements `.vitepress/enhanceApp.js` is now done in `.vitepress/theme/index.js`. See [Extending the Default Theme](./theming#extending-the-default-theme).

## Markdown

Expand Down
1 change: 0 additions & 1 deletion docs/guide/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ head:
- name: keywords
content: super duper SEO
---

```

### navbar
Expand Down
3 changes: 1 addition & 2 deletions docs/guide/global-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VitePress comes with few built-in component that can be used globally. You may u

## Content

The `Content` component displays the rendered markdown contents. Useful [when creating your own theme](https://vitepress.vuejs.org/guide/customization.html).
The `Content` component displays the rendered markdown contents. Useful [when creating your own theme](./theming).

```vue
<template>
Expand All @@ -30,4 +30,3 @@ If you are using or demoing components that are not SSR-friendly (for example, c
## OutboundLink

The indicator `OutboundLink` is used to denote external links. In VitePress, this component has been followed by every external link.

10 changes: 7 additions & 3 deletions docs/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Outbound links automatically get `target="_blank" rel="noopener noreferrer"`:

## Frontmatter

[YAML frontmatter](https://jekyllrb.com/docs/frontmatter/) is supported out of the box:
[YAML frontmatter](https://jekyllrb.com/docs/front-matter/) is supported out of the box:

```yaml
---
Expand All @@ -64,7 +64,7 @@ lang: en-US

This data will be available to the rest of the page, along with all custom and theming components.

For more details, see [Frontmatter](./frontmatter.md).
For more details, see [Frontmatter](./frontmatter).

## GitHub-Style Tables

Expand Down Expand Up @@ -176,9 +176,11 @@ Danger zone, do not proceed
:::

::: details Click me to view the code

```js
console.log('Hello, VitePress!')
```

:::
````

Expand All @@ -189,14 +191,16 @@ Danger zone, do not proceed
:::

::: details Click me to view the code

```js
console.log('Hello, VitePress!')
```

:::

## Syntax Highlighting in Code Blocks

VitePress uses [Prism](https://prismjs.com/) to highlight language syntax in Markdown code blocks, using coloured text. Prism supports a wide variety of programming languages. All you need to do is append a valid language alias to the beginning backticks for the code block:
VitePress uses [Prism](https://prismjs.com) to highlight language syntax in Markdown code blocks, using coloured text. Prism supports a wide variety of programming languages. All you need to do is append a valid language alias to the beginning backticks for the code block:

**Input**

Expand Down
8 changes: 3 additions & 5 deletions docs/guide/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
</template>
```

The default export is the only contract for a custom theme. Inside your custom theme, it works just like a normal Vite + Vue 3 application. Do note the theme also needs to be [SSR-compatible](/guide/using-vue.html#browser-api-access-restrictions).
The default export is the only contract for a custom theme. Inside your custom theme, it works just like a normal Vite + Vue 3 application. Do note the theme also needs to be [SSR-compatible](./using-vue#browser-api-access-restrictions).

To distribute a theme, simply export the object in your package entry. To consume an external theme, import and re-export it from the custom theme entry:

Expand Down Expand Up @@ -108,7 +108,7 @@ export default DefaultTheme
}
```

See [default theme CSS variables](https://github.com/vuejs/vitepress/blob/master/src/client/theme-default/styles/vars.css) that can be overridden.
See [default theme CSS variables](https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css) that can be overridden.

### Layout Slots

Expand All @@ -135,9 +135,7 @@ const { Layout } = DefaultTheme
<template>
<Layout>
<template #sidebar-top>
My custom sidebar top content
</template>
<template #sidebar-top>My custom sidebar top content</template>
</Layout>
</template>
```
Expand Down
Loading

0 comments on commit 33a59cd

Please sign in to comment.