Search code examples
gitlabjekylljekyll-themegitlab-pages

How to use remote theme in Jekyll project with Gitlab Pages repo?


I am using linux/firefox and I'm having an issue where a jekyll theme does not work when using remote_theme: inside the .config.yml of a Jekyll project kept in a GitLab pages repo. If I clone the theme just-the-docs (https://pmarsceill.github.io/just-the-docs/) locally, it works fine when theme: is used in the .config.yml. However, when using an example of a remote theme as written by the same author pmarsceill/jtd-remote, and adding remote_theme: instead of theme:, I get the same issue. The theme does not take effect.

I use jtd-remote as an example which gives the same error, though, my goal is to get just-the-docs working as a remote theme.

Clone 'https://github.com/pmarsceill/jtd-remote'
Add url to _config.yml.
Add index.md to top level.
Add to GitLab repo and configure pages.
Browse to repo url on 4000, theme does not take effect.

When using just-the-docs, my .config.yml appears as follows:

# Site settings
title: My site Test
description: "Testing"
baseurl: "/"
url: "https://mysite.gitlab.io"

color_scheme: "dark"
search_enabled: false

# Build settings
remote_theme: pmarsceill/just-the-docs
#remote_theme: "pmarsceill/[email protected]"

plugins:
  - jekyll-feed
  - jekyll-remote-theme
  - jekyll-seo-tag
  - jekyll-sitemap
  - jekyll-mermaid
  - jekyll-spaceship

Any help much appreciated.


Solution

  • GitLab doesn't support remote themes for Jekyll.