GitHub Pages Import

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

Automatically import Github Pages as Jekyll GitLab Pages.

Further details

GitLab Pages are significantly more flexible than GitHub Pages, but they also take a little bit of work to setup. When importing a project from Github, GitLab should offer a checkbox (per repo, checked by default) to automatically setup equivalent GitLab Pages.

Proposal

Given Github only supports Jekyll, we can detect the presence of a gh-pages branch and automatically setup Jekyll for the project.

  1. Detect a gh-pages branch in the source Github repo and display a checkbox to import the Github Pages to GitLab Pages (checked by default).

  2. After the user imports (GitLab clone complete), create a new commit on the gh-pages branch that:

  • automatically sets up .gitlab-ci.yml with Jekyll.

  • replaces the github-pages gem in Gemfile with either a new gitlab-pages gem, or a bunch of dependencies.

    The exact required gems can be pulled from the github-pages gem, with the exception of the jekyll-github-metadata gem.

  • ensures site.gitlab (and for portability site.github) are populated with repository metadata for use in Liquid templates i.e. what jekyll-github-metadata does.

    I've created a simple gem jekyll-gitlab-metadata which does this. So we can just add jekyll-gitlab-metadata to the Gemfile and the following to _config.yml

    plugins:
      - jekyll-gitlab-metadata

What does success look like, and how can we measure that?

Users should be able to bulk import all their repositories and have equivalent GitLab Pages generated without any additional work on the user's part.

Links / references

https://help.github.com/articles/about-github-pages-and-jekyll/

https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/

Edited Aug 25, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading