From 4e459f65e22e66367836a3a985f9b0a88a4c95ab Mon Sep 17 00:00:00 2001 From: Sylvain Bonnard Date: Mon, 16 Jan 2023 10:14:18 +0100 Subject: [PATCH] docs: add base url configuration in the GitLab deploying section (#1787) Add a step to set a base url for GitLab pages deployment as for Github pages. --- docs/guide/deploying.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/deploying.md b/docs/guide/deploying.md index a5eebdb9b030..e4ac13550fa3 100644 --- a/docs/guide/deploying.md +++ b/docs/guide/deploying.md @@ -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