Skip to content

Commit 40c0b64

Browse files
authored
fix: change Gitlab Pages default folder, clarify Gitlab settings (#66)
Signed-off-by: alexvoss <alex@corealization.com>
1 parent ae4c0f0 commit 40c0b64

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/publish-your-site.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pages:
8585
- pip install zensical
8686
- zensical build --clean # (1)!
8787
pages:
88-
publish: public
88+
publish: site # (2)!
8989
rules:
9090
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
9191
```
@@ -94,15 +94,23 @@ pages:
9494
functionality will undergo revisions as we optimize the performance of
9595
Zensical.
9696

97-
!!! warning "Prerequisites"
98-
Make sure to change [`site_dir`][site_dir] to `public` in your
99-
configuration as GitLab requires this.
97+
2. The Gitlab documentation says that the SSG should adapt to Gitlab Pages,
98+
which uses the folder `public` by default but it is possible to
99+
[configure the default folder] as shown here.
100+
101+
[configure the default folder]: https://docs.gitlab.com/user/project/pages/introduction/#customize-the-default-folder
100102

101103
When a new commit is pushed to the [default branch] (e.g. `master` or `main`),
102104
the static site is automatically built and deployed. Push your changes to see
103105
the workflow in action.
104106

105-
Your documentation is now published under `<username>.gitlab.io/<repository>`.
107+
!!! note "Gitlab Pages settings"
108+
By default, Gitlab Pages publishes to a domain that includes a random
109+
string. Untick the `Use unique domain` box in your Gitlab Pages settings for
110+
your production deployment. Also make sure to set the visibility for Pages
111+
under `Settings > General > Visibility` if you want a public site.
112+
113+
Your documentation is will now be published under `<username>.gitlab.io/<repository>`.
106114

107115
[GitLab Pages]: https://gitlab.com/pages
108116
[GitLab CI]: https://docs.gitlab.com/ee/ci/
@@ -112,7 +120,7 @@ Your documentation is now published under `<username>.gitlab.io/<repository>`.
112120
## Other
113121

114122
We cannot document every hosting provider here. The following community guides
115-
describe how to deploy a Zensical site elsewhere. If you find an issue with one of these
123+
describe how to deploy a Zensical site elsewhere. If you find an issue with one of these
116124
guides, please contact the author.
117125

118126
* [Azure Static Web Apps with GitHub Actions](https://zensical-guides.hypercat.net/azure-static-web-app-github/)

0 commit comments

Comments
 (0)