diff options
Diffstat (limited to 'doc/user/project/pages/public_folder.md')
-rw-r--r-- | doc/user/project/pages/public_folder.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/user/project/pages/public_folder.md b/doc/user/project/pages/public_folder.md index 8471a4ec55a..39d80517bc7 100644 --- a/doc/user/project/pages/public_folder.md +++ b/doc/user/project/pages/public_folder.md @@ -126,6 +126,15 @@ pages: NOTE: GitLab Pages supports only static sites. +By default, Nuxt uses the `public` folder to store static assets. For GitLab +Pages, rename the `public` folder to a collision-free alternative first: + +1. In your project directory, run: + + ```shell + mv public static + ``` + 1. Add the following to your `nuxt.config.js`: ```javascript @@ -133,6 +142,12 @@ GitLab Pages supports only static sites. target: 'static', generate: { dir: 'public' + }, + dir: { + // The folder name Nuxt uses for static files (`public`) is already + // reserved for the build output. So in deviation from the defaults we're + // using a folder called `static` instead. + public: 'static' } } ``` |