Start from a local Jekyll project
- Install Jekyll.
- Use jekyll new to create a new Jekyll Project.
- Add this .gitlab-ci.yml to the root of your project.
- Push your repository and changes to GitLab.
but the page is never produced and isn’t listed on the Settings Pages page - what am I missing?
OK, making some progress:
- I created an empty project on GL first
- cloned it and did a “jekyll new --force” into the cloned dir
- copied the gitlab-ci.yml to the root of the project
- pushed back to GL
Now the pipeline show success but I still get a 404 on the URL . . even after 6 minutes . .
The page is finally displaying but without CSS - I will go back and look at that now . .
From the README.md:
CSS is missing! That means two things:
- Either that you have wrongly set up the CSS URL in your templates, or
- your static generator has a configuration option that needs to be explicitly set in order to serve static assets under a relative URL.
I don’t know how to fix either of those things - help?
you probably need a baseurl value - what do your urls look like? if you serve from a project folder on GH or GL your site will end up being a sub folder withing your sub domain, sort of like
The myproject part is your project/repo name and needs to be a part of the urls, this is usually done with the baseurl setting in the config file.
OK, thanks for responding - I will have a closer look at that but I think your response raises another question:
If I change the baseurl in _config.yml, doesn’t that mean that I won’t be able to do development testing locally? - ie I will only be able to edit and push to GL and wait to see if the changes work there? - the problem is of course with that situation (that I am trying to avoid) is that I wait minutes between each push for a result . .
I don’t use baseurl usually so I may have this partly wrong - but I think recent versions of jekyll are smart enough to know that you are working locally and it will ignore the baseurl value. In order for that to happen you may need to use site.url? or another url variable that I don’t remember. But I am fairly sure that if you do it a certain way it will do what you want.
Also, even if it doesn’t work I think all you have to do locally is add the repo name to the local url where it should be and I think that will work too - but requires a bit us user intervention.
OK, thanks for all that - I will check it out!