Hello, it’s a question about the documentation: Host on GitLab Pages | Hugo
on this page, there is a lot of process just to “publish” the page, why we need to minify ?
why there is no “hugo --environment production”
You do not need to minify, but many site authors want to minify to reduce file size.
Because the default environment is production.
I see, thank you for your answer and the link
also if we just want to build and deploy hugo, using the CI
can the script below is okay ?
.gitlab-ci.yml :
variables:
GIT_DEPTH: 0
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
image:
name: registry.gitlab.com/pages/hugo:latest
pages:
script:
- cd $CI_PROJECT_DIR
- hugo
artifacts:
paths:
- public
publish: public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
because if yes, why download docker image “go bookworm” and add everything into it than just have a “hugo” image with everything into it ?
maybe it should be a better idea to add this example in the documentation or create a new docker image with already everything into it ? IDK.
Regards.
The documented example includes:
- The extended version instead of the standard version
- The Dart Sass transpiler instead of the LibSass transpiler
- Git (required for GitInfo and submodules)
- Go (required for Hugo modules)
- Node.js (required for postcss and other optional dependencies)
- Brotli and gzip for compression
If the example didn’t include these, people would just create more issues and topics such as, “Hugo doesn’t work on GitLab pages, cant find PostCSS”, etc.
If you don’t like the example, create your own workflow.
okay thank you for your answer.
Have a nice afternoon/evening.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.