GitHub Pages Import
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
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.
-
Detect a
gh-pagesbranch in the source Github repo and display a checkbox to import the Github Pages to GitLab Pages (checked by default). -
After the user imports (GitLab clone complete), create a new commit on the
gh-pagesbranch that:
-
automatically sets up
.gitlab-ci.ymlwith Jekyll. -
replaces the
github-pagesgem inGemfilewith either a newgitlab-pagesgem, or a bunch of dependencies.The exact required gems can be pulled from the github-pages gem, with the exception of the
jekyll-github-metadatagem. -
ensures
site.gitlab(and for portabilitysite.github) are populated with repository metadata for use in Liquid templates i.e. whatjekyll-github-metadatadoes.I've created a simple gem jekyll-gitlab-metadata which does this. So we can just add
jekyll-gitlab-metadatato theGemfileand the following to_config.ymlplugins: - 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/