0

I am attempting to deploy a website I built using jekyll to gitlab pages. However, only the index page will load properly. All the other links need to have .html appended to the url. So

username.gitlab.io/project/

functions properly, but both

username.gitlab.io/project/about
username.gitlab.io/project/blog

only work if the url is changed to

username.gitlab.io/project/about.html
username.gitlab.io/project/blog.html

Oddly enough when deployed on github pages no amendment to the urls are necessary

username.github.io/project/
username.github.io/project/about
username.github.io/project/blog/

all function properly.

I have a feeling it has something to do with the .gitlab-ci.yml file, but I'm not sure. Here it is if it has any clues

image: ruby:2.5.3

variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8

before_script:
  - bundle install

test:
  stage: test
  script:
  - bundle exec jekyll build -d test
  artifacts:
    paths:
    - test
  except:
  - master

pages:
  stage: deploy
  script:
  - gem install jekyll
  - bundle exec jekyll build -d public
  artifacts:
    paths:
    - public
  only:
  - master
twosheds
  • 1
  • 2

1 Answers1

1

You can use custom permalinks for pages in YAML for eg: permalinks: /project/about

I have been using this in my Jekyll Blog hosting with gitlab and seems it has no problem although repeating on every page could seem a bit tedious.

cdrrazan
  • 138
  • 1
  • 9