Commit 37410a9d authored by Jason Lenny's avatar Jason Lenny Committed by Lukas Eipert

Add Pages templates

Adds templates for the 5 most popular Pages templates to the new project
menu. This does not add unique icons for the templates because that
turned out more complicated than expected, and this feature is valuable
without them.
parent 232ae06a
......@@ -125,6 +125,26 @@ const bindEvents = () => {
text: 'Spring',
icon: '.template-option svg.icon-java-spring',
},
hugo: {
text: 'Pages/Hugo',
icon: '.template-option svg.icon-pages-hugo',
},
jekyll: {
text: 'Pages/Jekyll',
icon: '.template-option svg.icon-pages-jekyll',
},
plainhtml: {
text: 'Pages/Plain HTML',
icon: '.template-option svg.icon-pages-plainhtml',
},
gitbook: {
text: 'Pages/GitBook',
icon: '.template-option svg.icon-pages-gitbook',
},
hexo: {
text: 'Pages/Hexo',
icon: '.template-option svg.icon-pages-hexo',
},
};
const selectedTemplate = templates[value];
......
......@@ -16,6 +16,9 @@
= _('A project is where you house your files (repository), plan your work (issues), and publish your documentation (wiki), %{among_other_things_link}.').html_safe % { among_other_things_link: among_other_things_link }
%p
= _('All features are enabled for blank projects, from templates, or when importing, but you can disable them afterward in the project settings.')
%p
- pages_getting_started_guide = link_to _('Pages getting started guide'), help_page_path("user/project/pages/getting_started_part_two", anchor: "fork-a-project-to-get-started-from"), target: '_blank'
= _('Information about additional Pages templates and how to install them can be found in our %{pages_getting_started_guide}.').html_safe % { pages_getting_started_guide: pages_getting_started_guide }
.md
= brand_new_project_guidelines
%p
......
---
title: Add templates for most popular Pages templates
merge_request: 24906
author:
type: added
......@@ -27,9 +27,14 @@ module Gitlab
end
TEMPLATES_TABLE = [
ProjectTemplate.new('rails', 'Ruby on Rails', 'Includes an MVC structure, Gemfile, Rakefile, along with many others, to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/rails'),
ProjectTemplate.new('spring', 'Spring', 'Includes an MVC structure, mvnw and pom.xml to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/spring'),
ProjectTemplate.new('express', 'NodeJS Express', 'Includes an MVC structure to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/express')
ProjectTemplate.new('rails', 'Ruby on Rails', _('Includes an MVC structure, Gemfile, Rakefile, along with many others, to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/rails'),
ProjectTemplate.new('spring', 'Spring', _('Includes an MVC structure, mvnw and pom.xml to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/spring'),
ProjectTemplate.new('express', 'NodeJS Express', _('Includes an MVC structure to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/express'),
ProjectTemplate.new('hugo', 'Pages/Hugo', _('Everything you need to create a GitLab Pages site using Hugo.'), 'https://gitlab.com/pages/hugo'),
ProjectTemplate.new('jekyll', 'Pages/Jekyll', _('Everything you need to create a GitLab Pages site using Jekyll.'), 'https://gitlab.com/pages/jekyll'),
ProjectTemplate.new('plainhtml', 'Pages/Plain HTML', _('Everything you need to create a GitLab Pages site using plain HTML.'), 'https://gitlab.com/pages/plain-html'),
ProjectTemplate.new('gitbook', 'Pages/GitBook', _('Everything you need to create a GitLab Pages site using GitBook.'), 'https://gitlab.com/pages/gitbook'),
ProjectTemplate.new('hexo', 'Pages/Hexo', _('Everything you need to create a GitLab Pages site using Hexo.'), 'https://gitlab.com/pages/hexo')
].freeze
class << self
......
......@@ -3157,6 +3157,21 @@ msgstr ""
msgid "Everyone can contribute"
msgstr ""
msgid "Everything you need to create a GitLab Pages site using GitBook."
msgstr ""
msgid "Everything you need to create a GitLab Pages site using Hexo."
msgstr ""
msgid "Everything you need to create a GitLab Pages site using Hugo."
msgstr ""
msgid "Everything you need to create a GitLab Pages site using Jekyll."
msgstr ""
msgid "Everything you need to create a GitLab Pages site using plain HTML."
msgstr ""
msgid "Except policy:"
msgstr ""
......@@ -3908,12 +3923,24 @@ msgstr ""
msgid "Include the username in the URL if required: <code>https://username@gitlab.company.com/group/project.git</code>."
msgstr ""
msgid "Includes an MVC structure to help you get started."
msgstr ""
msgid "Includes an MVC structure, Gemfile, Rakefile, along with many others, to help you get started."
msgstr ""
msgid "Includes an MVC structure, mvnw and pom.xml to help you get started."
msgstr ""
msgid "Incompatible Project"
msgstr ""
msgid "Indicates whether this runner can pick jobs without tags"
msgstr ""
msgid "Information about additional Pages templates and how to install them can be found in our %{pages_getting_started_guide}."
msgstr ""
msgid "Inline"
msgstr ""
......@@ -5077,6 +5104,9 @@ msgstr ""
msgid "Pages Domains"
msgstr ""
msgid "Pages getting started guide"
msgstr ""
msgid "Pagination|Last »"
msgstr ""
......
......@@ -6,7 +6,12 @@ describe Gitlab::ProjectTemplate do
expected = [
described_class.new('rails', 'Ruby on Rails', 'Includes an MVC structure, .gitignore, Gemfile, and more great stuff', 'https://gitlab.com/gitlab-org/project-templates/rails'),
described_class.new('spring', 'Spring', 'Includes an MVC structure, .gitignore, Gemfile, and more great stuff', 'https://gitlab.com/gitlab-org/project-templates/spring'),
described_class.new('express', 'NodeJS Express', 'Includes an MVC structure, .gitignore, Gemfile, and more great stuff', 'https://gitlab.com/gitlab-org/project-templates/express')
described_class.new('express', 'NodeJS Express', 'Includes an MVC structure, .gitignore, Gemfile, and more great stuff', 'https://gitlab.com/gitlab-org/project-templates/express'),
described_class.new('hugo', 'Pages/Hugo', 'Everything you need to get started using a Hugo Pages site.', 'https://gitlab.com/pages/hugo'),
described_class.new('jekyll', 'Pages/Jekyll', 'Everything you need to get started using a Jekyll Pages site.', 'https://gitlab.com/pages/jekyll'),
described_class.new('plainhtml', 'Pages/Plain HTML', 'Everything you need to get started using a plain HTML Pages site.', 'https://gitlab.com/pages/plain-html'),
described_class.new('gitbook', 'Pages/GitBook', 'Everything you need to get started using a GitBook Pages site.', 'https://gitlab.com/pages/gitbook'),
described_class.new('hexo', 'Pages/Hexo', 'Everything you need to get started using a plan Hexo Pages site.', 'https://gitlab.com/pages/hexo')
]
expect(described_class.all).to be_an(Array)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment