Pages template (jekyll) outdated and not working as expected
Summary
I wanted to move my page to GitLab pages. Decided, since I still want to dig deeper into Ruby, to use Jekyll. So I created a new project by choosing the Pages/Jekyll template. But after the first build and several minutes of waiting, the output was not what was displayed in the showcase repository at https://pages.gitlab.io/jekyll/.
Steps to reproduce
- create a new project from existing templates
- choose jekyll
- enable build and everything and trigger a pipeline OR pull to build locally
- compare the output which differs from the expected
Example Project
https://gitlab.com/schwedenmut/testproject
What is the current bug behavior?
GitLab uses build in bundles for the creation of these templates. But the templates - here jekyll - seem to be outdated or not working.
What is the expected correct behavior?
I would expect to get what is displayed in the sample application.
Relevant logs and/or screenshots
https://gitlab.com/schwedenmut/testproject) and sample repo (https://gitlab.com/pages/jekyll)
diff between template (diff --git a/jekyll_template_cloned/_config.yml b/jekyll_template_orig/_config.yml
index 3d5fbe6..6ffe686 100644
--- a/jekyll_template_cloned/_config.yml
+++ b/jekyll_template_orig/_config.yml
@@ -16,6 +16,10 @@ baseurl: "/jekyll" # the subpath of your site, e.g. /blog
url: "/" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username: jekyll
+gitlab_username: pages
+
+# Outputting
+permalink: /:categories/:year/:month/:day/:title
# Build settings
markdown: kramdown
diff --git a/jekyll_template_cloned/_includes/footer.html b/jekyll_template_orig/_includes/footer.html
index 72239f1..f4c956b 100644
--- a/jekyll_template_cloned/_includes/footer.html
+++ b/jekyll_template_orig/_includes/footer.html
@@ -14,6 +14,12 @@
<div class="footer-col footer-col-2">
<ul class="social-media-list">
+ {% if site.gitlab_username %}
+ <li>
+ {% include icon-gitlab.html username=site.gitlab_username %}
+ </li>
+ {% endif %}
+
{% if site.github_username %}
<li>
{% include icon-github.html username=site.github_username %}
diff --git a/jekyll_template_orig/_includes/icon-gitlab.html b/jekyll_template_orig/_includes/icon-gitlab.html
new file mode 100644
index 0000000..49ed379
--- /dev/null
+++ b/jekyll_template_orig/_includes/icon-gitlab.html
@@ -0,0 +1 @@
+<a href="https://gitlab.com/{{ include.username }}"><span class="icon icon--gitlab">{% include icon-gitlab.svg %}</span><span class="username">{{ include.username }}</span></a>
diff --git a/jekyll_template_orig/_includes/icon-gitlab.svg b/jekyll_template_orig/_includes/icon-gitlab.svg
new file mode 100644
index 0000000..4aa6f6f
--- /dev/null
+++ b/jekyll_template_orig/_includes/icon-gitlab.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M15.97 9.058l-.895-2.756L13.3.842c-.09-.282-.488-.282-.58 0L10.946 6.3H5.054L3.28.842C3.188.56 2.79.56 2.7.84L.924 6.3.03 9.058c-.082.25.008.526.22.682L8 15.37l7.75-5.63c.212-.156.302-.43.22-.682"/></svg>
Output of checks
This bug happens on GitLab.com
Possible fixes
The bundles in vendor/project_templates
seem not to be automatically reproduced in the packaging process when a new version of GitLab is build. And on the other hand, https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/project_template.rb doesn't seem to use the clone_url
for the extraction process but the outdated bundles.
What about either creating new bundles in the buildchain if the underlaying project is newer than the bundled version, or using only the bundle as fallback but cloning from the clone_url
of each template?