Merge branch 'master' into fix-broken-links
This commit is contained in:
commit
02f092809a
14
.rubocop.yml
14
.rubocop.yml
|
@ -22,6 +22,8 @@ Metrics/BlockLength:
|
|||
Exclude:
|
||||
- test/**/*.rb
|
||||
- lib/jekyll/configuration.rb
|
||||
- rake/*.rake
|
||||
- jekyll.gemspec
|
||||
Metrics/ClassLength:
|
||||
Exclude:
|
||||
- !ruby/regexp /features\/.*.rb$/
|
||||
|
@ -32,6 +34,8 @@ Metrics/CyclomaticComplexity:
|
|||
Metrics/LineLength:
|
||||
Exclude:
|
||||
- !ruby/regexp /features\/.*.rb/
|
||||
- Rakefile
|
||||
- rake/*.rake
|
||||
Max: 90
|
||||
Severity: warning
|
||||
Metrics/MethodLength:
|
||||
|
@ -44,6 +48,14 @@ Metrics/ParameterLists:
|
|||
Max: 4
|
||||
Metrics/PerceivedComplexity:
|
||||
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:
|
||||
Enabled: false
|
||||
Style/AlignArray:
|
||||
|
@ -127,5 +139,7 @@ Style/StringLiterals:
|
|||
EnforcedStyle: double_quotes
|
||||
Style/StringLiteralsInInterpolation:
|
||||
EnforcedStyle: double_quotes
|
||||
Style/TrailingCommaInLiteral:
|
||||
EnforcedStyleForMultiline: consistent_comma
|
||||
Style/UnneededCapitalW:
|
||||
Enabled: false
|
||||
|
|
|
@ -5,10 +5,10 @@ language: ruby
|
|||
sudo: false
|
||||
|
||||
rvm:
|
||||
- &ruby1 2.3.1
|
||||
- &ruby2 2.2.5
|
||||
- &ruby1 2.3.3
|
||||
- &ruby2 2.2.6
|
||||
- &ruby3 2.1.9
|
||||
- &jruby jruby-9.1.2.0
|
||||
- &jruby jruby-9.1.7.0
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
|
6
Gemfile
6
Gemfile
|
@ -25,7 +25,7 @@ group :test do
|
|||
gem "nokogiri"
|
||||
gem "rspec"
|
||||
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 "jruby-openssl" if RUBY_ENGINE == "jruby"
|
||||
|
@ -88,12 +88,12 @@ end
|
|||
|
||||
group :site do
|
||||
if ENV["PROOF"]
|
||||
gem "html-proofer", "~> 2.0"
|
||||
gem "html-proofer", "~> 3.4"
|
||||
end
|
||||
|
||||
gem "jekyll-avatar"
|
||||
gem "jekyll-mentions"
|
||||
gem "jekyll-seo-tag"
|
||||
gem "jekyll-sitemap"
|
||||
gem "jemoji", "0.5.1"
|
||||
gem "jemoji"
|
||||
end
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
## HEAD
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Add connector param to `array_to_sentence_string` filter (#5597)
|
||||
* Adds `group_by_exp` filter (#5513)
|
||||
* Use the current year for the LICENSE of theme (#5712)
|
||||
* Update License (#5713)
|
||||
* 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)
|
||||
|
||||
### 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)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Remove instructions to install Jekyll 2 on Windows (#5582)
|
||||
|
@ -16,21 +36,12 @@
|
|||
* Add Jekyll-Post to list of plugins (#5705)
|
||||
* Add jekyll-numbered-headings (#5688)
|
||||
* Docs: move permalinks from documents into config (#5544)
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Add connector param to array_to_sentence_string filter (#5597)
|
||||
* Adds group_by_exp filter (#5513)
|
||||
* Use the current year for the LICENSE of theme (#5712)
|
||||
* Update License (#5713)
|
||||
* Use Addressable instead of URI to decode (#5726)
|
||||
|
||||
### 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)
|
||||
* Sort gems in `docs/_config.yml` (#5746)
|
||||
* [site] Use defaults for docs and news-items (#5744)
|
||||
* Improve collections docs (#5691)
|
||||
* Fix #5730: add gcc and make to the list of requirements (#5731)
|
||||
* Add missing class (#5791)
|
||||
* Improve template docs (#5694)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
|
@ -41,6 +52,16 @@
|
|||
* Bump to rake 12.0 (#5670)
|
||||
* 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)
|
||||
|
||||
### Documentation
|
||||
|
||||
|
@ -56,6 +77,16 @@
|
|||
* 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)
|
||||
|
||||
## 3.3.1 / 2016-11-14
|
||||
|
||||
|
|
69
Rakefile
69
Rakefile
|
@ -1,13 +1,13 @@
|
|||
require 'rubygems'
|
||||
require 'rake'
|
||||
require 'rdoc'
|
||||
require 'date'
|
||||
require 'yaml'
|
||||
require "rubygems"
|
||||
require "rake"
|
||||
require "rdoc"
|
||||
require "date"
|
||||
require "yaml"
|
||||
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
|
||||
require 'jekyll/version'
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
|
||||
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
|
||||
|
||||
def gem_file
|
||||
"#{name}-#{Gem::Version.new(version).to_s}.gem"
|
||||
"#{name}-#{Gem::Version.new(version)}.gem"
|
||||
end
|
||||
|
||||
def normalize_bullets(markdown)
|
||||
markdown.gsub(/\n\s{2}\*{1}/, "\n-")
|
||||
markdown.gsub(%r!\n\s{2}\*{1}!, "\n-")
|
||||
end
|
||||
|
||||
def linkify_prs(markdown)
|
||||
markdown.gsub(/#(\d+)/) do |word|
|
||||
markdown.gsub(%r!#(\d+)!) do |word|
|
||||
"[#{word}]({{ site.repository }}/issues/#{word.delete("#")})"
|
||||
end
|
||||
end
|
||||
|
||||
def linkify_users(markdown)
|
||||
markdown.gsub(/(@\w+)/) do |username|
|
||||
markdown.gsub(%r!(@\w+)!) do |username|
|
||||
"[#{username}](https://github.com/#{username.delete("@")})"
|
||||
end
|
||||
end
|
||||
|
@ -60,13 +60,13 @@ def linkify(markdown)
|
|||
end
|
||||
|
||||
def liquid_escape(markdown)
|
||||
markdown.gsub(/(`{[{%].+[}%]}`)/, "{% raw %}\\1{% endraw %}")
|
||||
markdown.gsub(%r!(`{[{%].+[}%]}`)!, "{% raw %}\\1{% endraw %}")
|
||||
end
|
||||
|
||||
def custom_release_header_anchors(markdown)
|
||||
header_regexp = /^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}/
|
||||
section_regexp = /^### \w+ \w+$/
|
||||
markdown.split(/^##\s/).map do |release_notes|
|
||||
header_regexp = %r!^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}!
|
||||
section_regexp = %r!^### \w+ \w+$!
|
||||
markdown.split(%r!^##\s!).map do |release_notes|
|
||||
_, major, minor, patch = *release_notes.match(header_regexp)
|
||||
release_notes
|
||||
.gsub(header_regexp, "\\0\n{: #v\\1-\\2-\\3}")
|
||||
|
@ -75,11 +75,11 @@ def custom_release_header_anchors(markdown)
|
|||
end
|
||||
|
||||
def sluffigy(header)
|
||||
header.gsub(/#/, '').strip.downcase.gsub(/\s+/, '-')
|
||||
header.delete("#").strip.downcase.gsub(%r!\s+!, "-")
|
||||
end
|
||||
|
||||
def remove_head_from_history(markdown)
|
||||
index = markdown =~ /^##\s+\d+\.\d+\.\d+/
|
||||
index = markdown =~ %r!^##\s+\d+\.\d+\.\d+!
|
||||
markdown[index..-1]
|
||||
end
|
||||
|
||||
|
@ -88,20 +88,23 @@ def converted_history(markdown)
|
|||
custom_release_header_anchors(
|
||||
liquid_escape(
|
||||
linkify(
|
||||
normalize_bullets(markdown)))))
|
||||
normalize_bullets(markdown)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
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
|
||||
File.read(file).match(/\A# (.*)$/)[1]
|
||||
File.read(file).match(%r!\A# (.*)$!)[1]
|
||||
rescue
|
||||
File.basename(file, ".*").downcase.capitalize
|
||||
end
|
||||
slug = File.basename(file, ".markdown").downcase
|
||||
front_matter = {
|
||||
"title" => title,
|
||||
"layout" => "docs",
|
||||
"permalink" => "/docs/#{slug}/",
|
||||
"note" => "This file is autogenerated. Edit /#{file} instead."
|
||||
}.merge(overrides_front_matter)
|
||||
|
@ -115,7 +118,7 @@ def content_for(file)
|
|||
when "History.markdown"
|
||||
converted_history(contents)
|
||||
else
|
||||
contents.gsub(/\A# .*\n\n?/, "")
|
||||
contents.gsub(%r!\A# .*\n\n?!, "")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -128,23 +131,23 @@ end
|
|||
multitask :default => [:test, :features]
|
||||
|
||||
task :spec => :test
|
||||
require 'rake/testtask'
|
||||
require "rake/testtask"
|
||||
Rake::TestTask.new(:test) do |test|
|
||||
test.libs << 'lib' << 'test'
|
||||
test.pattern = 'test/**/test_*.rb'
|
||||
test.libs << "lib" << "test"
|
||||
test.pattern = "test/**/test_*.rb"
|
||||
test.verbose = true
|
||||
end
|
||||
|
||||
require 'rdoc/task'
|
||||
require "rdoc/task"
|
||||
Rake::RDocTask.new do |rdoc|
|
||||
rdoc.rdoc_dir = 'rdoc'
|
||||
rdoc.rdoc_dir = "rdoc"
|
||||
rdoc.title = "#{name} #{version}"
|
||||
rdoc.rdoc_files.include('README*')
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
rdoc.rdoc_files.include("README*")
|
||||
rdoc.rdoc_files.include("lib/**/*.rb")
|
||||
end
|
||||
|
||||
begin
|
||||
require 'cucumber/rake/task'
|
||||
require "cucumber/rake/task"
|
||||
Cucumber::Rake::Task.new(:features) do |t|
|
||||
t.profile = "travis"
|
||||
end
|
||||
|
@ -152,9 +155,9 @@ begin
|
|||
t.profile = "html_report"
|
||||
end
|
||||
rescue LoadError
|
||||
desc 'Cucumber rake task not available'
|
||||
desc "Cucumber rake task not available"
|
||||
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
|
||||
|
||||
|
|
|
@ -10,6 +10,21 @@ help_url: https://github.com/jekyll/jekyll-help
|
|||
|
||||
timezone: America/Los_Angeles
|
||||
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
path: "_docs"
|
||||
type: "docs"
|
||||
values:
|
||||
layout: "docs"
|
||||
-
|
||||
scope:
|
||||
path: "_posts"
|
||||
type: "posts"
|
||||
values:
|
||||
layout: "news_item"
|
||||
|
||||
|
||||
collections:
|
||||
docs:
|
||||
permalink: /:collection/:path/
|
||||
|
@ -28,14 +43,14 @@ twitter:
|
|||
logo: /img/logo-2x.png
|
||||
|
||||
gems:
|
||||
- jekyll-feed
|
||||
- jekyll-redirect-from
|
||||
- jemoji
|
||||
- jekyll-sitemap
|
||||
- jekyll-seo-tag
|
||||
- jekyll-avatar
|
||||
- jekyll-feed
|
||||
- jekyll-mentions
|
||||
- jekyll-redirect-from
|
||||
- jekyll-seo-tag
|
||||
- jekyll-sitemap
|
||||
- jemoji
|
||||
|
||||
exclude:
|
||||
- README.md
|
||||
- .gitignore
|
||||
- README.md
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Assets
|
||||
permalink: /docs/assets/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Collections
|
||||
permalink: /docs/collections/
|
||||
---
|
||||
|
@ -12,7 +11,13 @@ namespace.
|
|||
|
||||
## 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`
|
||||
with the name of your collection:
|
||||
|
@ -41,12 +46,12 @@ defaults:
|
|||
layout: page
|
||||
```
|
||||
|
||||
### Step 2: Add your content
|
||||
### Step 2: Add your content {#step2}
|
||||
|
||||
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
|
||||
after it is stuck in the Document's `content` attribute. If no YAML Front
|
||||
Matter is provided, Jekyll will not generate the file in your collection.
|
||||
documents. YAML front matter is processed if the front matter exists, and everything
|
||||
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.
|
||||
|
||||
<div class="note info">
|
||||
<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>
|
||||
</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
|
||||
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
|
||||
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">
|
||||
<h5>Don't forget to add YAML for processing</h5>
|
||||
<p>
|
||||
|
@ -95,6 +87,21 @@ written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
|
|||
</p>
|
||||
</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">
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -149,15 +156,92 @@ written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
|
|||
</table>
|
||||
</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
|
||||
|
||||
### 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
|
||||
`site.albums`. 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 below for how to access attributes of those documents.
|
||||
`site.albums`.
|
||||
|
||||
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
|
||||
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
|
||||
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`
|
||||
extension):
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: Code of Conduct
|
||||
layout: docs
|
||||
permalink: "/docs/conduct/"
|
||||
note: This file is autogenerated. Edit /CONDUCT.markdown instead.
|
||||
redirect_from: "/conduct/index.html"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Configuration
|
||||
permalink: /docs/configuration/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Continuous Integration
|
||||
permalink: /docs/continuous-integration/
|
||||
---
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: Contributing
|
||||
layout: docs
|
||||
permalink: "/docs/contributing/"
|
||||
note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead.
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Data Files
|
||||
permalink: /docs/datafiles/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Deployment methods
|
||||
permalink: /docs/deployment-methods/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Working with drafts
|
||||
permalink: /docs/drafts/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Extras
|
||||
permalink: /docs/extras/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Front Matter
|
||||
permalink: /docs/frontmatter/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: GitHub Pages
|
||||
permalink: /docs/github-pages/
|
||||
---
|
||||
|
@ -130,12 +129,6 @@ 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
|
||||
`username.github.io/project` (unless a custom domain is specified).
|
||||
|
||||
The Jekyll project repository itself is a perfect example: the
|
||||
[master branch]({{ site.repository }}) contains the actual software project
|
||||
for Jekyll, however the Jekyll website (that you’re looking at right now) is
|
||||
contained in the [docs folder]({{ site.repository }}/tree/master/docs) of the
|
||||
same repository.
|
||||
|
||||
The Jekyll project repository itself is a perfect example of this branch
|
||||
structure—the [master branch]({{ site.repository }}) contains the
|
||||
actual software project for Jekyll, and the Jekyll website that you’re
|
||||
|
@ -143,7 +136,7 @@ looking at right now is contained in the [docs
|
|||
folder]({{ site.repository }}/tree/master/docs) of the same repository.
|
||||
|
||||
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.
|
||||
|
||||
<div class="note warning">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: History
|
||||
layout: docs
|
||||
permalink: "/docs/history/"
|
||||
note: This file is autogenerated. Edit /History.markdown instead.
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Includes
|
||||
permalink: /docs/includes/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Welcome
|
||||
permalink: /docs/home/
|
||||
redirect_from: /docs/index.html
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Installation
|
||||
permalink: /docs/installation/
|
||||
---
|
||||
|
@ -21,6 +20,7 @@ requirements you’ll need to make sure your system has before you start.
|
|||
- [NodeJS](https://nodejs.org/), or another JavaScript runtime (Jekyll 2 and
|
||||
earlier, for CoffeeScript support).
|
||||
- [Python 2.7](https://www.python.org/downloads/) (for Jekyll 2 and earlier)
|
||||
- [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)
|
||||
|
||||
<div class="note info">
|
||||
<h5>Running Jekyll on Windows</h5>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: Affinity Team Captains
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Avoiding Burnout"
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Becoming a Maintainer"
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Maintaining Jekyll
|
||||
permalink: /docs/maintaining/
|
||||
---
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Merging a Pull Request"
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
@ -38,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)
|
||||
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)
|
||||
4. Site Enhancements (`+site`) – changes to the source of https://jekyllrb.com, found in `site/`
|
||||
5. Development Fixes (`+dev`) – changes which do not affect user-facing functionality or documentation, such as test fixes or bumping internal dependencies
|
||||
4. Documentation (`+doc`) - changes to the documentation found in `docs/_docs/`
|
||||
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:
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Reviewing a Pull Request"
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Special Labels"
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Triaging an Issue"
|
||||
layout: docs
|
||||
---
|
||||
|
||||
**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 it’s definitely not for everyone.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Blog migrations
|
||||
permalink: /docs/migrations/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Creating pages
|
||||
permalink: /docs/pages/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Pagination
|
||||
permalink: /docs/pagination/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Permalinks
|
||||
permalink: /docs/permalinks/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Plugins
|
||||
permalink: /docs/plugins/
|
||||
---
|
||||
|
@ -919,6 +918,7 @@ LESS.js files during generation.
|
|||
- [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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Writing posts
|
||||
permalink: /docs/posts/
|
||||
---
|
||||
|
@ -111,6 +110,24 @@ Linking to a PDF for readers to download:
|
|||
</p>
|
||||
</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
|
||||
---
|
||||
You’ll 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
|
||||
|
||||
It’s all well and good to have posts in a folder, but a blog is no use unless
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Quick-start guide
|
||||
permalink: /docs/quickstart/
|
||||
---
|
||||
|
||||
If you already have [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](../installation/#requirements)), you can create a new Jekyll site by doing the following:
|
||||
|
||||
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
|
||||
# Install Jekyll and Bundler gems through RubyGems
|
||||
|
@ -22,6 +22,8 @@ If you already have [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGem
|
|||
# Now browse to http://localhost:4000
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
## About Bundler
|
||||
|
||||
`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 — not every time you create a new Jekyll project. Here are some additional details:
|
||||
|
@ -40,6 +42,9 @@ If you already have [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGem
|
|||
* 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.
|
||||
* 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.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Resources
|
||||
permalink: /docs/resources/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Sites using Jekyll
|
||||
permalink: /docs/sites/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Static Files
|
||||
permalink: /docs/static-files/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Directory structure
|
||||
permalink: /docs/structure/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Templates
|
||||
permalink: /docs/templates/
|
||||
---
|
||||
|
@ -421,56 +420,15 @@ The default is `default`. They are as follows (with what they filter):
|
|||
|
||||
### Includes
|
||||
|
||||
If you have small page fragments that you wish to include in multiple places on
|
||||
your site, you can use the `include` tag.
|
||||
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:
|
||||
|
||||
```liquid
|
||||
{% raw %}{% include footer.html %}{% endraw %}
|
||||
```
|
||||
|
||||
Jekyll expects all include files to be placed in an `_includes` directory at the
|
||||
root of your source directory. This will embed the contents of
|
||||
`<source>/_includes/footer.html` into the calling file.
|
||||
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.
|
||||
|
||||
<div class="note">
|
||||
<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.
|
||||
For more advanced information on using includes, see [Includes](../includes).
|
||||
|
||||
### 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
|
||||
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
|
||||
|
||||
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
|
||||
[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 — 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 %}
|
||||
```
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Themes
|
||||
permalink: /docs/themes/
|
||||
---
|
||||
|
@ -67,7 +66,7 @@ Add your template files in the corresponding folders, complete the `.gemspec` an
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Troubleshooting
|
||||
permalink: /docs/troubleshooting/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Upgrading from 0.x to 2.x
|
||||
permalink: /docs/upgrading/0-to-2/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Upgrading from 2.x to 3.x
|
||||
permalink: /docs/upgrading/2-to-3/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Basic Usage
|
||||
permalink: /docs/usage/
|
||||
---
|
||||
|
@ -97,5 +96,12 @@ $ jekyll build --source _source --destination _deploy
|
|||
For more about the possible configuration options, see the
|
||||
[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
|
||||
`jekyll-docs` gem and run `jekyll docs` in your terminal.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Variables
|
||||
permalink: /docs/variables/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Jekyll on Windows
|
||||
permalink: /docs/windows/
|
||||
---
|
||||
|
@ -16,7 +15,7 @@ A quick way to install Jekyll is to follow the [installation instructions by Dav
|
|||
2. Install Ruby via Chocolatey: `choco install ruby -y`
|
||||
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]
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.0 Released"
|
||||
date: "2013-05-06 02:12:52 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.1 Released"
|
||||
date: "2013-05-08 23:46:11 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.2 Released"
|
||||
date: "2013-05-12 14:45:00 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.3 Released"
|
||||
date: "2013-06-07 21:02:13 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.1.0 Released"
|
||||
date: "2013-07-14 19:38:02 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.1.1 Released"
|
||||
date: "2013-07-24 22:24:14 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.4 Released"
|
||||
date: "2013-07-25 09:08:38 +0200"
|
||||
author: mattr-
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.1.2 Released"
|
||||
date: "2013-07-25 09:08:38 +0200"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.2.0 Released"
|
||||
date: "2013-09-06 22:02:41 -0400"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.2.1 Released'
|
||||
date: 2013-09-14 20:46:50 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.3.0.rc1 Released'
|
||||
date: 2013-10-28 20:14:39 -0500
|
||||
author: mattr-
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.3.0 Released'
|
||||
date: 2013-11-04 21:46:02 -0600
|
||||
author: mattr-
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.3.1 Released'
|
||||
date: 2013-11-26 19:52:20 -0600
|
||||
author: mattr-
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.4.0 Released'
|
||||
date: 2013-12-07 13:55:28 -0600
|
||||
author: mattr-
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.4.1 Released'
|
||||
date: 2013-12-09 20:44:13 -0600
|
||||
author: mattr-
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.4.2 Released'
|
||||
date: 2013-12-16 19:48:13 -0500
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.4.3 Released'
|
||||
date: 2014-01-13 17:43:32 -0800
|
||||
author: benbalter
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.5.0 Released'
|
||||
date: 2014-03-24 20:37:59 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 1.5.1 Released'
|
||||
date: 2014-03-27 22:43:48 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll turns 2.0.0'
|
||||
author: parkr
|
||||
version: 2.0.0
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 2.0.3 Released'
|
||||
date: 2014-05-08 22:43:17 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Pick Up your $1 Jekyll Sticker'
|
||||
date: 2014-06-04 15:46:53 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll Turns 21! Err... I mean 2.1.0.'
|
||||
date: 2014-06-28 17:26:59 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 2.1.1 Released'
|
||||
date: 2014-07-01 20:16:43 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 2.2.0 Released'
|
||||
date: 2014-07-29 18:59:13 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 2.3.0 Released'
|
||||
date: 2014-08-10 20:38:34 -0400
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'A Wild Jekyll 2.4.0 Appeared!'
|
||||
date: 2014-09-09 21:10:33 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll's Mid-Life Crisis (Or, Jekyll turns 2.5.0)"
|
||||
date: 2014-11-05 10:48:22 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 2.5.1 Released'
|
||||
date: 2014-11-09 09:47:52 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 2.5.2 Released'
|
||||
date: 2014-11-12 18:49:08 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Alfred Xing has joined the Jekyll core team'
|
||||
date: 2014-12-17 11:16:21 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll Release for the Holidays! v2.5.3 Out'
|
||||
date: 2014-12-22 09:03:30 -0500
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll Meet & Greet at GitHub HQ"
|
||||
date: "2015-01-20 19:23:12 -0800"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0.0.beta1 Released'
|
||||
date: 2015-01-24 00:42:31 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Join the Discussion at Jekyll Talk'
|
||||
date: 2015-02-26 21:06:51 -0800
|
||||
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).
|
||||
|
||||
Come join the fun!
|
||||
Come join the fun!
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0 Released'
|
||||
date: 2015-10-26 15:37:30 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0.1 Released'
|
||||
date: 2015-11-17 22:04:39 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0.2 Released'
|
||||
date: 2016-01-20 14:08:18 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.0 Released'
|
||||
date: 2016-01-24 13:16:12 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.1 Released'
|
||||
date: 2016-01-28 17:21:50 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0.3 Released'
|
||||
date: 2016-02-08 10:39:08 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.2 Released!'
|
||||
date: 2016-02-19 15:24:00 -0800
|
||||
author: parkr
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
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.
|
||||
layout: news_item
|
||||
author: benbalter
|
||||
categories: [community]
|
||||
---
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0.4 Released'
|
||||
date: 2016-04-19 10:26:12 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.3 Released'
|
||||
date: 2016-04-19 10:26:16 -0700
|
||||
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).
|
||||
|
||||
Happy Jekylling!
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.0.5 Released'
|
||||
date: 2016-04-26 17:40:44 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.4 "Stability Sam" Released'
|
||||
date: 2016-05-18 16:50:37 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.5 Released'
|
||||
date: 2016-05-18 21:35:27 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.6 Released'
|
||||
date: 2016-05-19 12:48:14 -0700
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll's Google Summer of Code Project: The CMS You Always Wanted"
|
||||
date: "2016-06-03 13:21:02 -0700"
|
||||
author: parkr
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll turns 3.2'
|
||||
date: 2016-07-26 15:06:49 -0700
|
||||
author: parkr
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue