From 6ab8b5ffe18c043b6fabc600daa233291e77b168 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Fri, 5 Aug 2016 21:11:39 +0200 Subject: [PATCH 1/2] Documentation : `new-theme` command --- site/_docs/themes.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/site/_docs/themes.md b/site/_docs/themes.md index 2b7155bb63d..52a7b583632 100644 --- a/site/_docs/themes.md +++ b/site/_docs/themes.md @@ -36,20 +36,27 @@ Refer to your selected theme's documentation and source repository for more info ## Creating a theme -Jekyll themes are distributed as Ruby gems. The only required file is the [Ruby Gemspec](http://guides.rubygems.org/specification-reference/). Here's an example of a minimal Gemspec for the `my-awesome-jekyll-theme` theme, saved as `/my-awsome-jekyll-theme.gemspec`: - -{% highlight ruby %} -Gem::Specification.new do |s| - s.name = '' - s.version = '0.1.0' - s.license = 'MIT' - s.summary = '' - s.author = '' - s.email = '' - s.homepage = 'https://github.com/jekyll/my-awesome-jekyll-theme' - s.files = `git ls-files -z`.split("\x0").grep(%r{^_(sass|includes|layouts)/}) -end -{% endhighlight %} +Jekyll themes are distributed as Ruby gems. Don't worry Jekyll will help you scaffold a new theme with the `new-theme` command. Just run `jekyll new-theme` with the theme name as an argument: + +{% highlight shell %} +jekyll new-theme my-awesome-theme + create /path/to/my-awesome-theme/_layouts + create /path/to/my-awesome-theme/_includes + create /path/to/my-awesome-theme/_sass + create /path/to/my-awesome-theme/_layouts/page.html + create /path/to/my-awesome-theme/_layouts/post.html + create /path/to/my-awesome-theme/_layouts/default.html + create /path/to/my-awesome-theme/Gemfile + create /path/to/my-awesome-theme/my-awesome-theme.gemspec + create /path/to/my-awesome-theme/README.md + create /path/to/my-awesome-theme/LICENSE.txt + initialize /path/to/my-awesome-theme/.git + create /path/to/my-awesome-theme/.gitignore +Your new Jekyll theme, my-awesome-theme, is ready for you in /path/to/my-awesome-theme! +For help getting started, read /path/to/my-awesome-theme/README.md. +{% hightlight %} + +Add your template files in the corresponding folders, complete the `.gemspec` and the README files according to your needs. ### Layouts and includes From aa8d7772d58ba50d0fc925499d1e39528134e313 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Fri, 5 Aug 2016 21:25:19 +0200 Subject: [PATCH 2/2] fix hightlight tag --- site/_docs/themes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/_docs/themes.md b/site/_docs/themes.md index 52a7b583632..b4a98194ef3 100644 --- a/site/_docs/themes.md +++ b/site/_docs/themes.md @@ -54,9 +54,9 @@ jekyll new-theme my-awesome-theme create /path/to/my-awesome-theme/.gitignore Your new Jekyll theme, my-awesome-theme, is ready for you in /path/to/my-awesome-theme! For help getting started, read /path/to/my-awesome-theme/README.md. -{% hightlight %} +{% endhighlight %} -Add your template files in the corresponding folders, complete the `.gemspec` and the README files according to your needs. +Add your template files in the corresponding folders, complete the `.gemspec` and the README files according to your needs. ### Layouts and includes