Skip to content

Commit

Permalink
docs: add base url configuration in the GitLab deploying section (#1787)
Browse files Browse the repository at this point in the history
Add a step to set a base url for GitLab pages deployment as for Github pages.
  • Loading branch information
Okamidev authored Jan 16, 2023
1 parent 09c2c52 commit 4e459f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/guide/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f

1. Set `outDir` in `docs/.vitepress/config.js` to `../public`.

2. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:
2. Still in your config file, `docs/.vitepress/config.js`, set the `base` property to the name of your GitLab repository. If you plan to deploy your site to `https://foo.gitlab.io/bar/`, then you should set base to `'/bar/'`. It should always start and end with a slash.

3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:

```yaml
image: node:16
Expand Down

0 comments on commit 4e459f6

Please sign in to comment.