Merge branch 'master' into ruby-2.4.0

This commit is contained in:
ashmaroli 2017-01-28 15:27:49 +05:30 committed by GitHub
commit a1d98bec82
180 changed files with 1754 additions and 958 deletions

View File

@ -23,7 +23,7 @@ exclude_paths:
- features/**/* - features/**/*
- script/**/* - script/**/*
- site/**/* - docs/**/*
- spec/**/* - spec/**/*
- test/**/* - test/**/*
- vendor/**/* - vendor/**/*

View File

@ -22,6 +22,8 @@ Metrics/BlockLength:
Exclude: Exclude:
- test/**/*.rb - test/**/*.rb
- lib/jekyll/configuration.rb - lib/jekyll/configuration.rb
- rake/*.rake
- jekyll.gemspec
Metrics/ClassLength: Metrics/ClassLength:
Exclude: Exclude:
- !ruby/regexp /features\/.*.rb$/ - !ruby/regexp /features\/.*.rb$/
@ -32,6 +34,8 @@ Metrics/CyclomaticComplexity:
Metrics/LineLength: Metrics/LineLength:
Exclude: Exclude:
- !ruby/regexp /features\/.*.rb/ - !ruby/regexp /features\/.*.rb/
- Rakefile
- rake/*.rake
Max: 90 Max: 90
Severity: warning Severity: warning
Metrics/MethodLength: Metrics/MethodLength:
@ -44,6 +48,14 @@ Metrics/ParameterLists:
Max: 4 Max: 4
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Max: 8 Max: 8
Security/MarshalLoad:
Exclude:
- !ruby/regexp /test\/.*.rb$/
- lib/jekyll/regenerator.rb
Security/YAMLLoad:
Exclude:
- !ruby/regexp /features\/.*.rb/
- !ruby/regexp /test\/.*.rb$/
Style/Alias: Style/Alias:
Enabled: false Enabled: false
Style/AlignArray: Style/AlignArray:
@ -127,5 +139,7 @@ Style/StringLiterals:
EnforcedStyle: double_quotes EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation: Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes EnforcedStyle: double_quotes
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/UnneededCapitalW: Style/UnneededCapitalW:
Enabled: false Enabled: false

View File

@ -6,10 +6,10 @@ sudo: false
rvm: rvm:
- &ruby1 2.4.0 - &ruby1 2.4.0
- &ruby2 2.3.1 - &ruby1 2.3.3
- &ruby3 2.2.5 - &ruby2 2.2.6
- &ruby4 2.1.9 - &ruby3 2.1.9
- &jruby jruby-9.1.2.0 - &jruby jruby-9.1.7.0
matrix: matrix:
include: include:
@ -46,3 +46,6 @@ addons:
DA4vsRURfABU0fIhwYkQuZqEcA3d8TL36BZcGEshG6MQ2AmnYsmFiTcxqV5bmlElHEqQuT\ DA4vsRURfABU0fIhwYkQuZqEcA3d8TL36BZcGEshG6MQ2AmnYsmFiTcxqV5bmlElHEqQuT\
5SUFXLafgZPBnL0qDwujQcHukID41sE=\ 5SUFXLafgZPBnL0qDwujQcHukID41sE=\
" "
# regular test configuration
after_success:
- bundle exec codeclimate-test-reporter

12
Gemfile
View File

@ -25,14 +25,14 @@ end
# #
group :test do group :test do
gem "codeclimate-test-reporter", "~> 0.6.0" gem "codeclimate-test-reporter", "~> 1.0.5"
gem "cucumber", "~> 2.1" gem "cucumber", "~> 2.1"
gem "jekyll_test_plugin" gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious" gem "jekyll_test_plugin_malicious"
gem "nokogiri" gem "nokogiri"
gem "rspec" gem "rspec"
gem "rspec-mocks" gem "rspec-mocks"
gem "rubocop", "~> 0.44.1" gem "rubocop", "~> 0.47"
gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__)) gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__))
gem "jruby-openssl" if RUBY_ENGINE == "jruby" gem "jruby-openssl" if RUBY_ENGINE == "jruby"
@ -76,11 +76,11 @@ group :jekyll_optional_dependencies do
gem "jekyll-redirect-from" gem "jekyll-redirect-from"
gem "kramdown", "~> 1.9" gem "kramdown", "~> 1.9"
gem "mime-types", "~> 3.0" gem "mime-types", "~> 3.0"
gem "rdoc", "~> 4.2" gem "rdoc", "~> 5.0"
gem "toml", "~> 0.1.0" gem "toml", "~> 0.1.0"
platform :ruby, :mswin, :mingw, :x64_mingw do platform :ruby, :mswin, :mingw, :x64_mingw do
gem "classifier-reborn", "~> 2.0" gem "classifier-reborn", "~> 2.1.0"
gem "liquid-c", "~> 3.0" gem "liquid-c", "~> 3.0"
gem "rdiscount", "~> 2.0" gem "rdiscount", "~> 2.0"
gem "redcarpet", "~> 3.2", ">= 3.2.3" gem "redcarpet", "~> 3.2", ">= 3.2.3"
@ -94,12 +94,12 @@ end
group :site do group :site do
if ENV["PROOF"] if ENV["PROOF"]
gem "html-proofer", "~> 2.0" gem "html-proofer", "~> 3.4"
end end
gem "jekyll-avatar" gem "jekyll-avatar"
gem "jekyll-mentions" gem "jekyll-mentions"
gem "jekyll-seo-tag" gem "jekyll-seo-tag"
gem "jekyll-sitemap" gem "jekyll-sitemap"
gem "jemoji", "0.5.1" gem "jemoji"
end end

View File

@ -1,29 +1,46 @@
## HEAD ## HEAD
### Minor Enhancements
* Upgrade to Liquid v4 (#4362)
### Documentation
* Install troubleshooting on Ubuntu (#5817)
## 3.4.0 / 2016-01-27
### Minor Enhancements
* Add connector param to `array_to_sentence_string` filter (#5597)
* Adds `group_by_exp` filter (#5513)
* Use Addressable instead of URI to decode (#5726)
* throw IncludeTagError if error occurs in included file (#5767)
* Write Jekyll::Utils::Exec.run for running shell commands. (#5640)
* Use the current year for the LICENSE of theme (#5712)
* Update License (#5713)
### Bug Fixes
* Escaped regular expressions when using `post_url`. (#5605)
* fix date parsing in file names to be stricter (#5609)
* Add a module to re-define `ENV["TZ"]` in Windows (#5612)
* Use each instead of map to actually return nothing (#5668)
* include: fix 'no implicit conversion of nil to String' (#5750)
* Don't include the theme's includes_path if it is nil. (#5780)
* test double slash when input = '/' (#5542)
* use logger.info for related posts (#5822)
### Site Enhancements ### Site Enhancements
* Remove instructions to install Jekyll 2 on Windows (#5582)
* Fix example URL inconsistency (#5592)
* Replace backticks within HTML blocks with HTML tags (#5435)
* Add jekyll-migrate-permalink (#5600)
* Fix bad config YAML in collections example (#5587)
* Bring documentation on 'Directory Structure' up-to-date (#5573)
* Use only the used Font Awesome icons. (#5530) * Use only the used Font Awesome icons. (#5530)
* Switch to `https` when possible. (#5611) * Switch to `https` when possible. (#5611)
* Update `_font-awesome.scss` to move .woff file before .ttf (#5614) * Update `_font-awesome.scss` to move .woff file before .ttf (#5614)
* Update documentation on updating FontAwesome Iconset (#5655) * Update documentation on updating FontAwesome Iconset (#5655)
* [site] Use defaults for docs and news-items (#5744)
### Minor Enhancements * Sort gems in `docs/_config.yml` (#5746)
* Add missing class (#5791)
* Add connector param to array_to_sentence_string filter (#5597) * Improve template docs (#5694)
* Adds group_by_exp filter (#5513)
### Bug Fixes
* Escaped regular expressions when using post_url. (#5605)
* fix date parsing in file names to be stricter (#5609)
* Add a module to re-define `ENV["TZ"]` in Windows (#5612)
* Use each instead of map to actually return nothing (#5668)
### Development Fixes ### Development Fixes
@ -33,15 +50,65 @@
* Rubocop -a on lib/jekyll (#5666) * Rubocop -a on lib/jekyll (#5666)
* Bump to rake 12.0 (#5670) * Bump to rake 12.0 (#5670)
* Rubocop Gemfile (#5671) * Rubocop Gemfile (#5671)
* update Classifier-Reborn to 2.1.0 (#5711)
* Rubocop: fix Rakefile and gemspec (#5745)
* Use `assert_nil` (#5725)
* Sort gems in `jekyll.gemspec` (#5746)
* Rubocop: Require consistent comma in multiline literals (#5761)
* Bump rubocop (#5765)
* New rubocop security checks (#5768)
* test/helper: fix flaky plugin path test by removing calls to Dir.chdir without a block (#5779)
* Use latest jemoji gem (#5782)
* Bump htmlproofer (#5781)
* Bump rubies we test against (#5784)
* Bump rdoc to v5.0 (#5797)
* Bump codeclimate-test-reporter to v1.0.5 (#5798)
### Documentation ### Documentation
* Improve quickstart docs (#5689)
* Add Jekyll-Post to list of plugins (#5705)
* Add jekyll-numbered-headings (#5688)
* Docs: move permalinks from documents into config (#5544)
* Improve collections docs (#5691)
* Fix #5730: add gcc and make to the list of requirements (#5731)
* Remove instructions to install Jekyll 2 on Windows (#5582)
* Fix example URL inconsistency (#5592)
* Replace backticks within HTML blocks with HTML tags (#5435)
* Add jekyll-migrate-permalink (#5600)
* Fix bad config YAML in collections example (#5587)
* Bring documentation on 'Directory Structure' up-to-date (#5573)
* Fixed typo (#5632) * Fixed typo (#5632)
* use backticks for Gemfile for consistency since in the next sentence … (#5641) * use backticks for Gemfile for consistency since in the next sentence … (#5641)
* Update Core team list in the README file (#5643) * Update Core team list in the README file (#5643)
* Improve Permalinks documentation. (#5653) * Improve Permalinks documentation. (#5653)
* Fix typo in Variables doc page (#5657) * Fix typo in Variables doc page (#5657)
* Fix a couple of typos in the docs (#5658) * Fix a couple of typos in the docs (#5658)
* Update windows.md (#5683)
* Improve permalinks docs (#5693)
* Document --unpublished build option (#5720)
* Improve pages docs (#5692)
* Added new includes.md topic to docs (#5696)
* Replace a dead link with a web-archived one (#5738)
* Remove duplicate paragraph. (#5740)
* Addition of a sample "typical post" (#5473)
* Fix a minor grammatical mistake on themes' document ### -dev (#5748)
* Correct comments in data_reader.rb (#5621)
* Add jekyll-pre-commit to plugins list (#5752)
* Update quickstart.md (#5758)
* Correct minor typo (#5764)
* Fix a markdown link to look properly on the web (#5769)
* [docs] Info about the help command usage (#5312)
* Add missing merge labels for jekyllbot (#5753)
* Fix broken links in documentation (#5736)
* Docs: add `match_regex` and `replace_regex` filters (#5799)
* Got that diaper money? (#5810)
* Sort content by popularity using Google Analytics (#5812)
* Rework CI doc to include multiple providers. (#5815)
* Improve theme docs (#5690)
* Add mention of classifier-reborn for LSI (#5811)
* Added note about --blank flag (#5802)
* Fixed inaccuracy in "Built-in permalink styles" docs (#5819)
## 3.3.1 / 2016-11-14 ## 3.3.1 / 2016-11-14

View File

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2008-2016 Tom Preston-Werner Copyright (c) 2008-2017 Tom Preston-Werner and Jekyll contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,13 +1,13 @@
require 'rubygems' require "rubygems"
require 'rake' require "rake"
require 'rdoc' require "rdoc"
require 'date' require "date"
require 'yaml' require "yaml"
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib])) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
require 'jekyll/version' require "jekyll/version"
Dir.glob('rake/**.rake').each { |f| import f } Dir.glob("rake/**.rake").each { |f| import f }
############################################################################# #############################################################################
# #
@ -36,21 +36,21 @@ def gemspec_file
end end
def gem_file def gem_file
"#{name}-#{Gem::Version.new(version).to_s}.gem" "#{name}-#{Gem::Version.new(version)}.gem"
end end
def normalize_bullets(markdown) def normalize_bullets(markdown)
markdown.gsub(/\n\s{2}\*{1}/, "\n-") markdown.gsub(%r!\n\s{2}\*{1}!, "\n-")
end end
def linkify_prs(markdown) def linkify_prs(markdown)
markdown.gsub(/#(\d+)/) do |word| markdown.gsub(%r!#(\d+)!) do |word|
"[#{word}]({{ site.repository }}/issues/#{word.delete("#")})" "[#{word}]({{ site.repository }}/issues/#{word.delete("#")})"
end end
end end
def linkify_users(markdown) def linkify_users(markdown)
markdown.gsub(/(@\w+)/) do |username| markdown.gsub(%r!(@\w+)!) do |username|
"[#{username}](https://github.com/#{username.delete("@")})" "[#{username}](https://github.com/#{username.delete("@")})"
end end
end end
@ -60,13 +60,13 @@ def linkify(markdown)
end end
def liquid_escape(markdown) def liquid_escape(markdown)
markdown.gsub(/(`{[{%].+[}%]}`)/, "{% raw %}\\1{% endraw %}") markdown.gsub(%r!(`{[{%].+[}%]}`)!, "{% raw %}\\1{% endraw %}")
end end
def custom_release_header_anchors(markdown) def custom_release_header_anchors(markdown)
header_regexp = /^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}/ header_regexp = %r!^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}!
section_regexp = /^### \w+ \w+$/ section_regexp = %r!^### \w+ \w+$!
markdown.split(/^##\s/).map do |release_notes| markdown.split(%r!^##\s!).map do |release_notes|
_, major, minor, patch = *release_notes.match(header_regexp) _, major, minor, patch = *release_notes.match(header_regexp)
release_notes release_notes
.gsub(header_regexp, "\\0\n{: #v\\1-\\2-\\3}") .gsub(header_regexp, "\\0\n{: #v\\1-\\2-\\3}")
@ -75,11 +75,11 @@ def custom_release_header_anchors(markdown)
end end
def sluffigy(header) def sluffigy(header)
header.gsub(/#/, '').strip.downcase.gsub(/\s+/, '-') header.delete("#").strip.downcase.gsub(%r!\s+!, "-")
end end
def remove_head_from_history(markdown) def remove_head_from_history(markdown)
index = markdown =~ /^##\s+\d+\.\d+\.\d+/ index = markdown =~ %r!^##\s+\d+\.\d+\.\d+!
markdown[index..-1] markdown[index..-1]
end end
@ -88,20 +88,23 @@ def converted_history(markdown)
custom_release_header_anchors( custom_release_header_anchors(
liquid_escape( liquid_escape(
linkify( linkify(
normalize_bullets(markdown))))) normalize_bullets(markdown)
)
)
)
)
end end
def siteify_file(file, overrides_front_matter = {}) def siteify_file(file, overrides_front_matter = {})
abort "You seem to have misplaced your #{file} file. I can haz?" unless File.exists?(file) abort "You seem to have misplaced your #{file} file. I can haz?" unless File.exist?(file)
title = begin title = begin
File.read(file).match(/\A# (.*)$/)[1] File.read(file).match(%r!\A# (.*)$!)[1]
rescue rescue
File.basename(file, ".*").downcase.capitalize File.basename(file, ".*").downcase.capitalize
end end
slug = File.basename(file, ".markdown").downcase slug = File.basename(file, ".markdown").downcase
front_matter = { front_matter = {
"title" => title, "title" => title,
"layout" => "docs",
"permalink" => "/docs/#{slug}/", "permalink" => "/docs/#{slug}/",
"note" => "This file is autogenerated. Edit /#{file} instead." "note" => "This file is autogenerated. Edit /#{file} instead."
}.merge(overrides_front_matter) }.merge(overrides_front_matter)
@ -115,7 +118,7 @@ def content_for(file)
when "History.markdown" when "History.markdown"
converted_history(contents) converted_history(contents)
else else
contents.gsub(/\A# .*\n\n?/, "") contents.gsub(%r!\A# .*\n\n?!, "")
end end
end end
@ -128,23 +131,23 @@ end
multitask :default => [:test, :features] multitask :default => [:test, :features]
task :spec => :test task :spec => :test
require 'rake/testtask' require "rake/testtask"
Rake::TestTask.new(:test) do |test| Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test' test.libs << "lib" << "test"
test.pattern = 'test/**/test_*.rb' test.pattern = "test/**/test_*.rb"
test.verbose = true test.verbose = true
end end
require 'rdoc/task' require "rdoc/task"
Rake::RDocTask.new do |rdoc| Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc' rdoc.rdoc_dir = "rdoc"
rdoc.title = "#{name} #{version}" rdoc.title = "#{name} #{version}"
rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include("README*")
rdoc.rdoc_files.include('lib/**/*.rb') rdoc.rdoc_files.include("lib/**/*.rb")
end end
begin begin
require 'cucumber/rake/task' require "cucumber/rake/task"
Cucumber::Rake::Task.new(:features) do |t| Cucumber::Rake::Task.new(:features) do |t|
t.profile = "travis" t.profile = "travis"
end end
@ -152,9 +155,9 @@ begin
t.profile = "html_report" t.profile = "html_report"
end end
rescue LoadError rescue LoadError
desc 'Cucumber rake task not available' desc "Cucumber rake task not available"
task :features do task :features do
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin' abort "Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin"
end end
end end

View File

@ -10,8 +10,24 @@ help_url: https://github.com/jekyll/jekyll-help
timezone: America/Los_Angeles timezone: America/Los_Angeles
defaults:
-
scope:
path: "_docs"
type: "docs"
values:
layout: "docs"
-
scope:
path: "_posts"
type: "posts"
values:
layout: "news_item"
collections: collections:
docs: docs:
permalink: /:collection/:path/
output: true output: true
posts: posts:
permalink: /news/:year/:month/:day/:title/ permalink: /news/:year/:month/:day/:title/
@ -27,14 +43,14 @@ twitter:
logo: /img/logo-2x.png logo: /img/logo-2x.png
gems: gems:
- jekyll-feed
- jekyll-redirect-from
- jemoji
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-avatar - jekyll-avatar
- jekyll-feed
- jekyll-mentions - jekyll-mentions
- jekyll-redirect-from
- jekyll-seo-tag
- jekyll-sitemap
- jemoji
exclude: exclude:
- README.md
- .gitignore - .gitignore
- README.md

View File

@ -23,6 +23,7 @@
- title: Customization - title: Customization
docs: docs:
- templates - templates
- includes
- permalinks - permalinks
- pagination - pagination
- plugins - plugins

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Assets title: Assets
permalink: /docs/assets/ permalink: /docs/assets/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Collections title: Collections
permalink: /docs/collections/ permalink: /docs/collections/
--- ---
@ -12,7 +11,13 @@ namespace.
## Using Collections ## Using Collections
### Step 1: Tell Jekyll to read in your collection To start using collections, follow these 3 steps:
* [Step 1: Tell Jekyll to read in your collection](#step1)
* [Step 2: Add your content](#step2)
* [Step 3: Optionally render your collection's documents into independent files](#step3)
### Step 1: Tell Jekyll to read in your collection {#step1}
Add the following to your site's `_config.yml` file, replacing `my_collection` Add the following to your site's `_config.yml` file, replacing `my_collection`
with the name of your collection: with the name of your collection:
@ -41,12 +46,12 @@ defaults:
layout: page layout: page
``` ```
### Step 2: Add your content ### Step 2: Add your content {#step2}
Create a corresponding folder (e.g. `<source>/_my_collection`) and add Create a corresponding folder (e.g. `<source>/_my_collection`) and add
documents. YAML Front Matter is read in as data if it exists, and everything documents. YAML front matter is processed if the front matter exists, and everything
after it is stuck in the Document's `content` attribute. If no YAML Front after the front matter is pushed into the document's `content` attribute. If no YAML front
Matter is provided, Jekyll will not generate the file in your collection. matter is provided, Jekyll will not generate the file in your collection.
<div class="note info"> <div class="note info">
<h5>Be sure to name your directories correctly</h5> <h5>Be sure to name your directories correctly</h5>
@ -56,7 +61,7 @@ your <code>_config.yml</code> file, with the addition of the preceding <code>_</
</p> </p>
</div> </div>
### Step 3: Optionally render your collection's documents into independent files ### Step 3: Optionally render your collection's documents into independent files {#step3}
If you'd like Jekyll to create a public-facing, rendered version of each If you'd like Jekyll to create a public-facing, rendered version of each
document in your collection, set the `output` key to `true` in your collection document in your collection, set the `output` key to `true` in your collection
@ -73,19 +78,6 @@ For example, if you have `_my_collection/some_subdir/some_doc.md`,
it will be rendered using Liquid and the Markdown converter of your it will be rendered using Liquid and the Markdown converter of your
choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`. choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
As for posts with [Permalinks](../permalinks/), the document
URL can be customized by setting `permalink` metadata for the collection:
```yaml
collections:
my_collection:
output: true
permalink: /awesome/:path/
```
For example, if you have `_my_collection/some_subdir/some_doc.md`, it will be
written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
<div class="note info"> <div class="note info">
<h5>Don't forget to add YAML for processing</h5> <h5>Don't forget to add YAML for processing</h5>
<p> <p>
@ -95,6 +87,21 @@ written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
</p> </p>
</div> </div>
## Configuring permalinks for collections {#permalinks}
You can customize the [Permalinks](../permalinks/) for your collection's documents by setting `permalink` property in the collection's configuration as follows:
```yaml
collections:
my_collection:
output: true
permalink: /awesome/:path/:title.:output_ext
```
In this example, the collection documents will the have the URL of `awesome` followed by the path to the document and its file extension.
Collections have the following template variables available for permalinks:
<div class="mobile-side-scroller"> <div class="mobile-side-scroller">
<table> <table>
<thead> <thead>
@ -149,15 +156,92 @@ written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
</table> </table>
</div> </div>
## Permalink examples for collections
Depending on how you declare the permalinks in your configuration file, the permalinks and paths get written differently in the `_site` folder. A few examples will help clarify the options.
Let's say your collection is called `apidocs` with `doc1.md` in your collection. `doc1.md` is grouped inside a folder called `mydocs`. Your project's source directory for the collection looks this:
```
├── \_apidocs
│   └── mydocs
│   └── doc1.md
```
Based on this scenario, here are a few permalink options.
**Permalink configuration 1**: [Nothing configured] <br/>
**Output**:
```
├── apidocs
│   └── mydocs
│   └── doc1.html
```
**Permalink configuration 2**: `/:collection/:path/:title:output_ext` <br/>
**Output**:
```
├── apidocs
│   └── mydocs
│   └── doc1.html
```
**Permalink configuration 3**: No collection permalinks configured, but `pretty` configured for pages/posts. <br/>
**Output**:
```
├── apidocs
│   └── mydocs
│   └── doc1
│   └── index.html
```
**Permalink configuration 4**: `/awesome/:path/:title.html` <br/>
**Output**:
```
├── awesome
│   └── mydocs
│   └── doc1.html
```
**Permalink configuration 5**: `/awesome/:path/:title/` <br/>
**Output**:
```
├── awesome
│   └── mydocs
│   └── doc1
│   └── index.html
```
**Permalink configuration 6**: `/awesome/:title.html` <br/>
**Output**:
```
├── awesome
│   └── doc1.html
```
**Permalink configuration 7**: `:title.html`
**Output**:
```
├── doc1.html
```
## Liquid Attributes ## Liquid Attributes
### Collections ### Collections
Each collection is accessible via the `site` Liquid variable. For example, if Each collection is accessible as a field on the `site` variable. For example, if
you want to access the `albums` collection found in `_albums`, you'd use you want to access the `albums` collection found in `_albums`, you'd use
`site.albums`. Each collection is itself an array of documents `site.albums`.
(e.g. `site.albums` is an array of documents, much like `site.pages` and
`site.posts`). See below for how to access attributes of those documents. Each collection is itself an array of documents (e.g., `site.albums` is an array of documents, much like `site.pages` and
`site.posts`). See the table below for how to access attributes of those documents.
The collections are also available under `site.collections`, with the metadata The collections are also available under `site.collections`, with the metadata
you specified in your `_config.yml` (if present) and the following information: you specified in your `_config.yml` (if present) and the following information:
@ -335,7 +419,7 @@ file, each document has the following attributes:
Attributes from the YAML front matter can be accessed as data anywhere in the Attributes from the YAML front matter can be accessed as data anywhere in the
site. Using the above example for configuring a collection as `site.albums`, site. Using the above example for configuring a collection as `site.albums`,
one might have front matter in an individual file structured as follows (which you might have front matter in an individual file structured as follows (which
must use a supported markup format, and cannot be saved with a `.yaml` must use a supported markup format, and cannot be saved with a `.yaml`
extension): extension):

View File

@ -1,6 +1,5 @@
--- ---
title: Code of Conduct title: Code of Conduct
layout: docs
permalink: "/docs/conduct/" permalink: "/docs/conduct/"
note: This file is autogenerated. Edit /CONDUCT.markdown instead. note: This file is autogenerated. Edit /CONDUCT.markdown instead.
redirect_from: "/conduct/index.html" redirect_from: "/conduct/index.html"

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Configuration title: Configuration
permalink: /docs/configuration/ permalink: /docs/configuration/
--- ---
@ -221,10 +220,20 @@ class="flag">flags</code> (specified on the command-line) that control them.
<p><code class="flag">--future</code></p> <p><code class="flag">--future</code></p>
</td> </td>
</tr> </tr>
<tr class="setting">
<td>
<p class="name"><strong>Unpublished</strong></p>
<p class="description">Render posts that were marked as unpublished.</p>
</td>
<td class="align-center">
<p><code class="option">unpublished: BOOL</code></p>
<p><code class="flag">--unpublished</code></p>
</td>
</tr>
<tr class="setting"> <tr class="setting">
<td> <td>
<p class="name"><strong>LSI</strong></p> <p class="name"><strong>LSI</strong></p>
<p class="description">Produce an index for related posts.</p> <p class="description">Produce an index for related posts. Requires the <a href="http://www.classifier-reborn.com/">classifier-reborn</a> plugin.</p>
</td> </td>
<td class="align-center"> <td class="align-center">
<p><code class="option">lsi: BOOL</code></p> <p><code class="option">lsi: BOOL</code></p>

View File

@ -0,0 +1,92 @@
---
title: "CircleCI"
---
Building, testing, and deploying your Jekyll-generated website can quickly be done with [CircleCI][0], a continuous integration & delivery tool. CircleCI supports [GitHub][1] and [Bitbucket][2], and you can get started for free using an open-source or private repository.
[0]: https://circleci.com/
[1]: https://github.com/
[2]: https://bitbucket.org/
## 1. Follow Your Project on CircleCI
To start building your project on CircleCI, all you need to do is 'follow' your project from CircleCI's website:
1. Visit the 'Add Projects' page: <https://circleci.com/add-projects>
1. From the GitHub or Bitbucket tab on the left, choose a user or organization.
1. Find your project in the list and click 'Build project' on the right.
1. The first build will start on its own. You can start telling CircleCI how to build your project by creating a [circle.yml][3] file in the root of your repository.
[3]: https://circleci.com/docs/configuration/
## 2. Dependencies
The easiest way to manage dependencies for a Jekyll project (with or without CircleCI) is via a [Gemfile][4]. You'd want to have Jekyll, any Jekyll plugins, [HTML Proofer](#html-proofer), and any other gems that you are using in the `Gemfile`. Don't forget to version `Gemfile.lock` as well. Here's an example `Gemfile`:
[4]: http://bundler.io/gemfile.html
```yaml
source 'https://rubygems.org'
ruby '2.4.0'
gem 'jekyll'
gem 'html-proofer'
```
CircleCI detects when `Gemfile` is present is will automatically run `bundle install` for you in the `dependencies` phase.
## 3. Testing
The most basic test that can be run is simply seeing if `jekyll build` actually works. This is a blocker, a dependency if you will, for other tests you might run on the generate site. So we'll run Jekyll, via Bundler, in the `dependencies` phase.
```
dependencies:
post:
- bundle exec jekyll build
```
### HTML Proofer
With your site built, it's useful to run tests to check for valid HTML, broken links, etc. There's a few tools out there but [HTML Proofer][5] is popular amongst Jekyll users. We'll run it in the `test` phase with a few preferred flags. Check out the `html-proofer` [README][6] for all available flags, or run `htmlproofer --help` locally.
[5]: https://github.com/gjtorikian/html-proofer
[6]: https://github.com/gjtorikian/html-proofer/blob/master/README.md#configuration
```yaml
test:
post:
- bundle exec htmlproofer ./_site --check-html --disable-external
```
## Complete Example circle.yml File
When you put it all together, here's an example of what that `circle.yml` file could look like:
```
machine:
environment:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true # speeds up installation of html-proofer
dependencies:
post:
- bundle exec jekyll build
test:
post:
- bundle exec htmlproofer ./_site --allow-hash-href --check-favicon --check-html --disable-external
deployment:
prod:
branch: master
commands:
- rsync -va --delete ./_site username@my-website:/var/html
```
## Questions?
This entire guide is open-source. Go ahead and [edit it][7] if you have a fix or [ask for help][8] if you run into trouble and need some help. CircleCI also has an [online community][9] for help.
[7]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration/circleci.md
[8]: https://jekyllrb.com/help/
[9]: https://discuss.circleci.com

View File

@ -0,0 +1,9 @@
---
title: Continuous Integration
permalink: /docs/continuous-integration/
---
Continuous Integration (CI) enables you to publish your Jekyll generated website with confidence by automating the quality assurance and deployment processes. You can quickly get started using CI with one of the providers below:
* [Travis CI](travis-ci)
* [CircleCI](circleci)

View File

@ -1,16 +1,13 @@
--- ---
layout: docs title: "Travis CI"
title: Continuous Integration
permalink: /docs/continuous-integration/
--- ---
You can easily test your website build against one or more versions of Ruby. You can easily test your website build against one or more versions of Ruby.
The following guide will show you how to set up a free build environment on The following guide will show you how to set up a free build environment on
[Travis][0], with [GitHub][1] integration for pull requests. Paid [Travis][travis], with [GitHub][github] integration for pull requests.
alternatives exist for private repositories.
[0]: https://travis-ci.org/ [travis]: https://travis-ci.org/
[1]: https://github.com/ [github]: https://github.com/
## 1. Enabling Travis and GitHub ## 1. Enabling Travis and GitHub
@ -29,7 +26,7 @@ The simplest test script simply runs `jekyll build` and ensures that Jekyll
doesn't fail to build the site. It doesn't check the resulting site, but it doesn't fail to build the site. It doesn't check the resulting site, but it
does ensure things are built properly. does ensure things are built properly.
When testing Jekyll output, there is no better tool than [html-proofer][2]. When testing Jekyll output, there is no better tool than [html-proofer][html-proofer].
This tool checks your resulting site to ensure all links and images exist. This tool checks your resulting site to ensure all links and images exist.
Utilize it either with the convenient `htmlproofer` command-line executable, Utilize it either with the convenient `htmlproofer` command-line executable,
or write a Ruby script which utilizes the gem. or write a Ruby script which utilizes the gem.
@ -71,7 +68,7 @@ Options are given as a second argument to `.new`, and are encoded in a
symbol-keyed Ruby Hash. For more information about the configuration options, symbol-keyed Ruby Hash. For more information about the configuration options,
check out `html-proofer`'s README file. check out `html-proofer`'s README file.
[2]: https://github.com/gjtorikian/html-proofer [html-proofer]: https://github.com/gjtorikian/html-proofer
## 3. Configuring Your Travis Builds ## 3. Configuring Your Travis Builds
@ -94,7 +91,7 @@ Your `.travis.yml` file should look like this:
```yaml ```yaml
language: ruby language: ruby
rvm: rvm:
- 2.2.5 - 2.3.3
before_script: before_script:
- chmod +x ./script/cibuild # or do this locally and commit - chmod +x ./script/cibuild # or do this locally and commit
@ -127,7 +124,7 @@ access to Bundler, RubyGems, and a Ruby runtime.
```yaml ```yaml
rvm: rvm:
- 2.2.5 - 2.3.3
``` ```
RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This
@ -229,5 +226,5 @@ an entry in the `.gitignore` file to avoid it from being checked in again.
This entire guide is open-source. Go ahead and [edit it][3] if you have a This entire guide is open-source. Go ahead and [edit it][3] if you have a
fix or [ask for help][4] if you run into trouble and need some help. fix or [ask for help][4] if you run into trouble and need some help.
[3]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration.md [3]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration/travis-ci.md
[4]: https://jekyllrb.com/help/ [4]: https://jekyllrb.com/help/

View File

@ -1,6 +1,5 @@
--- ---
title: Contributing title: Contributing
layout: docs
permalink: "/docs/contributing/" permalink: "/docs/contributing/"
note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead. note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead.
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Data Files title: Data Files
permalink: /docs/datafiles/ permalink: /docs/datafiles/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Deployment methods title: Deployment methods
permalink: /docs/deployment-methods/ permalink: /docs/deployment-methods/
--- ---
@ -168,7 +167,7 @@ script executes.
[Rack-Jekyll](https://github.com/adaoraul/rack-jekyll/) is an easy way to deploy your site on any Rack server such as Amazon EC2, Slicehost, Heroku, and so forth. It also can run with [shotgun](https://github.com/rtomayko/shotgun/), [rackup](https://github.com/rack/rack), [mongrel](https://github.com/mongrel/mongrel), [unicorn](https://github.com/defunkt/unicorn/), and [others](https://github.com/adaoraul/rack-jekyll#readme). [Rack-Jekyll](https://github.com/adaoraul/rack-jekyll/) is an easy way to deploy your site on any Rack server such as Amazon EC2, Slicehost, Heroku, and so forth. It also can run with [shotgun](https://github.com/rtomayko/shotgun/), [rackup](https://github.com/rack/rack), [mongrel](https://github.com/mongrel/mongrel), [unicorn](https://github.com/defunkt/unicorn/), and [others](https://github.com/adaoraul/rack-jekyll#readme).
Read [this post](http://andycroll.com/ruby/serving-a-jekyll-blog-using-heroku) on how to deploy to Heroku using Rack-Jekyll. Read [this post](http://andycroll.com/ruby/serving-a-jekyll-blog-using-heroku/) on how to deploy to Heroku using Rack-Jekyll.
## Jekyll-Admin for Rails ## Jekyll-Admin for Rails
@ -207,4 +206,3 @@ Setting up Kickster is very easy, just install the gem and you are good to go. M
[Aerobatic](https://www.aerobatic.com) is an add-on for Bitbucket that brings GitHub Pages style functionality to Bitbucket users. It includes continuous deployment, custom domains with a wildcard SSL cert, CDN, basic auth, and staging branches all in the box. [Aerobatic](https://www.aerobatic.com) is an add-on for Bitbucket that brings GitHub Pages style functionality to Bitbucket users. It includes continuous deployment, custom domains with a wildcard SSL cert, CDN, basic auth, and staging branches all in the box.
Automating the build and deployment of a Jekyll site is just as simple as GitHub Pages - push your changes to your repo (excluding the `_site` directory) and within seconds a build will be triggered and your built site deployed to our highly- available, globally distributed hosting service. The build process will even install and execute custom Ruby plugins. See our [Jekyll docs](https://www.aerobatic.com/docs/static-generators#jekyll) for more details. Automating the build and deployment of a Jekyll site is just as simple as GitHub Pages - push your changes to your repo (excluding the `_site` directory) and within seconds a build will be triggered and your built site deployed to our highly- available, globally distributed hosting service. The build process will even install and execute custom Ruby plugins. See our [Jekyll docs](https://www.aerobatic.com/docs/static-generators#jekyll) for more details.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Working with drafts title: Working with drafts
permalink: /docs/drafts/ permalink: /docs/drafts/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Extras title: Extras
permalink: /docs/extras/ permalink: /docs/extras/
--- ---
@ -15,7 +14,7 @@ Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](ht
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script> <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
``` ```
For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/opinion/2014/02/16/Mathjax-with-jekyll/). For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/visually-enforced/opinion/2014/02/16/Mathjax-with-jekyll/).
## Alternative Markdown Processors ## Alternative Markdown Processors

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Front Matter title: Front Matter
permalink: /docs/frontmatter/ permalink: /docs/frontmatter/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: GitHub Pages title: GitHub Pages
permalink: /docs/github-pages/ permalink: /docs/github-pages/
--- ---
@ -12,15 +11,13 @@ content, theyre also a great way to host your Jekyll-powered website for free
Never built a website with GitHub Pages before? [See this marvelous guide by Never built a website with GitHub Pages before? [See this marvelous guide by
Jonathan McGlone to get you up and running](http://jmcglone.com/guides/github-pages/). Jonathan McGlone to get you up and running](http://jmcglone.com/guides/github-pages/).
This guide will teach you what you need to know about Git, GitHub, and Jekyll to This guide will teach you what you need to know about Git, GitHub, and Jekyll to create your very own website on GitHub Pages.
create your very own website on GitHub Pages.
### Project Page URL Structure ### Project Page URL Structure
Sometimes it's nice to preview your Jekyll site before you push your `gh-pages` Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
branch to GitHub. However, the subdirectory-like URL structure GitHub uses for branch to GitHub. However, the subdirectory-like URL structure GitHub uses for
Project Pages complicates the proper resolution of URLs. In order to assure your Project Pages complicates the proper resolution of URLs. In order to assure your site builds properly, use `site.github.url` in your URL's.
site builds properly, use `site.github.url` in your URL's.
```html ```html
{% raw %} {% raw %}
@ -91,7 +88,7 @@ gem 'github-pages'
And be sure to run `bundle update` often. And be sure to run `bundle update` often.
If you like to install `pages-gem` on Windows you can find instructions by Jens Willmer on If you like to install `pages-gem` on Windows you can find instructions by Jens Willmer on
[how to install github-pages gem on Windows (x64)]("https://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46#github-pages-and-plugins"). [how to install github-pages gem on Windows (x64)](https://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46#github-pages-and-plugins).
</div> </div>
<div class="note info"> <div class="note info">
@ -132,14 +129,14 @@ stored in a specially named `gh-pages` branch or in a `docs` folder on the
will become available under a subpath of your user pages subdomain, such as will become available under a subpath of your user pages subdomain, such as
`username.github.io/project` (unless a custom domain is specified). `username.github.io/project` (unless a custom domain is specified).
The Jekyll project repository itself is a perfect example: the The Jekyll project repository itself is a perfect example of this branch
[master branch]({{ site.repository }}) contains the actual software project structure—the [master branch]({{ site.repository }}) contains the
for Jekyll, however the Jekyll website (that youre looking at right now) is actual software project for Jekyll, and the Jekyll website that youre
contained in the [docs folder]({{ site.repository }}/tree/master/docs) of the looking at right now is contained in the [docs
same repository. folder]({{ site.repository }}/tree/master/docs) of the same repository.
Please refer to GitHub official documentation on Please refer to GitHub official documentation on
[user, organization and projets pages](https://help.github.com/articles/user-organization-and-project-pages/) [user, organization and project pages](https://help.github.com/articles/user-organization-and-project-pages/)
to see more detailed examples. to see more detailed examples.
<div class="note warning"> <div class="note warning">

View File

@ -1,10 +1,117 @@
--- ---
title: History title: History
layout: docs
permalink: "/docs/history/" permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead. note: This file is autogenerated. Edit /History.markdown instead.
--- ---
## 3.4.0 / 2016-01-27
{: #v3-4-0}
### Minor Enhancements
{: #minor-enhancements-v3-4-0}
- Add connector param to `array_to_sentence_string` filter ([#5597]({{ site.repository }}/issues/5597))
- Adds `group_by_exp` filter ([#5513]({{ site.repository }}/issues/5513))
- Use Addressable instead of URI to decode ([#5726]({{ site.repository }}/issues/5726))
- throw IncludeTagError if error occurs in included file ([#5767]({{ site.repository }}/issues/5767))
- Write Jekyll::Utils::Exec.run for running shell commands. ([#5640]({{ site.repository }}/issues/5640))
- Use the current year for the LICENSE of theme ([#5712]({{ site.repository }}/issues/5712))
- Update License ([#5713]({{ site.repository }}/issues/5713))
### Bug Fixes
{: #bug-fixes-v3-4-0}
- Escaped regular expressions when using `post_url`. ([#5605]({{ site.repository }}/issues/5605))
- fix date parsing in file names to be stricter ([#5609]({{ site.repository }}/issues/5609))
- Add a module to re-define `ENV["TZ"]` in Windows ([#5612]({{ site.repository }}/issues/5612))
- Use each instead of map to actually return nothing ([#5668]({{ site.repository }}/issues/5668))
- include: fix 'no implicit conversion of nil to String' ([#5750]({{ site.repository }}/issues/5750))
- Don't include the theme's includes_path if it is nil. ([#5780]({{ site.repository }}/issues/5780))
- test double slash when input = '/' ([#5542]({{ site.repository }}/issues/5542))
- use logger.info for related posts ([#5822]({{ site.repository }}/issues/5822))
### Site Enhancements
{: #site-enhancements-v3-4-0}
- Use only the used Font Awesome icons. ([#5530]({{ site.repository }}/issues/5530))
- Switch to `https` when possible. ([#5611]({{ site.repository }}/issues/5611))
- Update `_font-awesome.scss` to move .woff file before .ttf ([#5614]({{ site.repository }}/issues/5614))
- Update documentation on updating FontAwesome Iconset ([#5655]({{ site.repository }}/issues/5655))
- [site] Use defaults for docs and news-items ([#5744]({{ site.repository }}/issues/5744))
- Sort gems in `docs/_config.yml` ([#5746]({{ site.repository }}/issues/5746))
- Add missing class ([#5791]({{ site.repository }}/issues/5791))
- Improve template docs ([#5694]({{ site.repository }}/issues/5694))
### Development Fixes
{: #development-fixes-v3-4-0}
- clean unit-test names in `test/test_tags.rb` ([#5608]({{ site.repository }}/issues/5608))
- Add cucumber feature to test for bonafide theme gems ([#5384]({{ site.repository }}/issues/5384))
- Use `assert_nil` instead of `assert_equal nil` ([#5652]({{ site.repository }}/issues/5652))
- Rubocop -a on lib/jekyll ([#5666]({{ site.repository }}/issues/5666))
- Bump to rake 12.0 ([#5670]({{ site.repository }}/issues/5670))
- Rubocop Gemfile ([#5671]({{ site.repository }}/issues/5671))
- update Classifier-Reborn to 2.1.0 ([#5711]({{ site.repository }}/issues/5711))
- Rubocop: fix Rakefile and gemspec ([#5745]({{ site.repository }}/issues/5745))
- Use `assert_nil` ([#5725]({{ site.repository }}/issues/5725))
- Sort gems in `jekyll.gemspec` ([#5746]({{ site.repository }}/issues/5746))
- Rubocop: Require consistent comma in multiline literals ([#5761]({{ site.repository }}/issues/5761))
- Bump rubocop ([#5765]({{ site.repository }}/issues/5765))
- New rubocop security checks ([#5768]({{ site.repository }}/issues/5768))
- test/helper: fix flaky plugin path test by removing calls to Dir.chdir without a block ([#5779]({{ site.repository }}/issues/5779))
- Use latest jemoji gem ([#5782]({{ site.repository }}/issues/5782))
- Bump htmlproofer ([#5781]({{ site.repository }}/issues/5781))
- Bump rubies we test against ([#5784]({{ site.repository }}/issues/5784))
- Bump rdoc to v5.0 ([#5797]({{ site.repository }}/issues/5797))
- Bump codeclimate-test-reporter to v1.0.5 ([#5798]({{ site.repository }}/issues/5798))
### Documentation
- Improve quickstart docs ([#5689]({{ site.repository }}/issues/5689))
- Add Jekyll-Post to list of plugins ([#5705]({{ site.repository }}/issues/5705))
- Add jekyll-numbered-headings ([#5688]({{ site.repository }}/issues/5688))
- Docs: move permalinks from documents into config ([#5544]({{ site.repository }}/issues/5544))
- Improve collections docs ([#5691]({{ site.repository }}/issues/5691))
- Fix [#5730]({{ site.repository }}/issues/5730): add gcc and make to the list of requirements ([#5731]({{ site.repository }}/issues/5731))
- Remove instructions to install Jekyll 2 on Windows ([#5582]({{ site.repository }}/issues/5582))
- Fix example URL inconsistency ([#5592]({{ site.repository }}/issues/5592))
- Replace backticks within HTML blocks with HTML tags ([#5435]({{ site.repository }}/issues/5435))
- Add jekyll-migrate-permalink ([#5600]({{ site.repository }}/issues/5600))
- Fix bad config YAML in collections example ([#5587]({{ site.repository }}/issues/5587))
- Bring documentation on 'Directory Structure' up-to-date ([#5573]({{ site.repository }}/issues/5573))
- Fixed typo ([#5632]({{ site.repository }}/issues/5632))
- use backticks for Gemfile for consistency since in the next sentence … ([#5641]({{ site.repository }}/issues/5641))
- Update Core team list in the README file ([#5643]({{ site.repository }}/issues/5643))
- Improve Permalinks documentation. ([#5653]({{ site.repository }}/issues/5653))
- Fix typo in Variables doc page ([#5657]({{ site.repository }}/issues/5657))
- Fix a couple of typos in the docs ([#5658]({{ site.repository }}/issues/5658))
- Update windows.md ([#5683]({{ site.repository }}/issues/5683))
- Improve permalinks docs ([#5693]({{ site.repository }}/issues/5693))
- Document --unpublished build option ([#5720]({{ site.repository }}/issues/5720))
- Improve pages docs ([#5692]({{ site.repository }}/issues/5692))
- Added new includes.md topic to docs ([#5696]({{ site.repository }}/issues/5696))
- Replace a dead link with a web-archived one ([#5738]({{ site.repository }}/issues/5738))
- Remove duplicate paragraph. ([#5740]({{ site.repository }}/issues/5740))
- Addition of a sample "typical post" ([#5473]({{ site.repository }}/issues/5473))
- Fix a minor grammatical mistake on themes' document ### -dev ([#5748]({{ site.repository }}/issues/5748))
- Correct comments in data_reader.rb ([#5621]({{ site.repository }}/issues/5621))
- Add jekyll-pre-commit to plugins list ([#5752]({{ site.repository }}/issues/5752))
- Update quickstart.md ([#5758]({{ site.repository }}/issues/5758))
- Correct minor typo ([#5764]({{ site.repository }}/issues/5764))
- Fix a markdown link to look properly on the web ([#5769]({{ site.repository }}/issues/5769))
- [docs] Info about the help command usage ([#5312]({{ site.repository }}/issues/5312))
- Add missing merge labels for jekyllbot ([#5753]({{ site.repository }}/issues/5753))
- Fix broken links in documentation ([#5736]({{ site.repository }}/issues/5736))
- Docs: add `match_regex` and `replace_regex` filters ([#5799]({{ site.repository }}/issues/5799))
- Got that diaper money? ([#5810]({{ site.repository }}/issues/5810))
- Sort content by popularity using Google Analytics ([#5812]({{ site.repository }}/issues/5812))
- Rework CI doc to include multiple providers. ([#5815]({{ site.repository }}/issues/5815))
- Improve theme docs ([#5690]({{ site.repository }}/issues/5690))
- Add mention of classifier-reborn for LSI ([#5811]({{ site.repository }}/issues/5811))
- Added note about --blank flag ([#5802]({{ site.repository }}/issues/5802))
- Fixed inaccuracy in "Built-in permalink styles" docs ([#5819]({{ site.repository }}/issues/5819))
## 3.3.1 / 2016-11-14 ## 3.3.1 / 2016-11-14
{: #v3-3-1} {: #v3-3-1}

167
docs/_docs/includes.md Normal file
View File

@ -0,0 +1,167 @@
---
title: Includes
permalink: /docs/includes/
---
The `include` tag allows you to include the content from another file stored in the `_includes` folder:
```liquid
{% raw %}{% include footer.html %}{% endraw %}
```
Jekyll will look for the referenced file (in this case, `footer.html`) in the `_includes` directory at the root of your source directory and insert its contents.
### Including files relative to another file
You can choose to include file fragments relative to the current file by using the `include_relative` tag:
```liquid
{% raw %}{% include_relative somedir/footer.html %}{% endraw %}
```
You won't need to place your included content within the `_includes` directory. Instead,
the inclusion is specifically relative to the file where the tag is being used. For example,
if `_posts/2014-09-03-my-file.markdown` uses the `include_relative` tag, the included file
must be within the `_posts` directory or one of its subdirectories.
Note that you cannot use the `../` syntax to specify an include location that refers to a higher-level directory.
All the other capabilities of the `include` tag are available to the `include_relative` tag,
such as variables.
### Using variables names for the include file
The name of the file you want to embed can be specified as a variable instead of an actual file name. For example, suppose you defined a variable in your page's front matter like this:
```yaml
---
title: My page
my_variable: footer_company_a.html
---
```
You could then reference that variable in your include:
```liquid
{% raw %}{% include {{ page.my_variable }} %}{% endraw %}
```
In this example, the include would insert the file `footer_company_a.html` from the `_includes/footer_company_a.html` directory.
### Passing parameters to includes
You can also pass parameters to an include. For example, suppose you have a file called `note.html` in your `_includes` folder that contains this formatting:
```liquid
{% raw %}<div markdown="span" class="alert alert-info" role="alert">
<i class="fa fa-info-circle"></i> <b>Note:</b>
{{ include.content }}
</div>{% endraw %}
```
The `{% raw %}{{ include.content }}{% endraw %}` is a parameter that gets populated when you call the include and specify a value for that parameter, like this:
```liquid
{% raw %}{% include note.html content="This is my sample note." %} {% endraw %}
```
The value of `content` (which is `This is my sample note`) will be inserted into the {% raw %}`{{ include.content }}`{% endraw %} parameter.
Passing parameters to includes is especially helpful when you want to hide away complex formatting from your Markdown content.
For example, suppose you have a special image syntax with complex formatting, and you don't want your authors to remember the complex formatting. As a result, you decide to simplify the formatting by using an include with parameters. Here's an example of the special image syntax you might want to populate with an include:
```html
<figure>
<a href="http://jekyllrb.com">
<img src="logo.png" style="max-width: 200px;"
alt="Jekyll logo" />
<figcaption>This is the Jekyll logo</figcaption>
</figure>
```
You could templatize this content in your include and make each value available as a parameter, like this:
```liquid
{% raw %}<figure>
<a href="{{ include.url }}">
<img src="{{ include.file }}" style="max-width: {{ include.max-width }};"
alt="{{ include.alt }}"/>
<figcaption>{{ include.caption }}</figcaption>
</figure>{% endraw %}
```
This include contains 5 parameters:
* `url`
* `max-width`
* `file`
* `alt`
* `caption`
Here's an example that passes all the parameters to this include (the include file is named `image.html`):
```liquid
{% raw %}{% include image.html url="http://jekyllrb.com"
max-width="200px" file="logo.png" alt="Jekyll logo"
caption="This is the Jekyll logo." %} {% endraw %}
```
The result is the original HTML code shown earlier.
To safeguard situations where users don't supply a value for the parameter, you can use [Liquid's default filter](https://help.shopify.com/themes/liquid/filters/additional-filters#default).
Overall, you can create includes that act as templates for a variety of uses &mdash; inserting audio or video clips, alerts, special formatting, and more. However, note that you should avoid using too many includes, as this will slow down the build time of your site. For example, don't use includes every time you insert an image. (The above technique shows a use case for special images.)
### Passing parameter variables to includes
Suppose the parameter you want to pass to the include is a variable rather than a string. For example, you might be using {% raw %}`{{ site.product_name }}`{% endraw %} to refer to every instance of your product rather than the actual hard-coded name. (In this case, your `_config.yml` file would have a key called `product_name` with a value of your product's name.)
The string you pass to your include parameter can't contain curly braces. For example, you can't pass a parameter that contains this: {% raw %}`"The latest version of {{ site.product_name }} is now available."`{% endraw %}
If you want to include this variable in your parameter that you pass to an include, you need to store the entire parameter as a variable before passing it to the include. You can use `capture` tags to create the variable:
```liquid
{% raw %}{% capture download_note %}The latest version of
{{ site.product_name }} is now available.{% endcapture %}{% endraw %}
```
Then pass this captured variable into the parameter for the include. Omit the quotation marks around the parameter content because it's no longer a string (it's a variable):
```liquid
{% raw %}{% include note.html content=download_note %}{% endraw %}
```
### Passing references to YAML files as parameter values
Instead of passing string variables to the include, you can pass a reference to a YAML data file stored in the `_data` folder.
Here's an example. In the `_data` folder, suppose you have a YAML file called `profiles.yml`. Its content looks like this:
```yaml
- name: John Doe
login_age: old
image: johndoe.jpg
- name: Jane Doe
login_age: new
image: janedoe.jpg
```
In the `_includes` folder, assume you have a file called `spotlight.html` with this code:
```liquid
{% raw %}{% for person in {{ include.participants }} %}
{% if person.login_age == "new" %}
{{ person.name }}
{% endif %}
{% endfor %}{% endraw %}
```
Now when you insert the `spotlight.html` include file, you can submit the YAML file as a parameter:
```
{% raw %}{% include spotlight.html participants=site.data.profiles %}{% endraw %}
```
In this instance, `site.data.profiles` gets inserted in place of {% raw %}`{{ include.participants }}`{% endraw %} in the include file, and the Liquid logic processes. The result will be `Jane Doe`.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Welcome title: Welcome
permalink: /docs/home/ permalink: /docs/home/
redirect_from: /docs/index.html redirect_from: /docs/index.html

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Installation title: Installation
permalink: /docs/installation/ permalink: /docs/installation/
--- ---
@ -11,16 +10,28 @@ encountered and how we might make the process easier.
### Requirements ### Requirements
Installing Jekyll is easy and straight-forward, but there are a few Installing Jekyll should be straight-forward if all requirements are met.
requirements youll need to make sure your system has before you start. Before you start, make sure your system has the following:
- [Ruby](https://www.ruby-lang.org/en/downloads/) (including development - GNU/Linux, Unix, or macOS
headers, v1.9.3 or above for Jekyll 2 and v2 or above for Jekyll 3) - [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.0 or above, including all development
headers
- [RubyGems](https://rubygems.org/pages/download) - [RubyGems](https://rubygems.org/pages/download)
- Linux, Unix, or macOS - [GCC](https://gcc.gnu.org/install/) and [Make](https://www.gnu.org/software/make/) (in case your system doesn't have them installed, which you can check by running `gcc -v` and `make -v` in your system's command line interface)
- [NodeJS](https://nodejs.org/), or another JavaScript runtime (Jekyll 2 and
earlier, for CoffeeScript support). #### Only required for Jekyll 2 and earlier
- [Python 2.7](https://www.python.org/downloads/) (for Jekyll 2 and earlier)
- [NodeJS](https://nodejs.org/), or another JavaScript runtime (for CoffeeScript support).
- [Python 2.7](https://www.python.org/downloads/)
<div class="note info">
<h5>Problems installing Jekyll?</h5>
<p>
Check out the <a href="../troubleshooting/">troubleshooting</a> page or
<a href="{{ site.repository }}/issues/new">report an issue</a> so the
Jekyll community can improve the experience for everyone.
</p>
</div>
<div class="note info"> <div class="note info">
<h5>Running Jekyll on Windows</h5> <h5>Running Jekyll on Windows</h5>
@ -42,10 +53,7 @@ $ gem install jekyll
``` ```
All of Jekylls gem dependencies are automatically installed by the above All of Jekylls gem dependencies are automatically installed by the above
command, so you wont have to worry about them at all. If you have problems command, so you wont have to worry about them at all.
installing Jekyll, check out the [troubleshooting](../troubleshooting/) page or
[report an issue]({{ site.repository }}/issues/new) so the Jekyll
community can improve the experience for everyone.
<div class="note info"> <div class="note info">
<h5>Installing Xcode Command-Line Tools</h5> <h5>Installing Xcode Command-Line Tools</h5>

View File

@ -1,7 +1,5 @@
--- ---
title: Affinity Team Captains title: Affinity Team Captains
layout: docs
permalink: /docs/maintaining/affinity-team-captain/
--- ---
**This guide is for affinity team captains.** These special people are **team maintainers** of one of our [affinity teams][] and help triage and evaluate the issues and contributions of others. You may find what is written here interesting, but its definitely not for everyone. **This guide is for affinity team captains.** These special people are **team maintainers** of one of our [affinity teams][] and help triage and evaluate the issues and contributions of others. You may find what is written here interesting, but its definitely not for everyone.

View File

@ -1,7 +1,5 @@
--- ---
title: "Avoiding Burnout" title: "Avoiding Burnout"
layout: docs
permalink: /docs/maintaining/avoiding-burnout/
--- ---
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone. **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.

View File

@ -1,7 +1,5 @@
--- ---
title: "Becoming a Maintainer" title: "Becoming a Maintainer"
layout: docs
permalink: /docs/maintaining/becoming-a-maintainer/
--- ---
**This guide is for contributors.** These special people have contributed to one or more of Jekyll's repositories, but do not yet have write access to any. You may find what is written here interesting, but its definitely not for everyone. **This guide is for contributors.** These special people have contributed to one or more of Jekyll's repositories, but do not yet have write access to any. You may find what is written here interesting, but its definitely not for everyone.
@ -37,4 +35,4 @@ We would love to expand the team and look forward to many more community members
# Helping Out Elsewhere # Helping Out Elsewhere
In addition to maintainers of our core and plugin code, the Jekyll team is comprised of moderators for our forums. These helpful community members take a look at the topics posted to https://talk.jekyllrb.com and ensure they are properly categorized and are acceptable under our Code of Conduct. If you would like to be a moderator, email one of the maintainers with links to where you have answered questions and a request to be added as a moderator. More help is always welcome. In addition to maintainers of our core and plugin code, the Jekyll team is comprised of moderators for our forums. These helpful community members take a look at the topics posted to [https://talk.jekyllrb.com](https://talk.jekyllrb.com) and ensure they are properly categorized and are acceptable under our Code of Conduct. If you would like to be a moderator, email one of the maintainers with links to where you have answered questions and a request to be added as a moderator. More help is always welcome.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Maintaining Jekyll title: Maintaining Jekyll
permalink: /docs/maintaining/ permalink: /docs/maintaining/
--- ---

View File

@ -1,7 +1,5 @@
--- ---
title: "Merging a Pull Request" title: "Merging a Pull Request"
layout: docs
permalink: /docs/maintaining/merging-a-pull-request/
--- ---
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone. **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.
@ -39,8 +37,10 @@ The categories match the H3's in the history/changelog file, and they are:
1. Major Enhancements (`+major`) major updates or breaking changes to the code which necessitate a major version bump (v3 ~> v4) 1. Major Enhancements (`+major`) major updates or breaking changes to the code which necessitate a major version bump (v3 ~> v4)
2. Minor Enhancements (`+minor`) minor updates (feature, enhancement) which necessitate a minor version bump (v3.1 ~> v3.2) 2. Minor Enhancements (`+minor`) minor updates (feature, enhancement) which necessitate a minor version bump (v3.1 ~> v3.2)
3. Bug Fixes (`+bug`) corrections to code which do not change or add functionality, which necessitate a patch version bump (v3.1.0 ~> v3.1.1) 3. Bug Fixes (`+bug`) corrections to code which do not change or add functionality, which necessitate a patch version bump (v3.1.0 ~> v3.1.1)
4. Site Enhancements (`+site`) changes to the source of https://jekyllrb.com, found in `site/` 4. Documentation (`+doc`) - changes to the documentation found in `docs/_docs/`
5. Development Fixes (`+dev`) changes which do not affect user-facing functionality or documentation, such as test fixes or bumping internal dependencies 5. Site Enhancements (`+site`) changes to the source of [https://jekyllrb.com](https://jekyllrb.com) found in `docs/`
6. Development Fixes (`+dev`) changes which do not affect user-facing functionality or documentation, such as test fixes or bumping internal dependencies
7. Forward Ports (`+port`) — bug fixes applied to a previous version of Jekyll pulled onto `master`, e.g. cherry-picked commits from `3-1-stable` to `master`
Once @jekyllbot has merged the pull request, you should see three things: Once @jekyllbot has merged the pull request, you should see three things:

View File

@ -1,7 +1,5 @@
--- ---
title: "Reviewing a Pull Request" title: "Reviewing a Pull Request"
layout: docs
permalink: /docs/maintaining/reviewing-a-pull-request/
--- ---
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone. **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.

View File

@ -1,7 +1,5 @@
--- ---
title: "Special Labels" title: "Special Labels"
layout: docs
permalink: /docs/maintaining/special-labels/
--- ---
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone. **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.

View File

@ -1,7 +1,5 @@
--- ---
title: "Triaging an Issue" title: "Triaging an Issue"
layout: docs
permalink: /docs/maintaining/triaging-an-issue/
--- ---
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone. **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Blog migrations title: Blog migrations
permalink: /docs/migrations/ permalink: /docs/migrations/
--- ---

View File

@ -1,12 +1,9 @@
--- ---
layout: docs
title: Creating pages title: Creating pages
permalink: /docs/pages/ permalink: /docs/pages/
--- ---
In addition to [writing posts](../posts/), another thing you may want to do In addition to [writing posts](../posts/), you might also want to add static pages (content that isn't date-based) to your Jekyll site. By taking advantage of the way Jekyll copies files and directories, this is easy to do.
with your Jekyll site is create static pages. By taking advantage of the way
Jekyll copies files and directories, this is easy to do.
## Homepage ## Homepage
@ -28,16 +25,14 @@ homepage of your Jekyll-generated site.
## Where additional pages live ## Where additional pages live
Where you put HTML or [Markdown](https://daringfireball.net/projects/markdown/) Where you put HTML or [Markdown](https://daringfireball.net/projects/markdown/)
files for pages depends on how you want the pages to work. files for pages depends on how you want the pages to work. There are two main ways of creating pages:
There are two main ways of creating pages:
- Place named HTML or [Markdown](https://daringfireball.net/projects/markdown/) - Place named HTML or [Markdown](https://daringfireball.net/projects/markdown/)
files for each page in your site's root folder. files for each page in your site's root folder.
- Create a folder in the site's root for each page, and place an index.html - Place pages inside folders and subfolders named whatever you want.
or index.md file in each page folder.
Both methods work fine (and can be used in conjunction with each other), Both methods work fine (and can be used in conjunction with each other),
with the only real difference being the resulting URLs. with the only real difference being the resulting URLs. By default, pages retain the same folder structure in `_site` as they do in the source directory.
### Named HTML files ### Named HTML files
@ -59,42 +54,21 @@ and associated URLs might look like:
└── contact.html # => http://example.com/contact.html └── contact.html # => http://example.com/contact.html
``` ```
### Named folders containing index HTML files If you have a lot of pages, you can organize those pages into subfolders. The same subfolders that are used to group your pages in our project's source will exist in the `_site` folder when your site builds.
There is nothing wrong with the above method. However, some people like to keep ## Flattening pages from subfolders into the root directory
their URLs free from things like filename extensions. To achieve clean URLs for
pages using Jekyll, you simply need to create a folder for each top-level page
you want, and then place an `index.html` file in each pages folder. This way
the page URL ends up being the folder name, and the web server will serve up
the respective `index.html` file. Here's an example of what this structure
might look like:
```sh If you have pages organized into subfolders in your source folder and want to flatten them in the root folder on build, you must add the [permalink]({% link _docs/permalinks.md %}) property directly in your page's front matter like this:
.
├── _config.yml ```
├── _includes/ ---
├── _layouts/ title: My page
├── _posts/ permalink: mypageurl.html
├── _site/ ---
├── about/
| └── index.html # => http://example.com/about/
├── contact/
| └── index.html # => http://example.com/contact/
|── other/
| └── index.md # => http://example.com/other/
└── index.html # => http://example.com/
``` ```
This approach may not suit everyone, but for people who like clean URLs its ### Named folders containing index HTML files
simple and it works. In the end, the decision is yours!
<div class="note"> If you don't want file extensions (`.html`) to appear in your page URLs (file extensions are the default), you can choose a [permalink style](../permalinks/#builtinpermalinkstyles) that has a trailing slash instead of a file extension.
<h5>ProTip™: Use permalink Front Matter Variable</h5>
<p> Note if you want to view your site offline *without the Jekyll preview server*, your browser will need the file extension to display the page, and all assets will need to be relative links that function without the server baseurl.
Clean URLs can also be achieved using the <code>permalink</code> front
matter variable. In the example above, using the first method, you can
get URL <code>http://example.com/other</code> for the file
<code>other.md</code> by setting this at the top of the file:
<code>permalink: /other</code>
</p>
</div>

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Pagination title: Pagination
permalink: /docs/pagination/ permalink: /docs/pagination/
--- ---

View File

@ -1,30 +1,56 @@
--- ---
layout: docs
title: Permalinks title: Permalinks
permalink: /docs/permalinks/ permalink: /docs/permalinks/
--- ---
Jekyll supports a flexible way to build your sites URLs. You can specify the Permalinks refer to the URLs (excluding the domain name or directory folder) for your pages, posts, or collections.
permalinks for your site through the [Configuration](../configuration/) or in Jekyll supports a flexible way to build permalinks, allowing you to leverage various template variables or choose built-in permalink styles (such as `date`) that automatically use a template-variable pattern.
the [YAML Front Matter](../frontmatter/) for each post. Youre free to choose
one of the built-in styles to create your links or craft your own. The default
style is `date`.
Permalinks are constructed by creating a template URL where dynamic elements You construct permalinks by creating a template URL where dynamic elements are represented by colon-prefixed keywords. The default template permalink is `/:categories/:year/:month/:day/:title.html`. Each of the colon-prefixed keywords is a template variable.
are represented by colon-prefixed keywords. For example, the default `date`
permalink is defined according to the format `/:categories/:year/:month/:day/:title.html`.
<div class="note info"> ## Where to configure permalinks
<h5>Specifying permalinks through the YAML Front Matter</h5>
<p>
Built-in permalink styles are not recognized in YAML Front Matter. So
<code>permalink: pretty</code> will not work, but the equivalent
<code>/:categories/:year/:month/:day/:title/</code>
using template variables will.
</p>
</div>
## Template variables You can configure your site's permalinks through the [Configuration]({% link _docs/configuration.md %}) file or in the [Front Matter]({% link _docs/frontmatter.md %}) for each post, page, or collection.
Setting permalink styles in your configuration file applies the setting globally in your project. You configure permalinks in your `_config.yml` file like this:
```yaml
permalink: /:categories/:year/:month/:day/:title.html
```
If you don't specify any permalink setting, Jekyll uses the above pattern as the default.
The permalink can also be set using a built-in permalink style:
```yaml
permalink: date
```
`date` is the same as `:categories/:year/:month/:day/:title.html`, the default. See [Built-in Permalink Styles](#builtinpermalinkstyles) below for more options.
Setting the permalink in your post, page, or collection's front matter overrides any global settings. Here's an example:
```yaml
---
title: My page title
permalink: /mypageurl/
---
```
Even if your configuration file specifies the `date` style, the URL for this page would be `http://somedomain.com/mypageurl/`.
When you use permalinks that omit the `.html` file extension (called "pretty URLs") Jekyll builds the file as index.html placed inside a folder with the page's name. For example:
```
├── mypageurl
│   └── index.html
```
With a URL such as `/mypageurl/`, servers automatically load the index.html file inside the folder, so users can simply navigate to `http://somedomain.com/mypageurl/` to get to `mypageurl/index.html`.
## Template variables for permalinks {#template-variables}
The following table lists the template variables available for permalinks. You can use these variables in the `permalink` property in your config file.
<div class="mobile-side-scroller"> <div class="mobile-side-scroller">
<table> <table>
@ -40,7 +66,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
<p><code>year</code></p> <p><code>year</code></p>
</td> </td>
<td> <td>
<p>Year from the Posts filename</p> <p>Year from the post's filename</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -48,7 +74,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
<p><code>month</code></p> <p><code>month</code></p>
</td> </td>
<td> <td>
<p>Month from the Posts filename</p> <p>Month from the post's filename</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -56,7 +82,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
<p><code>i_month</code></p> <p><code>i_month</code></p>
</td> </td>
<td> <td>
<p>Month from the Posts filename without leading zeros.</p> <p>Month from the post's filename without leading zeros.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -64,7 +90,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
<p><code>day</code></p> <p><code>day</code></p>
</td> </td>
<td> <td>
<p>Day from the Posts filename</p> <p>Day from the post's filename</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -72,7 +98,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
<p><code>i_day</code></p> <p><code>i_day</code></p>
</td> </td>
<td> <td>
<p>Day from the Posts filename without leading zeros.</p> <p>Day from the post's filename without leading zeros.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -80,7 +106,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
<p><code>short_year</code></p> <p><code>short_year</code></p>
</td> </td>
<td> <td>
<p>Year from the Posts filename without the century.</p> <p>Year from the post's filename without the century.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -89,7 +115,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
</td> </td>
<td> <td>
<p> <p>
Hour of the day, 24-hour clock, zero-padded from the posts <code>date</code> front matter. (00..23) Hour of the day, 24-hour clock, zero-padded from the post's <code>date</code> front matter. (00..23)
</p> </p>
</td> </td>
</tr> </tr>
@ -99,7 +125,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
</td> </td>
<td> <td>
<p> <p>
Minute of the hour from the posts <code>date</code> front matter. (00..59) Minute of the hour from the post's <code>date</code> front matter. (00..59)
</p> </p>
</td> </td>
</tr> </tr>
@ -109,7 +135,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
</td> </td>
<td> <td>
<p> <p>
Second of the minute from the posts <code>date</code> front matter. (00..59) Second of the minute from the post's <code>date</code> front matter. (00..59)
</p> </p>
</td> </td>
</tr> </tr>
@ -130,8 +156,8 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
</td> </td>
<td> <td>
<p> <p>
Slugified title from the documents filename ( any character Slugified title from the documents filename (any character
except numbers and letters is replaced as hyphen ). May be except numbers and letters is replaced as hyphen). May be
overridden via the documents <code>slug</code> YAML front matter. overridden via the documents <code>slug</code> YAML front matter.
</p> </p>
</td> </td>
@ -142,7 +168,7 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
</td> </td>
<td> <td>
<p> <p>
The specified categories for this Post. If a post has multiple The specified categories for this post. If a post has multiple
categories, Jekyll will create a hierarchy (e.g. <code>/category1/category2</code>). categories, Jekyll will create a hierarchy (e.g. <code>/category1/category2</code>).
Also Jekyll automatically parses out double slashes in the URLs, Also Jekyll automatically parses out double slashes in the URLs,
so if no categories are present, it will ignore this. so if no categories are present, it will ignore this.
@ -153,10 +179,11 @@ permalink is defined according to the format `/:categories/:year/:month/:day/:ti
</table> </table>
</div> </div>
## Built-in permalink styles Note that all template variables relating to time or categories are available to posts only.
While you can specify a custom permalink style using [template variables](#template-variables), ## Built-in permalink styles {#builtinpermalinkstyles}
Jekyll also provides the following built-in styles for convenience.
Although you can specify a custom permalink pattern using [template variables](#template-variables), Jekyll also provides the following built-in styles for convenience.
<div class="mobile-side-scroller"> <div class="mobile-side-scroller">
<table> <table>
@ -203,26 +230,16 @@ Jekyll also provides the following built-in styles for convenience.
</table> </table>
</div> </div>
## Pages and collections Rather than typing `permalink: /:categories/:year/:month/:day/:title/`, you can just type `permalink: pretty`.
The `permalink` configuration setting specifies the permalink style used for <div class="note info">
posts. Pages and collections each have their own default permalink style; the <h5>Specifying permalinks through the YAML Front Matter</h5>
default style for pages is `/:path/:basename` and the default for collections is <p>Built-in permalink styles are not recognized in YAML Front Matter. As a result, <code>permalink: pretty</code> will not work.</p>
`/:collection/:path`. </div>
These styles are modified to match the suffix style specified in the post ## Permalink style examples with posts {#permalink-style-examples}
permalink setting. For example, a permalink style of `pretty`, which contains a
trailing slash, will update page permalinks to also contain a trailing slash:
`/:path/:basename/`. A permalink style of `date`, which contains a trailing
file extension, will update page permalinks to also contain a file extension:
`/:path/:basename:output_ext`. The same is true for any custom permalink style.
The permalink for an individual page or collection document can always be Here are a few examples to clarify how permalink styles get applied with posts.
overridden in the [YAML Front Matter](../frontmatter/) for the page or document.
Additionally, permalinks for a given collection can be customized [in the
collections configuration](../collections/).
## Permalink style examples
Given a post named: `/2009-04-29-slap-chop.md` Given a post named: `/2009-04-29-slap-chop.md`
@ -270,7 +287,7 @@ Given a post named: `/2009-04-29-slap-chop.md`
<tr> <tr>
<td> <td>
<p><code>/:year/:month/:title</code></p> <p><code>/:year/:month/:title</code></p>
<p>See <a href="#extensionless-permalinks">extensionless permalinks</a> for details.</p> <p>See <a href="#extensionless-permalinks">Extensionless permalinks with no trailing slashes</a> for details.</p>
</td> </td>
<td> <td>
<p><code>/2009/04/slap-chop</code></p> <p><code>/2009/04/slap-chop</code></p>
@ -280,24 +297,58 @@ Given a post named: `/2009-04-29-slap-chop.md`
</table> </table>
</div> </div>
## Extensionless permalinks ## Permalink settings for pages and collections {#pages-and-collections}
Jekyll supports permalinks that contain neither a trailing slash nor a file The permalink setting in your configuration file specifies the permalink style used for posts, pages, and collections. However, because pages and collections don't have time or categories, these aspects of the permalink style are ignored with pages and collections.
extension, but this requires additional support from the web server to properly
serve. When using extensionless permalinks, output files written to disk will
still have the proper file extension (typically `.html`), so the web server
must be able to map requests without file extensions to these files.
Both [GitHub Pages](../github-pages/) and the Jekyll's built-in WEBrick server For example:
handle these requests properly without any additional work.
* A permalink style of `/:categories/:year/:month/:day/:title.html` for posts becomes `/:title.html` for pages and collections.
* A permalink style of `pretty` (or `/:categories/:year/:month/:day/:title/`), which omits the file extension and contains a trailing slash, will update page and collection permalinks to also omit the file extension and contain a trailing slash: `/:title/`.
* A permalink style of `date`, which contains a trailing file extension, will update page permalinks to also contain a trailing file extension: `/:title.html`. But no time or category information will be included.
## Permalinks and default paths
The path to the post or page in the built site differs for posts, pages, and collections:
### Posts
The subfolders into which you may have organized your posts inside the `_posts` directory will not be part of the permalink.
If you use a permalink style that omits the `.html` file extension, each post is rendered as an `index.html` file inside a folder with the post's name (for example, `categoryname/2016/12/01/mypostname/index.html`).
### Pages
Unlike posts, pages by default mimic the source directory structure exactly. (The only exception is if your page has a `permalink` declared its front matter &mdash; in that case, the structure honors the permalink setting instead of the source folder structure.)
As with posts, if you use a permalink style that omits the `.html` file extension, each page is rendered as an `index.html` file inserted inside a folder with the page's name (for example, `mypage/index.html`).
### Collections
By default, collections follow a similar structure in the `_site` folder as pages, except that the path is prefaced by the collection name. For example: `collectionname/mypage.html`. For permalink settings that omit the file extension, the path would be `collection_name/mypage/index.html`.
Collections have their own way of setting permalinks. Additionally, collections have unique template variables available available (such as `path` and `output_ext`). See the [Configuring permalinks for collections](../collections/#permalinks) in Collections for more information.
## Flattening pages in \_site on build
If you want to flatten your pages (pull them out of subfolders) in the `_site` directory when your site builds (similar to posts), add the `permalink` property to the front matter of each page, with no path specified:
```
---
title: My page
permalink: mypageurl.html
---
```
## Extensionless permalinks with no trailing slashes {#extensionless-permalinks}
Jekyll supports permalinks that contain neither a trailing slash nor a file extension, but this requires additional support from the web server to properly serve. When using these types of permalinks, output files written to disk will still have the proper file extension (typically `.html`), so the web server must be able to map requests without file extensions to these files.
Both [GitHub Pages](../github-pages/) and the Jekyll's built-in WEBrick server handle these requests properly without any additional work.
### Apache ### Apache
The Apache web server has very extensive support for content negotiation and can The Apache web server has extensive support for content negotiation and can handle extensionless URLs by setting the [multiviews](https://httpd.apache.org/docs/current/content-negotiation.html#multiviews) option in your `httpd.conf` or `.htaccess` file:
handle extensionless URLs by setting the [multiviews][] option in your
`httpd.conf` or `.htaccess` file:
[multiviews]: https://httpd.apache.org/docs/current/content-negotiation.html#multiviews
{% highlight apache %} {% highlight apache %}
Options +MultiViews Options +MultiViews
@ -305,13 +356,12 @@ Options +MultiViews
### Nginx ### Nginx
The [try_files][] directive allows you to specify a list of files to search for The [try_files](http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files) directive allows you to specify a list of files to search for to process a request. The following configuration will instruct nginx to search for a file with an `.html` extension if an exact match for the requested URI is not found.
to process a request. The following configuration will instruct nginx to search
for a file with an `.html` extension if an exact match for the requested URI is
not found.
[try_files]: http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
{% highlight nginx %} {% highlight nginx %}
try_files $uri $uri.html $uri/ =404; try_files $uri $uri.html $uri/ =404;
{% endhighlight %} {% endhighlight %}
## Linking without regard to permalink styles
You can create links in your topics to other posts, pages, or collection items in a way that is valid no matter what permalink configuration you choose. By using the `link` tag, if you change your permalinks, your links won't break. See [Linking to pages](../templates#link) in Templates for more details.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Plugins title: Plugins
permalink: /docs/plugins/ permalink: /docs/plugins/
--- ---
@ -754,6 +753,7 @@ LESS.js files during generation.
- [Jekyll::Paginate::Category](https://github.com/midnightSuyama/jekyll-paginate-category): Pagination Generator for Jekyll Category. - [Jekyll::Paginate::Category](https://github.com/midnightSuyama/jekyll-paginate-category): Pagination Generator for Jekyll Category.
- [AMP-Jekyll by Juuso Mikkonen](https://github.com/juusaw/amp-jekyll): Generate [Accelerated Mobile Pages](https://www.ampproject.org) of Jekyll posts. - [AMP-Jekyll by Juuso Mikkonen](https://github.com/juusaw/amp-jekyll): Generate [Accelerated Mobile Pages](https://www.ampproject.org) of Jekyll posts.
- [Jekyll Art Gallery plugin](https://github.com/alexivkin/Jekyll-Art-Gallery-Plugin): An advanced art/photo gallery generation plugin for creating galleries from a set of image folders. Supports image tagging, thumbnails, sorting, image rotation, post-processing (remove EXIF, add watermark), multiple collections and much more. - [Jekyll Art Gallery plugin](https://github.com/alexivkin/Jekyll-Art-Gallery-Plugin): An advanced art/photo gallery generation plugin for creating galleries from a set of image folders. Supports image tagging, thumbnails, sorting, image rotation, post-processing (remove EXIF, add watermark), multiple collections and much more.
- [jekyll-ga](https://github.com/developmentseed/jekyll-ga): A Jekyll plugin that downloads Google Analytics data and adds it to posts. Useful for making a site that lists "most popular" content. [Read the introduction](https://developmentseed.org/blog/google-analytics-jekyll-plugin/) post on the developmentSEED blog.
#### Converters #### Converters
@ -771,7 +771,6 @@ LESS.js files during generation.
- [Markdown References by Olov Lassus](https://github.com/olov/jekyll-references): Keep all your markdown reference-style link definitions in one \_references.md file. - [Markdown References by Olov Lassus](https://github.com/olov/jekyll-references): Keep all your markdown reference-style link definitions in one \_references.md file.
- [Stylus Converter](https://gist.github.com/988201): Convert .styl to .css. - [Stylus Converter](https://gist.github.com/988201): Convert .styl to .css.
- [ReStructuredText Converter](https://github.com/xdissent/jekyll-rst): Converts ReST documents to HTML with Pygments syntax highlighting. - [ReStructuredText Converter](https://github.com/xdissent/jekyll-rst): Converts ReST documents to HTML with Pygments syntax highlighting.
- [Jekyll-pandoc-plugin](https://github.com/dsanson/jekyll-pandoc-plugin): Use pandoc for rendering markdown.
- [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandocs markdown extensions. - [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandocs markdown extensions.
- [Transform Layouts](https://gist.github.com/1472645): Allows HAML layouts (you need a HAML Converter plugin for this to work). - [Transform Layouts](https://gist.github.com/1472645): Allows HAML layouts (you need a HAML Converter plugin for this to work).
- [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll. - [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll.
@ -805,6 +804,9 @@ LESS.js files during generation.
- [jekyll-typogrify](https://github.com/myles/jekyll-typogrify): A Jekyll plugin that brings the functions of [typogruby](http://avdgaag.github.io/typogruby/). - [jekyll-typogrify](https://github.com/myles/jekyll-typogrify): A Jekyll plugin that brings the functions of [typogruby](http://avdgaag.github.io/typogruby/).
- [Jekyll Email Protect](https://github.com/vwochnik/jekyll-email-protect): Email protection liquid filter for Jekyll - [Jekyll Email Protect](https://github.com/vwochnik/jekyll-email-protect): Email protection liquid filter for Jekyll
- [Jekyll Uglify Filter](https://github.com/mattg/jekyll-uglify-filter): A Liquid filter that runs your JavaScript through UglifyJS. - [Jekyll Uglify Filter](https://github.com/mattg/jekyll-uglify-filter): A Liquid filter that runs your JavaScript through UglifyJS.
- [match_regex](https://github.com/sparanoid/match_regex): A Liquid filter to perform regex match.
- [replace_regex](https://github.com/sparanoid/replace_regex): A Liquid filter to perform regex replace.
- [Jekyll Money](https://rubygems.org/gems/jekyll-money): A Jekyll plugin for dealing with money. Because we all have to at some point.
#### Tags #### Tags
@ -918,6 +920,9 @@ LESS.js files during generation.
- [jekyll-data](https://github.com/ashmaroli/jekyll-data): Read data files within Jekyll Theme Gems. - [jekyll-data](https://github.com/ashmaroli/jekyll-data): Read data files within Jekyll Theme Gems.
- [jekyll-pinboard](https://github.com/snaptortoise/jekyll-pinboard-plugin): Access your Pinboard bookmarks within your Jekyll theme. - [jekyll-pinboard](https://github.com/snaptortoise/jekyll-pinboard-plugin): Access your Pinboard bookmarks within your Jekyll theme.
- [jekyll-migrate-permalink](https://github.com/mpchadwick/jekyll-migrate-permalink): Adds a `migrate-permalink` sub-command to help deal with side effects of changing your permalink. - [jekyll-migrate-permalink](https://github.com/mpchadwick/jekyll-migrate-permalink): Adds a `migrate-permalink` sub-command to help deal with side effects of changing your permalink.
- [Jekyll-Post](https://github.com/robcrocombe/jekyll-post): A CLI tool to easily draft, edit, and publish Jekyll posts.
- [jekyll-numbered-headings](https://github.com/muratayusuke/jekyll-numbered-headings): Adds ordered number to headings.
- [jekyll-pre-commit](https://github.com/mpchadwick/jekyll-pre-commit): A framework for running checks against your posts using a git pre-commit hook before you publish them.
#### Editors #### Editors

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Writing posts title: Writing posts
permalink: /docs/posts/ permalink: /docs/posts/
--- ---
@ -111,6 +110,24 @@ Linking to a PDF for readers to download:
</p> </p>
</div> </div>
## A typical post
Jekyll can handle many different iterations of the idea you might associate with a "post," however a standard blog style post, including an Title, Layout, Publishing Date, and Categories might look like this:
```
---
layout: post
title: "Welcome to Jekyll!"
date: 2015-11-17 16:16:01 -0600
categories: jekyll update
---
Youll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `bundle exec jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
```
Everything in between the first and second `---` are part of the YAML Front Matter, and everything after the second `---` will be rendered with Markdown and show up as "Content."
## Displaying an index of posts ## Displaying an index of posts
Its all well and good to have posts in a folder, but a blog is no use unless Its all well and good to have posts in a folder, but a blog is no use unless

View File

@ -1,28 +1,51 @@
--- ---
layout: docs
title: Quick-start guide title: Quick-start guide
permalink: /docs/quickstart/ permalink: /docs/quickstart/
--- ---
For the impatient, here's how to get a boilerplate Jekyll site up and running.
If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) development environment with all headers and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](/docs/installation/#requirements/)), you can create a new Jekyll site by doing the following:
```sh ```sh
# Install Jekyll and Bundler gems through RubyGems
~ $ gem install jekyll bundler ~ $ gem install jekyll bundler
# Create a new Jekyll site at ./myblog
~ $ jekyll new myblog ~ $ jekyll new myblog
# Change into your new directory
~ $ cd myblog ~ $ cd myblog
# Build the site on the preview server
~/myblog $ bundle exec jekyll serve ~/myblog $ bundle exec jekyll serve
# => Now browse to http://localhost:4000
# Now browse to http://localhost:4000
``` ```
The `jekyll new` command now automatically initiates `bundle install` and installs the dependencies required. To skip this, pass `--skip-bundle` option like so `jekyll new myblog --skip-bundle`. If you encounter any unexpected errors during the above, please refer to the already-mentioned [requirements](/docs/installation/#requirements/) page, as you might be missing development headers or other prerequisites.
If you wish to install jekyll into an existing directory, you can do so by running `jekyll new .` from within the directory instead of creating a new one. If the existing directory isn't empty, you'll also have to pass the `--force` option like so `jekyll new . --force`. ## About Bundler
That's nothing, though. The real magic happens when you start creating blog `gem install jekyll bundler` installs the [jekyll](https://rubygems.org/gems/jekyll/) and [bundler](https://rubygems.org/gems/bundler) gems through [RubyGems](https://rubygems.org/). You need only to install the gems one time &mdash; not every time you create a new Jekyll project. Here are some additional details:
posts, using the front matter to control templates and layouts, and taking
advantage of all the awesome configuration options Jekyll makes available.
If you're running into problems, ensure you have all the [requirements * `bundler` is a gem that manages other Ruby gems. It makes sure your gems and gem versions are compatible, and that you have all necessary dependencies each gem requires.
installed][Installation]. * The `Gemfile` and `Gemfile.lock` files inform Bundler about the gem requirements in your site. If your site doesn't have these Gemfiles, you can omit `bundle exec` and just run `jekyll serve`.
[Installation]: /docs/installation/ * When you run `bundle exec jekyll serve`, Bundler uses the gems and versions as specified in `Gemfile.lock` to ensure your Jekyll site builds with no compatibility or dependency conflicts.
## Options for creating a new site with Jekyll
`jekyll new <PATH>` installs a new Jekyll site at the path specified (relative to current directory). In this case, Jekyll will be installed in a directory called `myblog`. Here are some additional details:
* To install the Jekyll site into the directory you're currently in, run `jekyll new .` If the existing directory isn't empty, you can pass the `--force` option with `jekyll new . --force`.
* `jekyll new` automatically initiates `bundle install` to install the dependencies required. (If you don't want Bundler to install the gems, use `jekyll new myblog --skip-bundle`.)
* By default, the Jekyll site installed by `jekyll new` uses a gem-based theme called [Minima](https://github.com/jekyll/minima). With [gem-based themes](../themes), some of the directories and files are stored in the theme-gem, hidden from your immediate view.
* We recommend setting up Jekyll with a gem-based theme but if you want to start with a blank slate, use `jekyll new myblog --blank`
* To learn about other parameters you can include with `jekyll new`, type `jekyll new --help`.
When in doubt, use the <code>help</code> command to remind you of all available options and usage, it also works with the <code>new</code>, <code>build</code> and <code>serve</code> subcommands, e.g. <code>jekyll help new</code> or <code>jekyll help build</code>.
{: .note .info }
## Next steps
Building a Jekyll site with the default theme is just the first step. The real magic happens when you start creating blog posts, using the front matter to control templates and layouts, and taking advantage of all the awesome configuration options Jekyll makes available.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Resources title: Resources
permalink: /docs/resources/ permalink: /docs/resources/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Sites using Jekyll title: Sites using Jekyll
permalink: /docs/sites/ permalink: /docs/sites/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Static Files title: Static Files
permalink: /docs/static-files/ permalink: /docs/static-files/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Directory structure title: Directory structure
permalink: /docs/structure/ permalink: /docs/structure/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Templates title: Templates
permalink: /docs/templates/ permalink: /docs/templates/
--- ---
@ -421,56 +420,15 @@ The default is `default`. They are as follows (with what they filter):
### Includes ### Includes
If you have small page fragments that you wish to include in multiple places on If you have small page snippets that you want to include in multiple places on your site, save the snippets as *include files* and insert them where required, by using the `include` tag:
your site, you can use the `include` tag.
```liquid ```liquid
{% raw %}{% include footer.html %}{% endraw %} {% raw %}{% include footer.html %}{% endraw %}
``` ```
Jekyll expects all include files to be placed in an `_includes` directory at the Jekyll expects all *include files* to be placed in an `_includes` directory at the root of your source directory. In the above example, this will embed the contents of `_includes/footer.html` into the calling file.
root of your source directory. This will embed the contents of
`<source>/_includes/footer.html` into the calling file.
<div class="note"> For more advanced information on using includes, see [Includes](../includes).
<h5>ProTip™: Use variables as file name</h5>
<p>
The name of the file you wish to embed can be literal (as in the example above),
or you can use a variable, using liquid-like variable syntax as in
<code>{% raw %}{% include {{my_variable}} %}{% endraw %}</code>.
</p>
</div>
You can also pass parameters to an include. Omit the quotation marks to send a variable's value. Liquid curly brackets should not be used here:
```liquid
{% raw %}{% include footer.html param="value" variable-param=page.variable %}{% endraw %}
```
These parameters are available via Liquid in the include:
```liquid
{% raw %}{{ include.param }}{% endraw %}
```
#### Including files relative to another file
You can also choose to include file fragments relative to the current file:
```liquid
{% raw %}{% include_relative somedir/footer.html %}{% endraw %}
```
You won't need to place your included content within the `_includes` directory. Instead,
the inclusion is specifically relative to the file where the tag is being used. For example,
if `_posts/2014-09-03-my-file.markdown` uses the `include_relative` tag, the included file
must be within the `_posts` directory, or one of its subdirectories. You cannot include
files in other locations.
All the other capabilities of the `include` tag are available to the `include_relative` tag,
such as using variables.
### Code snippet highlighting ### Code snippet highlighting
@ -530,64 +488,6 @@ site. If you use `linenos`, you might want to include an additional CSS class
definition for the `.lineno` class in `syntax.css` to distinguish the line definition for the `.lineno` class in `syntax.css` to distinguish the line
numbers from the highlighted code. numbers from the highlighted code.
### Link
If you want to include a link to a collection's document, a post, a page
or a file the `link` tag will generate the correct permalink URL for the path
you specify.
You must include the file extension when using the `link` tag.
```liquid
{% raw %}
{{ site.baseurl }}{% link _collection/name-of-document.md %}
{{ site.baseurl }}{% link _posts/2016-07-26-name-of-post.md %}
{{ site.baseurl }}{% link news/index.html %}
{{ site.baseurl }}{% link /assets/files/doc.pdf %}
{% endraw %}
```
You can also use this tag to create a link in Markdown as follows:
```liquid
{% raw %}
[Link to a document]({{ site.baseurl }}{% link _collection/name-of-document.md %})
[Link to a post]({{ site.baseurl }}{% link _posts/2016-07-26-name-of-post.md %})
[Link to a page]({{ site.baseurl }}{% link news/index.html %})
[Link to a file]({{ site.baseurl }}{% link /assets/files/doc.pdf %})
{% endraw %}
```
### Post URL
If you would like to include a link to a post on your site, the `post_url` tag
will generate the correct permalink URL for the post you specify.
```liquid
{% raw %}
{{ site.baseurl }}{% post_url 2010-07-21-name-of-post %}
{% endraw %}
```
If you organize your posts in subdirectories, you need to include subdirectory
path to the post:
```liquid
{% raw %}
{{ site.baseurl }}{% post_url /subdir/2010-07-21-name-of-post %}
{% endraw %}
```
There is no need to include the file extension when using the `post_url` tag.
You can also use this tag to create a link to a post in Markdown as follows:
```liquid
{% raw %}
[Name of Link]({{ site.baseurl }}{% post_url 2010-07-21-name-of-post %})
{% endraw %}
```
### Gist ### Gist
Use the `gist` tag to easily embed a GitHub Gist onto your site. This works Use the `gist` tag to easily embed a GitHub Gist onto your site. This works
@ -609,3 +509,71 @@ You may also optionally specify the filename in the gist to display:
To use the `gist` tag, you'll need to add the To use the `gist` tag, you'll need to add the
[jekyll-gist](https://github.com/jekyll/jekyll-gist) gem to your project. [jekyll-gist](https://github.com/jekyll/jekyll-gist) gem to your project.
## Links
### Linking to pages {#link}
To link to a post, a page, collection item, or file, the `link` tag will generate the correct permalink URL for the path you specify. For example, if you use the `link` tag to link to `mypage.html`, even if you change your permalink style to include the file extension or omit it, the URL formed by the `link` tag will always be valid.
You must include the file's original extension when using the `link` tag. Here are some examples:
```liquid
{% raw %}
{{ site.baseurl }}{% link _collection/name-of-document.md %}
{{ site.baseurl }}{% link _posts/2016-07-26-name-of-post.md %}
{{ site.baseurl }}{% link news/index.html %}
{{ site.baseurl }}{% link /assets/files/doc.pdf %}
{% endraw %}
```
You can also use the `link` tag to create a link in Markdown as follows:
```liquid
{% raw %}
[Link to a document]({{ site.baseurl }}{% link _collection/name-of-document.md %})
[Link to a post]({{ site.baseurl }}{% link _posts/2016-07-26-name-of-post.md %})
[Link to a page]({{ site.baseurl }}{% link news/index.html %})
[Link to a file]({{ site.baseurl }}{% link /assets/files/doc.pdf %})
{% endraw %}
```
(Including `{% raw %}{{ site.baseurl }}{% endraw %}` is optional &mdash; it depends on whether you want to preface the page URL with the `baseurl` value.)
The path to the post, page, or collection is defined as the path relative to the root directory (where your config file is) to the file, not the path from your existing page to the other page.
For example, suppose you're creating a link `page_a.md` (stored in `pages/folder1/folder2`) to `page_b.md` (stored in `pages/folder1`). Your path in the link would not be `../page_b.html`. Instead, it would be `/pages/folder1/page_b.md`.
If you're unsure of the path, add `{% raw %}{{ page.path }}{% endraw %}` to the page and it will display the path.
One major benefit of using the `link` tag is link validation. If the link doesn't exist, Jekyll won't build your site. This is a good thing, as it will alert you to a broken link so you can fix it (rather than allowing you to build and deploy a site with broken links).
Note you cannot add filters to `link` tags. For example, you cannot append a string using Liquid filters, such as `{% raw %}{% link mypage.html | append: "#section1" %} {% endraw %}`. To link to sections on a page, you will need to use regular HTML or Markdown linking techniques.
### Linking to posts
If you want like to include a link to a post on your site, the `post_url` tag will generate the correct permalink URL for the post you specify.
```liquid
{% raw %}
{{ site.baseurl }}{% post_url 2010-07-21-name-of-post %}
{% endraw %}
```
If you organize your posts in subdirectories, you need to include subdirectory path to the post:
```liquid
{% raw %}
{{ site.baseurl }}{% post_url /subdir/2010-07-21-name-of-post %}
{% endraw %}
```
There is no need to include the file extension when using the `post_url` tag.
You can also use this tag to create a link to a post in Markdown as follows:
```liquid
{% raw %}
[Name of Link]({{ site.baseurl }}{% post_url 2010-07-21-name-of-post %})
{% endraw %}
```

View File

@ -1,83 +1,209 @@
--- ---
layout: docs
title: Themes title: Themes
permalink: /docs/themes/ permalink: /docs/themes/
--- ---
Jekyll has an extensive theme system, which allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes package layouts, includes, and stylesheets in a way that can be overridden by your site's content. Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes package up layouts, includes, and stylesheets in a way that can be overridden by your site's content.
## Installing a theme ## Understanding gem-based themes
1. To install a theme, first, add the theme to your site's `Gemfile`: When you [create a new Jekyll site](/docs/quickstart) (by running the `jekyll new <PATH>` command), Jekyll installs a site that uses a gem-based theme called [Minima](https://github.com/jekyll/minima).
gem 'my-awesome-jekyll-theme' With gem-based themes, some of the site's directories (such as the `assets`, `_layouts`, `_includes`, and `_sass` directories) are stored in the theme's gem, hidden from your immediate view. Yet all of the necessary directories will be read and processed during Jekyll's build process.
2. Save the changes to your `Gemfile` In the case of Minima, you see only the following files in your Jekyll site directory:
3. Run the command `bundle install` to install the theme
4. Finally, activate the theme by adding the following to your site's `_config.yml`:
theme: my-awesome-jekyll-theme ```
├── Gemfile
├── Gemfile.lock
├── _config.yml
├── _posts
│ └── 2016-12-04-welcome-to-jekyll.markdown
├── about.md
└── index.md
```
You can have multiple themes listed in your site's Gemfile, but only one theme can be selected in your site's `_config.yml`. The `Gemfile` and `Gemfile.lock` files are used by Bundler to keep track of the required gems and gem versions you need to build your Jekyll site.
{: .note .info }
Gem-based themes make it easy for theme developers to make updates available to anyone who has the theme gem. When there's an update, theme developers push the update to RubyGems.
If you have the theme gem, you can (if you desire) run `bundle update` to update all gems in your project. Or you can run `bundle update <THEME>`, replacing `<THEME>` with the theme name, such as `minima`, to just update the theme gem. Any new files or updates the theme developer has made (such as to stylesheets or includes) will be pulled into your project automatically.
The goal of gem-based themes is to allow you to get all the benefits of a robust, continually updated theme without having all the theme's files getting in your way and over-complicating what might be your primary focus: creating content.
## Overriding theme defaults ## Overriding theme defaults
Jekyll themes set default layouts, includes, and stylesheets, that can be overridden by your site's content. For example, if your selected theme has a `page` layout, you can override the theme's layout by creating your own `page` layout in the `_layouts` folder (e.g., `_layouts/page.html`). Jekyll themes set default layouts, includes, and stylesheets. However, you can override any of the theme defaults with your own site content.
Jekyll will look first to your site's content, before looking to the theme's defaults, for any requested file in the following folders: For example, if your selected theme has a `page` layout, you can override the theme's layout by creating your own `page` layout in the `_layouts` directory (that is, `_layouts/page.html`).
* `/assets` Jekyll will look first to your site's content before looking to the theme's defaults for any requested file in the following folders:
* `/_layouts`
* `/_includes` - `/assets`
* `/_sass` - `/_layouts`
- `/_includes`
- `/_sass`
Refer to your selected theme's documentation and source repository for more information on what files you can override. Refer to your selected theme's documentation and source repository for more information on what files you can override.
{: .note .info} {: .note .info}
To locate theme's files on your computer, run `bundle show` followed by To locate theme's files on your computer:
the name of the theme's gem, e.g. `bundle show minima` for default Jekyll's
theme. Then copy the files you want to override, from the returned path to your root folder.
## Creating a theme 1. Run `bundle show` followed by the name of the theme's gem, e.g., `bundle show minima` for default Jekyll's theme.
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: This returns the location of the gem-based theme files. For example, Minima theme's files are located in `/usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0` on macOS.
2. Open the theme's directory in Finder or Explorer:
```shell
# On MacOS
open $(bundle show minima)
# On Windows
explorer /usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0
```
A Finder or Explorer window opens showing the theme's files and directories. The Minima theme gem contains these files:
```
├── LICENSE.txt
├── README.md
├── _includes
│   ├── disqus_comments.html
│   ├── footer.html
│   ├── google-analytics.html
│   ├── head.html
│   ├── header.html
│   ├── icon-github.html
│   ├── icon-github.svg
│   ├── icon-twitter.html
│   └── icon-twitter.svg
├── _layouts
│   ├── default.html
│   ├── home.html
│   ├── page.html
│   └── post.html
├── _sass
│   ├── minima
│   │   ├── _base.scss
│   │   ├── _layout.scss
│   │   └── _syntax-highlighting.scss
│   └── minima.scss
└── assets
└── main.scss
```
With a clear understanding of the theme's files, you can now override any theme file by creating a similarly named file in your Jekyll site directory.
Let's say you want to override Minima's footer. In your Jekyll site, create an `_includes` folder and add a file in it called `footer.html`. Jekyll will now use your site's `footer.html` file instead of the `footer.html` file from the Minima theme gem.
## Converting gem-based themes to regular themes
Suppose you want to get rid of the gem-based theme and convert it to a regular theme, where all files are present in your Jekyll site directory, with nothing stored in the theme gem.
To do this, copy the files from the theme gem's directory into your Jekyll site directory. (For example, copy them to `/myblog` if you created your Jekyll site at `/myblog`. See the previous section for details.)
Then remove references to the theme gem in `Gemfile` and configuration. For example, to remove `minima`:
- Open `Gemfile` and remove `gem "minima", "~> 2.0"`.
- Open `_config.yml` and remove `theme: minima`.
Now `bundle update` will no longer get updates for the theme gem.
## Installing a gem-based theme {#installing-a-theme}
The `jekyll new <PATH>` command isn't the only way to create a new Jekyll site with a gem-based theme. You can also find gem-based themes online and incorporate them into your Jekyll project.
For example, search for [jekyll theme on RubyGems](https://rubygems.org/search?utf8=%E2%9C%93&query=jekyll-theme) to find other gem-based themes. (Note that not all themes are using `jekyll-theme` as a convention in the theme name.)
To install a gem-based theme:
1. Add the theme to your site's `Gemfile`:
```sh
gem "jekyll-theme-awesome"
```
2. Install the theme:
```sh
bundle install
```
3. Add the following to your site's `_config.yml` to activate the theme:
```sh
theme: jekyll-theme-awesome
```
4. Build your site:
```sh
bundle exec jekyll serve
```
You can have multiple themes listed in your site's `Gemfile`, but only one theme can be selected in your site's `_config.yml`. {: .note .info }
If you're publishing your Jekyll site on [GitHub Pages](https://pages.github.com/), note that GitHub Pages supports only some gem-based themes. See [Supported Themes](https://pages.github.com/themes/) in GitHub's documentation to see which themes are supported.
## Creating a gem-based theme
If you're a Jekyll theme developer (rather than just a consumer of themes), you can package up your theme in RubyGems and allow users to install it through Bundler.
If you're unfamiliar with creating Ruby gems, don't worry. Jekyll will help you scaffold a new theme with the `new-theme` command. Run `jekyll new-theme` with the theme name as an argument.
Here is an example:
```sh ```sh
jekyll new-theme my-awesome-theme jekyll new-theme jekyll-theme-awesome
create /path/to/my-awesome-theme/_layouts create /path/to/jekyll-theme-awesome/_layouts
create /path/to/my-awesome-theme/_includes create /path/to/jekyll-theme-awesome/_includes
create /path/to/my-awesome-theme/_sass create /path/to/jekyll-theme-awesome/_sass
create /path/to/my-awesome-theme/_layouts/page.html create /path/to/jekyll-theme-awesome/_layouts/page.html
create /path/to/my-awesome-theme/_layouts/post.html create /path/to/jekyll-theme-awesome/_layouts/post.html
create /path/to/my-awesome-theme/_layouts/default.html create /path/to/jekyll-theme-awesome/_layouts/default.html
create /path/to/my-awesome-theme/Gemfile create /path/to/jekyll-theme-awesome/Gemfile
create /path/to/my-awesome-theme/my-awesome-theme.gemspec create /path/to/jekyll-theme-awesome/jekyll-theme-awesome.gemspec
create /path/to/my-awesome-theme/README.md create /path/to/jekyll-theme-awesome/README.md
create /path/to/my-awesome-theme/LICENSE.txt create /path/to/jekyll-theme-awesome/LICENSE.txt
initialize /path/to/my-awesome-theme/.git initialize /path/to/jekyll-theme-awesome/.git
create /path/to/my-awesome-theme/.gitignore create /path/to/jekyll-theme-awesome/.gitignore
Your new Jekyll theme, my-awesome-theme, is ready for you in /path/to/my-awesome-theme! Your new Jekyll theme, jekyll-theme-awesome, is ready for you in /path/to/jekyll-theme-awesome!
For help getting started, read /path/to/my-awesome-theme/README.md. For help getting started, read /path/to/jekyll-theme-awesome/README.md.
``` ```
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. Then complete the `.gemspec` and the README files according to your needs.
### Layouts and includes ### Layouts and includes
Theme layouts and includes work just like they work in any Jekyll site. Place layouts in your theme's `/_layouts` folder, and place includes in your themes `/_includes` folder. Theme layouts and includes work just like they work in any Jekyll site. Place layouts in your theme's `/_layouts` folder, and place includes in your themes `/_includes` folder.
For example, if your theme has a `/_layouts/page.html` file, and a page has `layout: page` in its YAML front matter, Jekyll will first look to the site's `_layouts` folder for a the `page` layout, and if none exists, will use your theme's `page` layout. For example, if your theme has a `/_layouts/page.html` file, and a page has `layout: page` in its YAML front matter, Jekyll will first look to the site's `_layouts` folder for the `page` layout, and if none exists, will use your theme's `page` layout.
### Assets ### Assets
Any file in `/assets` will be copied over to the user's site upon build unless they have a file with the same relative path. You may ship any kind of asset here: SCSS, an image, a webfont, etc. These files behave just like pages and static files in Jekyll: if the file has [YAML front matter]({{ site.baseurl }}/docs/frontmatter/) at the top, then it will be rendered. If it does not have YAML front matter, it will simply be copied over into the resulting site. This allows theme creators to ship a default `/assets/styles.scss` file which their layouts can depend on as `/assets/styles.css`. Any file in `/assets` will be copied over to the user's site upon build unless they have a file with the same relative path. You can ship any kind of asset here: SCSS, an image, a webfont, etc. These files behave like pages and static files in Jekyll:
- If the file has [YAML front matter](../docs/frontmatter/) at the top, it will be rendered.
- If the file does not have YAML front matter, it will simply be copied over into the resulting site.
This allows theme creators to ship a default `/assets/styles.scss` file which their layouts can depend on as `/assets/styles.css`.
All files in `/assets` will be output into the compiled site in the `/assets` folder just as you'd expect from using Jekyll on your sites. All files in `/assets` will be output into the compiled site in the `/assets` folder just as you'd expect from using Jekyll on your sites.
### Stylesheets ### Stylesheets
Your theme's stylesheets should be placed in your theme's `/_sass` folder, again, just as you would when authoring a Jekyll site. Your theme's styles can be included in the user's stylesheet using the `@import` directive. Your theme's stylesheets should be placed in your theme's `_sass` folder, again, just as you would when authoring a Jekyll site.
```
_sass
├── jekyll-theme-awesome.scss
```
Your theme's styles can be included in the user's stylesheet using the `@import` directive.
```css
{% raw %}@import "{{ site.theme }}";{% endraw %}
```
### Documenting your theme ### Documenting your theme
@ -91,20 +217,22 @@ Themes are visual. Show users what your theme looks like by including a screensh
To preview your theme as you're authoring it, it may be helpful to add dummy content in, for example, `/index.html` and `/page.html` files. This will allow you to use the `jekyll build` and `jekyll serve` commands to preview your theme, just as you'd preview a Jekyll site. To preview your theme as you're authoring it, it may be helpful to add dummy content in, for example, `/index.html` and `/page.html` files. This will allow you to use the `jekyll build` and `jekyll serve` commands to preview your theme, just as you'd preview a Jekyll site.
If you do preview your theme locally, be sure to add `/_site` to your theme's `.gitignore` file to prevent the compiled site from also being included when you distribute your theme. If you do preview your theme locally, be sure to add `/_site` to your theme's `.gitignore` file to prevent the compiled site from also being included when you distribute your theme. {: .info .note}
{: .info .note}
### Publishing your theme ### Publishing your theme
Themes are published via [RubyGems.org](https://rubygems.org). You'll need a RubyGems account, which you can [create for free](https://rubygems.org/sign_up). Themes are published via [RubyGems.org](https://rubygems.org). You will need a RubyGems account, which you can [create for free](https://rubygems.org/sign_up).
1. First, package your theme, by running the following command, replacing `my-awesome-jekyll-theme` with the name of your theme: 1. First, package your theme, by running the following command, replacing `jekyll-theme-awesome` with the name of your theme:
gem build my-awesome-jekyll-theme.gemspec ```sh
gem build jekyll-theme-awesome.gemspec
```
2. Next, push your packaged theme up to the RubyGems service, by running the following command, again replacing `my-awesome-jekyll-theme` with the name of your theme: 2. Next, push your packaged theme up to the RubyGems service, by running the following command, again replacing `jekyll-theme-awesome` with the name of your theme:
gem push my-awesome-jekyll-theme-*.gem ```sh
gem push jekyll-theme-awesome-*.gem
```
3. To release a new version of your theme, simply update the version number in the gemspec file, ( `my-awesome-jekyll-theme.gemspec` in this example ), and then repeat Steps 1 & 2 above. 3. To release a new version of your theme, update the version number in the gemspec file, ( `jekyll-theme-awesome.gemspec` in this example ), and then repeat Steps 1 & 2 above. We recommend that you follow [Semantic Versioning](http://semver.org/) while bumping your theme-version.
We recommend that you follow [Semantic Versioning](http://semver.org/) while bumping your theme-version.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Troubleshooting title: Troubleshooting
permalink: /docs/troubleshooting/ permalink: /docs/troubleshooting/
--- ---
@ -37,6 +36,15 @@ If you installed the above - specifically on Fedora 23 - but the extensions woul
sudo dnf install redhat-rpm-config sudo dnf install redhat-rpm-config
``` ```
On Ubuntu if you get stuck after `bundle exec jekyll serve` and see error
messages like `Could not locate Gemfile` or `.bundle/ directory`, it's likely
because all requirements have not been fully met. Recent stock Ubuntu
distributions require the installation of both the `ruby` and `ruby-all-dev`
packages:
```sh
sudo apt-get install ruby ruby-all-dev
```
On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the
following commands before installing Jekyll: following commands before installing Jekyll:
@ -181,10 +189,10 @@ That is: defaults are overridden by options specified in `_config.yml`,
and flags specified at the command-line will override all other settings and flags specified at the command-line will override all other settings
specified elsewhere. specified elsewhere.
If you encounter an error in building the site, with the error message If you encounter an error in building the site, with the error message
"'0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the "'0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the
YAML front matter." try including the line `exclude: [vendor]` YAML front matter." try including the line `exclude: [vendor]`
in `_config.yml`. in `_config.yml`.
## Markup Problems ## Markup Problems

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Upgrading from 0.x to 2.x title: Upgrading from 0.x to 2.x
permalink: /docs/upgrading/0-to-2/ permalink: /docs/upgrading/0-to-2/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Upgrading from 2.x to 3.x title: Upgrading from 2.x to 3.x
permalink: /docs/upgrading/2-to-3/ permalink: /docs/upgrading/2-to-3/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Basic Usage title: Basic Usage
permalink: /docs/usage/ permalink: /docs/usage/
--- ---
@ -97,5 +96,12 @@ $ jekyll build --source _source --destination _deploy
For more about the possible configuration options, see the For more about the possible configuration options, see the
[configuration](../configuration/) page. [configuration](../configuration/) page.
<div class="note info">
<h5>Call for help</h5>
<p>
The <code>help</code> command is always here to remind you of all available options and usage, and also works with the <code>build</code>, <code>serve</code> and <code>new</code> subcommands, e.g <code>jekyll help new</code> or <code>jekyll help build</code>.
</p>
</div>
If you're interested in browsing these docs on-the-go, install the If you're interested in browsing these docs on-the-go, install the
`jekyll-docs` gem and run `jekyll docs` in your terminal. `jekyll-docs` gem and run `jekyll docs` in your terminal.

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Variables title: Variables
permalink: /docs/variables/ permalink: /docs/variables/
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: docs
title: Jekyll on Windows title: Jekyll on Windows
permalink: /docs/windows/ permalink: /docs/windows/
--- ---
@ -16,6 +15,10 @@ A quick way to install Jekyll is to follow the [installation instructions by Dav
2. Install Ruby via Chocolatey: `choco install ruby -y` 2. Install Ruby via Chocolatey: `choco install ruby -y`
3. Reopen a command prompt and install Jekyll: `gem install jekyll` 3. Reopen a command prompt and install Jekyll: `gem install jekyll`
Updates in the infrastructure of Ruby may cause SSL errors when attempting to use `gem install` with versions of the RubyGems package older than 2.6. (The RubyGems package installed via the Chocolatey tool is version 2.3) If you have installed an older version, you can update the RubyGems package using the directions [here][ssl-certificate-update].
[ssl-certificate-update]: http://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages
For a more conventional way of installing Jekyll you can follow this [complete guide to install Jekyll 3 on Windows by Sverrir Sigmundarson][windows-installjekyll3]. For a more conventional way of installing Jekyll you can follow this [complete guide to install Jekyll 3 on Windows by Sverrir Sigmundarson][windows-installjekyll3].
[windows-installjekyll3]: https://labs.sverrirs.com/jekyll/ [windows-installjekyll3]: https://labs.sverrirs.com/jekyll/
@ -36,10 +39,10 @@ $ chcp 65001
## Timezone Management ## Timezone Management
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00. Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules. Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows: While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
```ruby ```ruby

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.0.0 Released" title: "Jekyll 1.0.0 Released"
date: "2013-05-06 02:12:52 +0200" date: "2013-05-06 02:12:52 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.0.1 Released" title: "Jekyll 1.0.1 Released"
date: "2013-05-08 23:46:11 +0200" date: "2013-05-08 23:46:11 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.0.2 Released" title: "Jekyll 1.0.2 Released"
date: "2013-05-12 14:45:00 +0200" date: "2013-05-12 14:45:00 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.0.3 Released" title: "Jekyll 1.0.3 Released"
date: "2013-06-07 21:02:13 +0200" date: "2013-06-07 21:02:13 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.1.0 Released" title: "Jekyll 1.1.0 Released"
date: "2013-07-14 19:38:02 +0200" date: "2013-07-14 19:38:02 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.1.1 Released" title: "Jekyll 1.1.1 Released"
date: "2013-07-24 22:24:14 +0200" date: "2013-07-24 22:24:14 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.0.4 Released" title: "Jekyll 1.0.4 Released"
date: "2013-07-25 09:08:38 +0200" date: "2013-07-25 09:08:38 +0200"
author: mattr- author: mattr-

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.1.2 Released" title: "Jekyll 1.1.2 Released"
date: "2013-07-25 09:08:38 +0200" date: "2013-07-25 09:08:38 +0200"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll 1.2.0 Released" title: "Jekyll 1.2.0 Released"
date: "2013-09-06 22:02:41 -0400" date: "2013-09-06 22:02:41 -0400"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.2.1 Released' title: 'Jekyll 1.2.1 Released'
date: 2013-09-14 20:46:50 -0400 date: 2013-09-14 20:46:50 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.3.0.rc1 Released' title: 'Jekyll 1.3.0.rc1 Released'
date: 2013-10-28 20:14:39 -0500 date: 2013-10-28 20:14:39 -0500
author: mattr- author: mattr-

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.3.0 Released' title: 'Jekyll 1.3.0 Released'
date: 2013-11-04 21:46:02 -0600 date: 2013-11-04 21:46:02 -0600
author: mattr- author: mattr-

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.3.1 Released' title: 'Jekyll 1.3.1 Released'
date: 2013-11-26 19:52:20 -0600 date: 2013-11-26 19:52:20 -0600
author: mattr- author: mattr-

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.4.0 Released' title: 'Jekyll 1.4.0 Released'
date: 2013-12-07 13:55:28 -0600 date: 2013-12-07 13:55:28 -0600
author: mattr- author: mattr-

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.4.1 Released' title: 'Jekyll 1.4.1 Released'
date: 2013-12-09 20:44:13 -0600 date: 2013-12-09 20:44:13 -0600
author: mattr- author: mattr-

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.4.2 Released' title: 'Jekyll 1.4.2 Released'
date: 2013-12-16 19:48:13 -0500 date: 2013-12-16 19:48:13 -0500
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.4.3 Released' title: 'Jekyll 1.4.3 Released'
date: 2014-01-13 17:43:32 -0800 date: 2014-01-13 17:43:32 -0800
author: benbalter author: benbalter

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.5.0 Released' title: 'Jekyll 1.5.0 Released'
date: 2014-03-24 20:37:59 -0400 date: 2014-03-24 20:37:59 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 1.5.1 Released' title: 'Jekyll 1.5.1 Released'
date: 2014-03-27 22:43:48 -0400 date: 2014-03-27 22:43:48 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll turns 2.0.0' title: 'Jekyll turns 2.0.0'
author: parkr author: parkr
version: 2.0.0 version: 2.0.0

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 2.0.3 Released' title: 'Jekyll 2.0.3 Released'
date: 2014-05-08 22:43:17 -0400 date: 2014-05-08 22:43:17 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Pick Up your $1 Jekyll Sticker' title: 'Pick Up your $1 Jekyll Sticker'
date: 2014-06-04 15:46:53 -0400 date: 2014-06-04 15:46:53 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll Turns 21! Err... I mean 2.1.0.' title: 'Jekyll Turns 21! Err... I mean 2.1.0.'
date: 2014-06-28 17:26:59 -0400 date: 2014-06-28 17:26:59 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 2.1.1 Released' title: 'Jekyll 2.1.1 Released'
date: 2014-07-01 20:16:43 -0400 date: 2014-07-01 20:16:43 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 2.2.0 Released' title: 'Jekyll 2.2.0 Released'
date: 2014-07-29 18:59:13 -0400 date: 2014-07-29 18:59:13 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 2.3.0 Released' title: 'Jekyll 2.3.0 Released'
date: 2014-08-10 20:38:34 -0400 date: 2014-08-10 20:38:34 -0400
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'A Wild Jekyll 2.4.0 Appeared!' title: 'A Wild Jekyll 2.4.0 Appeared!'
date: 2014-09-09 21:10:33 -0700 date: 2014-09-09 21:10:33 -0700
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll's Mid-Life Crisis (Or, Jekyll turns 2.5.0)" title: "Jekyll's Mid-Life Crisis (Or, Jekyll turns 2.5.0)"
date: 2014-11-05 10:48:22 -0800 date: 2014-11-05 10:48:22 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 2.5.1 Released' title: 'Jekyll 2.5.1 Released'
date: 2014-11-09 09:47:52 -0800 date: 2014-11-09 09:47:52 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 2.5.2 Released' title: 'Jekyll 2.5.2 Released'
date: 2014-11-12 18:49:08 -0800 date: 2014-11-12 18:49:08 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Alfred Xing has joined the Jekyll core team' title: 'Alfred Xing has joined the Jekyll core team'
date: 2014-12-17 11:16:21 -0800 date: 2014-12-17 11:16:21 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll Release for the Holidays! v2.5.3 Out' title: 'Jekyll Release for the Holidays! v2.5.3 Out'
date: 2014-12-22 09:03:30 -0500 date: 2014-12-22 09:03:30 -0500
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: "Jekyll Meet & Greet at GitHub HQ" title: "Jekyll Meet & Greet at GitHub HQ"
date: "2015-01-20 19:23:12 -0800" date: "2015-01-20 19:23:12 -0800"
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0.0.beta1 Released' title: 'Jekyll 3.0.0.beta1 Released'
date: 2015-01-24 00:42:31 -0800 date: 2015-01-24 00:42:31 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Join the Discussion at Jekyll Talk' title: 'Join the Discussion at Jekyll Talk'
date: 2015-02-26 21:06:51 -0800 date: 2015-02-26 21:06:51 -0800
author: alfredxing author: alfredxing
@ -12,4 +11,4 @@ The forum was set up by [@envygeeks](https://github.com/envygeeks) to build a co
There's already been a lot of interesting topics, including a [site showcase](https://talk.jekyllrb.com/t/showcase-sites-made-using-jekyll/18) and [a poll for Jekyll 3.0 priorities](https://talk.jekyllrb.com/t/poll-installation-priorities-for-3-0/106/9). There's already been a lot of interesting topics, including a [site showcase](https://talk.jekyllrb.com/t/showcase-sites-made-using-jekyll/18) and [a poll for Jekyll 3.0 priorities](https://talk.jekyllrb.com/t/poll-installation-priorities-for-3-0/106/9).
Come join the fun! Come join the fun!

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0 Released' title: 'Jekyll 3.0 Released'
date: 2015-10-26 15:37:30 -0700 date: 2015-10-26 15:37:30 -0700
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0.1 Released' title: 'Jekyll 3.0.1 Released'
date: 2015-11-17 22:04:39 -0800 date: 2015-11-17 22:04:39 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0.2 Released' title: 'Jekyll 3.0.2 Released'
date: 2016-01-20 14:08:18 -0800 date: 2016-01-20 14:08:18 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.1.0 Released' title: 'Jekyll 3.1.0 Released'
date: 2016-01-24 13:16:12 -0800 date: 2016-01-24 13:16:12 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.1.1 Released' title: 'Jekyll 3.1.1 Released'
date: 2016-01-28 17:21:50 -0800 date: 2016-01-28 17:21:50 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0.3 Released' title: 'Jekyll 3.0.3 Released'
date: 2016-02-08 10:39:08 -0800 date: 2016-02-08 10:39:08 -0800
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.1.2 Released!' title: 'Jekyll 3.1.2 Released!'
date: 2016-02-19 15:24:00 -0800 date: 2016-02-19 15:24:00 -0800
author: parkr author: parkr

View File

@ -1,7 +1,6 @@
--- ---
title: Making it easier to contribute to Jekyll title: Making it easier to contribute to Jekyll
description: We've made it easier to contribute to Jekyll by updating our contributing documentation and introducing Jekyll Affinity Teams, teams dedicated to specific aspects of the project. description: We've made it easier to contribute to Jekyll by updating our contributing documentation and introducing Jekyll Affinity Teams, teams dedicated to specific aspects of the project.
layout: news_item
author: benbalter author: benbalter
categories: [community] categories: [community]
--- ---

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0.4 Released' title: 'Jekyll 3.0.4 Released'
date: 2016-04-19 10:26:12 -0700 date: 2016-04-19 10:26:12 -0700
author: parkr author: parkr

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.1.3 Released' title: 'Jekyll 3.1.3 Released'
date: 2016-04-19 10:26:16 -0700 date: 2016-04-19 10:26:16 -0700
author: parkr author: parkr
@ -15,4 +14,3 @@ v3.1.3 is a patch release which fixes the follow two issues:
Both of these issues have been resolved. For more information, check out [the full history](/docs/history/#v3-1-3). Both of these issues have been resolved. For more information, check out [the full history](/docs/history/#v3-1-3).
Happy Jekylling! Happy Jekylling!

View File

@ -1,5 +1,4 @@
--- ---
layout: news_item
title: 'Jekyll 3.0.5 Released' title: 'Jekyll 3.0.5 Released'
date: 2016-04-26 17:40:44 -0700 date: 2016-04-26 17:40:44 -0700
author: parkr author: parkr

Some files were not shown because too many files have changed in this diff Show More