I have a personal Hugo site, using the Hyde-Hyde theme, that is as expected when I build/serve it locally, but when deployed online via gitlab-pages has two problems:
The styling is completely off/missing (see image below)
Viewing that repo requires a login, check it is set to public access.
Looking at your code, you may have set your baseURL incorrectly, or are resolving your style sheets to the appropriate path. Can’t tell without seeing the code.
First thing, make sure your URL is set to https://maxpowerwastaken.gitlab.io/model-idiot/ (including the sub-directory path).
Yep, fixing the baseURL fixes your posts paths, as well. That’s likely your issue.
Hey thanks a lot Maiki, that was very helpful. A couple responses:
my gitlab repo is already set to public (just double-checked). Although looking into gitlab permissions docs, it says " Any logged in user will have Guest permissions on the repository." So even public projects are not accessible to any web browser with the link? Weird…
you’re definitely right on the baseurl, thanks! I had it set to https://maxpowerwastaken.gitlab.io/ without the sub-directory path.
After fixing the baseurl, my gitlab CI/CD pipeline failed, but with some helpful error messages:
$ hugo
Building sites … ERROR 2020/02/26 18:46:24 Transformation failed: TOCSS: failed to transform "scss/hyde-hyde.scss" (text/x-scss): this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
ERROR 2020/02/26 18:46:24 Transformation failed: TOCSS: failed to transform "scss/print.scss" (text/x-scss): this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Total in 171 ms
Error: Error building site: logged 2 error(s)
ERROR: Job failed: exit code 255
…looking into those now, will update here with resolution or any further question.
ok so the links from the CI/CD build failure point to Hugo docs suggesting I need the Hugo-extended version. That makes sense, I have Hugo-extended on my machine (where it builds correctly), but the image I’m pulling in my .gitlab-ci.yml is: image: registry.gitlab.com/pages/hugo:0.65.3. Thanks for the super helpful error message and docs, hugo team!
Updating the image in my .gitlab-ci.yml to image: registry.gitlab.com/pages/hugo/hugo_extended:0.65.3 now…
Conclusion: it worked! Thanks again Maiki, much obliged.