From what you say it seems to me that this is not a hugo issue but rather something like your theme trying to load the CSS from the webroot by starting with / such as <link rel="stylesheet" href="/css/style.css">.
You may debug this by opening the HTML source of your page then looking at the corresponding template in your theme
I have these issues:
a. CSS was built but GL Pages does not appear to have, e.g. wrong link to CSS? see b.
b. all links on that page to local pages, look like user.gitlab.io/repo-name/repo-name/page/hello/
I guess for reasons of b. CSS does not load.
Any idea whether that is a GL or HUGO issue, perhaps due to the GI file?
Note that the theme author writes to run the Hugo server like this hugo server -t hello-friend and not like it’s shown on gohugo: hugo server
Thanks for the help. Much appreciated.
Update: The issue could to be that generating the static site locally with hugo results in (obvious I guess) the same static artefact that GL generates via their CI. Is it a theme issue then?
It doesn’t really make any difference. Hugo can work with both of these formats within a single project.
Right. So you have set the baseURL as baseURL: blog.blended.io and this is published on Gitlab Pages at https://blendedio.gitlab.io/blog.blended.io/
I suppose that the above is just a temporary URL since the final one will be blog.blended.io. As a rule of thumb it’s always best to test a website by making the baseURL value exactly the same as the URL under which the project will be published.
But in this particular case the missing stylesheet has the wrong URL for another reason. If you have a look at:
You will see that the theme author has entered a forward slash in the beginning of the href attribute.
That forward slash points to the host root of a domain. You have assigned your project’s baseURL to a subdomain and Hugo cannot guess the correct URL in this scenario.
Therefore you need to override the above partial from the theme you’ve chosen to use.
Under the root of your Hugo project there is already an empty /layouts/ directory.
Within this directory replicate the folder structure of the above partial. i.e. /layouts/partials/inject.stylesheet.html
Then within inject.stylesheet.html enter the following:
<link rel="stylesheet" href="assets/style.css">
Test again and if this does not fix the missing CSS then test your project under its intended subdomain and not the GitLab one.