Compare commits

..

4 Commits

Author SHA1 Message Date
Pat Hawks
b0c591a3f2 Add Inline Markdown converter 2016-10-27 20:30:32 -05:00
David Stosik
167af4552b Avoid modifying existing test's behavior in my PR 2016-10-24 01:03:53 +09:00
David Stosik
3cc4bef2e6 Fix Rubocop errors 2016-10-24 00:39:09 +09:00
David Stosik
4785f6f71f Provide an "inline" mode to markdownify filter 2016-10-24 00:01:09 +09:00
490 changed files with 6009 additions and 17862 deletions

View File

@@ -3,7 +3,6 @@ engines:
enabled: false
rubocop:
enabled: true
channel: rubocop-0-54
exclude_paths:
- .codeclimate.yml
@@ -24,13 +23,11 @@ exclude_paths:
- features/**/*
- script/**/*
- docs/**/*
- site/**/*
- spec/**/*
- test/**/*
- vendor/**/*
- lib/jekyll/commands/serve/livereload_assets/livereload.js
ratings:
paths:
- lib/**/*.rb

86
.github/CODEOWNERS vendored
View File

@@ -1,86 +0,0 @@
# The Jekyll project has 6 affinity teams, shown here: https://teams.jekyllrb.com/
# They are as follows:
#
# 1. @jekyll/build
# 2. @jekyll/documentation
# 3. @jekyll/ecosystem
# 4. @jekyll/performance
# 5. @jekyll/stability
# 6. @jekyll/windows
#
# Each of these teams has a mission. Wherever possible, GitHub should
# automatically require review from these teams on the pieces of the
# repository they maintain.
# @jekyll/documentation
/docs/ @jekyll/documentation
# @jekyll/build
/exe/ @jekyll/build
/lib/jekyll.rb @jekyll/build
/lib/jekyll/cleaner.rb @jekyll/build
/lib/jekyll/collection.rb @jekyll/build
/lib/jekyll/command.rb @jekyll/build
/lib/jekyll/commands/ @jekyll/build
/lib/jekyll/converter.rb @jekyll/build
/lib/jekyll/converters/ @jekyll/build
/lib/jekyll/convertible.rb @jekyll/build
/lib/jekyll/document.rb @jekyll/build
/lib/jekyll/drops/ @jekyll/build
/lib/jekyll/entry_filter.rb @jekyll/build
/lib/jekyll/errors.rb @jekyll/build
/lib/jekyll/excerpt.rb @jekyll/build
/lib/jekyll/filters/ @jekyll/build
/lib/jekyll/filters.rb @jekyll/build
/lib/jekyll/layout.rb @jekyll/build
/lib/jekyll/liquid_extensions.rb @jekyll/build
/lib/jekyll/liquid_renderer/ @jekyll/build
/lib/jekyll/liquid_renderer.rb @jekyll/build
/lib/jekyll/log_adapter.rb @jekyll/build
/lib/jekyll/mime.types @jekyll/build
/lib/jekyll/page.rb @jekyll/build
/lib/jekyll/publisher.rb @jekyll/build
/lib/jekyll/reader.rb @jekyll/build
/lib/jekyll/readers/ @jekyll/build
/lib/jekyll/regenerator.rb @jekyll/build
/lib/jekyll/related_posts.rb @jekyll/build
/lib/jekyll/renderer.rb @jekyll/build
/lib/jekyll/site.rb @jekyll/build
/lib/jekyll/static_file.rb @jekyll/build
/lib/jekyll/stevenson.rb @jekyll/build
/lib/jekyll/tags/ @jekyll/build
/lib/jekyll/url.rb @jekyll/build
/lib/jekyll/utils/ @jekyll/build
/lib/jekyll/utils.rb @jekyll/build
# @jekyll/ecosystem
/lib/jekyll/external.rb @jekyll/ecosystem
/lib/jekyll/generator.rb @jekyll/ecosystem
/lib/jekyll/hooks.rb @jekyll/ecosystem
/lib/jekyll/plugin.rb @jekyll/ecosystem
/lib/jekyll/plugin_manager.rb @jekyll/ecosystem
/lib/jekyll/theme.rb @jekyll/ecosystem
/lib/jekyll/theme_builder.rb @jekyll/ecosystem
# @jekyll/stability
Gemfile @jekyll/stability
*.gemspec @jekyll/stability
.travis.yml @jekyll/stability
appveyor.yml @jekyll/stability
/lib/jekyll/configuration.rb @jekyll/stability
/lib/jekyll/deprecator.rb @jekyll/stability
/lib/jekyll/frontmatter_defaults.rb @jekyll/stability
/lib/site_template @jekyll/stability
/lib/theme_template @jekyll/stability
/features/ @jekyll/stability
/test/ @jekyll/stability
# Special cases
.github/ @jekyll/affinity-team-captains
CODE_OF_CONDUCT.markdown @jekyll/affinity-team-captains
History.markdown @jekyll/affinity-team-captains
LICENSE @jekyll/affinity-team-captains # This file should never change.
README.markdown @jekyll/affinity-team-captains
/lib/jekyll/version.rb @jekyll/affinity-team-captains
/rake/ @jekyll/affinity-team-captains
/script/ @jekyll/affinity-team-captains

View File

@@ -4,7 +4,10 @@ Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is a
## Where to get help or report a problem
See [the support guidelines](https://jekyllrb.com/docs/support/)
* If you have a question about using Jekyll, start a discussion on [Jekyll Talk](https://talk.jekyllrb.com).
* If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository.
* If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new).
* More resources are listed on our [Help page](https://jekyllrb.com/help/).
## Ways to contribute
@@ -25,7 +28,7 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
* Pull requests are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* Pull request are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.
@@ -59,33 +62,13 @@ We want the Jekyll documentation to be the best it can be. We've open-sourced ou
### How to submit changes
You can find the documentation for jekyllrb.com in the [docs](https://github.com/jekyll/jekyll/tree/master/docs) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
You can find the documentation for jekyllrb.com in the [site](https://github.com/jekyll/jekyll/tree/master/site) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
One gotcha, all pull requests should be directed at the `master` branch (the default branch).
### Updating FontAwesome iconset for jekyllrb.com
We use a custom version of FontAwesome which contains just the icons we use.
If you ever need to update our documentation with an icon that is not already available in our custom iconset, you'll have to regenerate the iconset using Icomoon's Generator:
1. Go to <https://icomoon.io/app/>.
2. Click `Import Icons` on the top-horizontal-bar and upload the existing `<jekyll>/docs/icomoon-selection.json`.
3. Click `Add Icons from Library..` further down on the page, and add 'Font Awesome'.
4. Select the required icon(s) from the Library (make sure its the 'FontAwesome' library instead of 'IcoMoon-Free' library).
5. Click `Generate Font` on the bottom-horizontal-bar.
6. Inspect the included icons and proceed by clicking `Download`.
7. Extract the font files and adapt the CSS to the paths we use in Jekyll:
- Copy the entire `fonts` directory over and overwrite existing ones at `<jekyll>/docs/`.
- Copy the contents of `selection.json` and overwrite existing content inside `<jekyll>/docs/icomoon-selection.json`.
- Copy the entire `@font-face {}` declaration and only the **new-icon(s)' css declarations** further below, to update the
`<jekyll>/docs/_sass/_font-awesome.scss` sass partial.
- Fix paths in the `@font-face {}` declaration by adding `../` before `fonts/FontAwesome.*` like so:
`('../fonts/Fontawesome.woff?9h6hxj')`.
### Adding plugins
If you want to add your plugin to the [list of plugins](https://jekyllrb.com/docs/plugins/#available-plugins), please submit a pull request modifying the [plugins page source file](https://github.com/jekyll/jekyll/blob/master/docs/_docs/plugins.md) by adding a link to your plugin under the proper subheading depending upon its type.
If you want to add your plugin to the [list of plugins](https://jekyllrb.com/docs/plugins/#available-plugins), please submit a pull request modifying the [plugins page source file](https://github.com/jekyll/jekyll/blob/master/site/_docs/plugins.md) by adding a link to your plugin under the proper subheading depending upon its type.
## Code Contributions
@@ -97,7 +80,7 @@ Any time you propose a code change, you should also include updates to the docum
#### Documentation
If your contribution changes any Jekyll behavior, make sure to update the documentation. Documentation lives in the `docs/_docs` folder (spoiler alert: it's a Jekyll site!). If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, `jekyllrb.com` will be updated.
If your contribution changes any Jekyll behavior, make sure to update the documentation. Documentation lives in the `site/_docs` folder (spoiler alert: it's a Jekyll site!). If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, `jekyllrb.com` will be updated.
#### Tests
@@ -111,37 +94,25 @@ If your contribution changes any Jekyll behavior, make sure to update the docume
* Don't bump the Gem version in your pull request (if you don't know what that means, you probably didn't).
* You can use the command `script/console` to start a REPL to explore the result of
Jekyll's methods. It also provides you with helpful methods to quickly create a
site or configuration. [Feel free to check it out!](https://github.com/jekyll/jekyll/blob/master/script/console)
## Running tests locally
### Test Dependencies
To run the test suite and build the gem you'll need to install Jekyll's dependencies by running the following command:
```sh
script/bootstrap
```
<pre class="highlight"><code>$ script/bootstrap</code></pre>
Before you make any changes, run the tests and make sure that they pass (to confirm your environment is configured properly):
```sh
script/cibuild
```
<pre class="highlight"><code>$ script/cibuild</code></pre>
If you are only updating a file in `test/`, you can use the command:
```sh
script/test test/blah_test.rb
```
<pre class="highlight"><code>$ script/test test/blah_test.rb</code></pre>
If you are only updating a `.feature` file, you can use the command:
```sh
script/cucumber features/blah.feature
```
<pre class="highlight"><code>$ script/cucumber features/blah.feature</code></pre>
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.

View File

@@ -10,12 +10,14 @@
a generic usage question, please consider asking your question at
https://talk.jekyllrb.com where non-bug questions go.
Please make sure to mention an affinity team whose responsibilities
most closely align with your issue.
Thanks!
-->
- [ ] I believe this to be a bug, not a question about using Jekyll.
- [ ] I updated to the latest Jekyll (or) if on GitHub Pages to the latest `github-pages`
- [ ] I ran `jekyll doctor` to check my configuration
- [ ] I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
- [ ] This is a feature request.
@@ -48,7 +50,7 @@
## My Reproduction Steps
<!--
If this error occurred on GitHub Pages, please try to provide us with logs,
If this error occured on GitHub Pages, please try to provide us with logs,
and look at them yourself, to determine if this is an actual Jekyll bug. In
the event you are unsure, file a ticket, however, when you do please provide
the logs (strip them of personal information.)
@@ -76,3 +78,5 @@
The minimum should be personal information. Though we normally don't log
anything like that so there should be no need to alter it.
-->
/cc include any Jekyll affinity teams here (see https://teams.jekyllrb.com/ for more info)

View File

@@ -1,20 +0,0 @@
# Jekyll Support
## Getting Help
**Jekyll's issue tracker is not a support forum.**
If you're looking for support for Jekyll, there are a lot of options:
* Read [Jekyll Documentation](https://jekyllrb.com/docs/home/)
* If you have a question about using Jekyll, start a discussion on [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll)
* Chat with Jekyllers &mdash; Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc:irc.freenode.net/jekyll)
There are a bunch of helpful community members on these services that should be willing to point you in the right direction.
## Report a bug
* If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository &mdash; First [look for the plugin on rubygems](https://rubygems.org/) then click on the `Homepage` link to access the plugin repository.
* If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new).
Happy Jekyllin'!

View File

@@ -1,44 +0,0 @@
### 🆕🐥☝ First Timers Only.
This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝
[About First Timers Only](http://www.firsttimersonly.com/).
### 🤔 What you will need to know.
Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.
### 📋 Step by Step
- [ ] 👌 **Join the team**: Add yourself to a Jekyll affinity team.
Go to [teams.jekyllrb.com](https://teams.jekyllrb.com/) and join a team that best fits your interests. Once you click the link to join a team, you will soon receive an email inviting you to join the Jekyll organization.
- [ ] 🙋 **Claim this issue**: Comment below.
Leave a comment that you have claimed this issue.
- [ ] 📝 **Update** the file [$FILENAME]($BRANCH_URL) in the `$REPO` repository (press the little pen Icon) and edit the line as shown below.
```diff
$DIFF
```
- [ ] 💾 **Commit** your changes
- [ ] 🔀 **Start a Pull Request**. There are two ways how you can start a pull request:
1. If you are familiar with the terminal or would like to learn it, [here is a great tutorial](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) on how to send a pull request using the terminal.
2. You can [edit files directly in your browser](https://help.github.com/articles/editing-files-in-your-repository/)
- [ ] 🏁 **Done** Ask in comments for a review :)
### 🤔❓ Questions
Leave a comment below!
This issue was created by [First-Timers-Bot](https://github.com/hoodiehq/first-timers-bot).

View File

@@ -1,6 +0,0 @@
repository: jekyll
labels:
- good first issue
- help-wanted
- first-time-only
template: .github/first-timers-issue-template.md

View File

@@ -1,135 +1,103 @@
---
require:
- ./rubocop/jekyll
Jekyll/NoPutsAllowed:
Exclude:
- rake/*.rake
AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.0
Include:
- lib/**/*.rb
- test/**/*.rb
Exclude:
- lib/jekyll/renderer.rb
- bin/**/*
- exe/**/*
- benchmark/**/*
- script/**/*
- vendor/**/*
- tmp/**/*
Layout/AlignHash:
EnforcedHashRocketStyle: table
Layout/IndentationWidth:
Severity: error
Layout/IndentArray:
EnforcedStyle: consistent
Layout/IndentHash:
EnforcedStyle: consistent
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Lint/NestedPercentLiteral:
Exclude:
- test/test_site.rb
Layout/EmptyComment:
Enabled: false
Layout/EndAlignment:
Lint/EndAlignment:
Severity: error
Lint/UnreachableCode:
Severity: error
Lint/Void:
Exclude:
- lib/jekyll/site.rb
Lint/UselessAccessModifier:
Enabled: false
Metrics/AbcSize:
Max: 21
Metrics/BlockLength:
Exclude:
- test/**/*.rb
- lib/jekyll/configuration.rb
- rake/*.rake
Metrics/ClassLength:
Exclude:
- !ruby/regexp /features\/.*.rb$/
- !ruby/regexp /test\/.*.rb$/
- lib/jekyll/document.rb
- lib/jekyll/site.rb
- lib/jekyll/commands/serve.rb
- lib/jekyll/configuration.rb
Max: 240
Max: 300
Metrics/CyclomaticComplexity:
Exclude:
- lib/jekyll/utils.rb
- lib/jekyll/commands/serve.rb
Max: 9
Metrics/LineLength:
Exclude:
- !ruby/regexp /features\/.*.rb/
- Rakefile
- rake/*.rake
- Gemfile
Max: 100
Max: 90
Severity: warning
Metrics/MethodLength:
CountComments: false
Max: 20
Severity: error
Metrics/ModuleLength:
Exclude:
- lib/jekyll/filters.rb
Max: 240
Metrics/ParameterLists:
Max: 4
Metrics/PerceivedComplexity:
Max: 8
Naming/FileName:
Enabled: false
Naming/HeredocDelimiterNaming:
Exclude:
- test/**/*.rb
Naming/MemoizedInstanceVariableName:
Exclude:
- lib/jekyll/page_without_a_file.rb
- lib/jekyll/drops/unified_payload_drop.rb
- lib/jekyll/drops/site_drop.rb
Naming/UncommunicativeMethodParamName:
AllowedNames:
- _
Security/MarshalLoad:
Exclude:
- !ruby/regexp /test\/.*.rb$/
- lib/jekyll/regenerator.rb
Security/YAMLLoad:
Exclude:
- !ruby/regexp /features\/.*.rb/
- !ruby/regexp /test\/.*.rb$/
Style/AccessModifierDeclarations:
Enabled: false
Style/Alias:
EnforcedStyle: prefer_alias_method
Enabled: false
Style/AlignArray:
Enabled: false
Style/AlignHash:
EnforcedHashRocketStyle: table
Style/AlignParameters:
Enabled: false
EnforcedStyle: with_fixed_indentation
Style/AndOr:
Severity: error
Style/Attr:
Enabled: false
Style/BracesAroundHashParameters:
Enabled: false
Style/ClassAndModuleChildren:
Exclude:
- test/**/*.rb
Style/FrozenStringLiteralComment:
EnforcedStyle: always
Enabled: false
Style/Documentation:
Enabled: false
Exclude:
- !ruby/regexp /features\/.*.rb$/
Style/DoubleNegation:
Enabled: false
Style/FormatStringToken:
Exclude:
- lib/jekyll/utils/ansi.rb
Style/EmptyLinesAroundAccessModifier:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/ExtraSpacing:
AllowForAlignment: true
Style/FileName:
Enabled: false
Style/FirstParameterIndentation:
EnforcedStyle: consistent
Style/GuardClause:
Enabled: false
Style/HashSyntax:
EnforcedStyle: hash_rockets
Severity: error
Style/MixinUsage:
Exclude:
- test/helper.rb
Style/IfUnlessModifier:
Enabled: false
Style/IndentArray:
EnforcedStyle: consistent
Style/IndentHash:
EnforcedStyle: consistent
Style/IndentationWidth:
Severity: error
Style/ModuleFunction:
Enabled: false
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/MultilineOperationIndentation:
EnforcedStyle: indented
Style/MultilineTernaryOperator:
Severity: error
Style/PercentLiteralDelimiters:
@@ -141,22 +109,25 @@ Style/PercentLiteralDelimiters:
"%w": "()"
"%W": "()"
"%x": "()"
Style/RedundantReturn:
Enabled: false
Style/RedundantSelf:
Enabled: false
Style/RegexpLiteral:
EnforcedStyle: percent_r
Style/RescueModifier:
Enabled: false
Style/SafeNavigation:
Exclude:
- lib/jekyll/document.rb
Style/SignalException:
EnforcedStyle: only_raise
Style/SingleLineMethods:
Enabled: false
Style/SpaceAroundOperators:
Enabled: false
Style/SpaceInsideBrackets:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/SymbolArray:
EnforcedStyle: brackets
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/UnneededCapitalW:
Enabled: false

View File

@@ -5,19 +5,17 @@ language: ruby
sudo: false
rvm:
- &ruby1 2.5.1
- &ruby2 2.4.4
- &ruby3 2.3.7
- &jruby jruby-9.1.16.0
- &ruby1 2.3.1
- &ruby2 2.2.5
- &ruby3 2.1.9
- &jruby jruby-9.1.2.0
matrix:
include:
- rvm: *ruby1
env: TEST_SUITE=fmt
name: "🤖️ Code Format"
- rvm: *ruby1
env: TEST_SUITE=default-site
name: "🏠️ Default Site"
exclude:
- rvm: *jruby
env: TEST_SUITE=cucumber
@@ -30,7 +28,6 @@ branches:
only:
- master
- themes
- /*-stable/
notifications:
slack:
@@ -48,10 +45,3 @@ addons:
DA4vsRURfABU0fIhwYkQuZqEcA3d8TL36BZcGEshG6MQ2AmnYsmFiTcxqV5bmlElHEqQuT\
5SUFXLafgZPBnL0qDwujQcHukID41sE=\
"
# regular test configuration
after_success:
- bundle exec codeclimate-test-reporter
before_install:
- gem update --system
- gem install bundler --version 1.16.2

View File

@@ -1,46 +0,0 @@
# Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting a project maintainer. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
[homepage]: https://www.contributor-covenant.org/
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

View File

@@ -1,10 +1,4 @@
---
title: Code of Conduct
permalink: "/docs/code_of_conduct/"
note: This file is autogenerated. Edit /CODE_OF_CONDUCT.markdown instead.
redirect_from: "/conduct/index.html"
editable: false
---
# Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who

70
Gemfile
View File

@@ -1,9 +1,10 @@
# frozen_string_literal: true
source "https://rubygems.org"
gemspec :name => "jekyll"
gem "rake", "~> 12.0"
gem "rake", "~> 11.0"
# Dependency of jekyll-mentions. RubyGems in Ruby 2.1 doesn't shield us from this.
gem "activesupport", "~> 4.2", :groups => [:test_legacy, :site] if RUBY_VERSION < '2.2.2'
group :development do
gem "launchy", "~> 2.3"
@@ -17,17 +18,15 @@ end
#
group :test do
gem "codeclimate-test-reporter", "~> 1.0.5"
gem "cucumber", "~> 3.0"
gem "httpclient"
gem "rubocop", "~> 0.44.1"
gem "cucumber", "~> 2.1"
gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious"
gem "nokogiri", "~> 1.7"
gem "rspec"
gem "codeclimate-test-reporter"
gem "rspec-mocks"
gem "rubocop", "~> 0.57.2"
gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__)
gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__)
gem "nokogiri"
gem "rspec"
gem "test-theme", path: File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__))
gem "jruby-openssl" if RUBY_ENGINE == "jruby"
end
@@ -35,64 +34,63 @@ end
#
group :test_legacy do
if RUBY_PLATFORM =~ %r!cygwin!
gem "test-unit"
if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
gem 'test-unit'
end
gem "minitest"
gem "minitest-profile"
gem "minitest-reporters"
gem "shoulda"
gem "redgreen"
gem "simplecov"
gem "minitest-reporters"
gem "minitest-profile"
gem "minitest"
gem "shoulda"
end
#
group :benchmark do
if ENV["BENCHMARK"]
gem "benchmark-ips"
gem "rbtrace"
gem "ruby-prof"
gem "benchmark-ips"
gem "stackprof"
gem "rbtrace"
end
end
#
group :jekyll_optional_dependencies do
gem "toml", "~> 0.1.0"
gem "coderay", "~> 1.1.0"
gem "jekyll-coffeescript"
gem "jekyll-docs", :path => "../docs" if Dir.exist?("../docs") && ENV["JEKYLL_VERSION"]
gem "jekyll-feed", "~> 0.9"
gem "jekyll-docs", :path => '../docs' if Dir.exist?('../docs') && ENV['JEKYLL_VERSION']
gem "jekyll-gist"
gem "jekyll-paginate"
gem "jekyll-feed"
gem "jekyll-coffeescript"
gem "jekyll-redirect-from"
gem "kramdown", "~> 1.14"
gem "jekyll-paginate"
gem "mime-types", "~> 3.0"
gem "rdoc", "~> 6.0"
gem "tomlrb", "~> 1.2"
gem "kramdown", "~> 1.9"
gem "rdoc", "~> 4.2"
platform :ruby, :mswin, :mingw, :x64_mingw do
gem "classifier-reborn", "~> 2.2.0"
gem "rdiscount", "~> 2.0"
gem "pygments.rb", "~> 0.6.0"
gem "redcarpet", "~> 3.2", ">= 3.2.3"
gem "classifier-reborn", "~> 2.0"
gem "liquid-c", "~> 3.0"
gem "pygments.rb", "~> 1.0"
gem "yajl-ruby", "~> 1.3"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", :platforms => [:mingw, :mswin, :x64_mingw, :jruby]
end
#
group :site do
if ENV["PROOF"]
gem "html-proofer", "~> 3.4"
gem "html-proofer", "~> 2.0"
end
gem "jemoji", "0.5.1"
gem "jekyll-sitemap"
gem "jekyll-seo-tag"
gem "jekyll-avatar"
gem "jekyll-mentions"
gem "jekyll-seo-tag"
gem "jekyll-sitemap"
gem "jemoji"
end

View File

@@ -1,806 +1,8 @@
## HEAD
* Textile is only supported through a converter plugin (#7003)
### Documentation
* Release post for v3.8.0 (#6849)
* Add Installation Instructions for Ubuntu (#6925)
* add liquid tag jekyll-flickr (#6946)
* Add 4.0 development post (#6934)
* Updated copy - fixed casing of SaaS on resources page. (#6949)
* WIP: Do not advise users to install Jekyll outside of Bundler (#6927)
* Don&#39;t prompt for sudo when installing with Ubuntu WSL (#6781)
* Fix typo (#6969)
* Add version number for group_by_exp doc (#6956)
* Update Windows install docs (#6926)
* Remove documentation for using Redcarpet (#6990)
* Updated nginx configuration for custom-404-page documentation (#6994)
* List all static files variables (#7002)
* Document that _drafts need to be contained within the custom collection directory (#6985)
* proposed change for passive voice. (#7005)
* added the CAT plugin to the plugin list (#7011)
* Updated to supported version (#7031)
* Clarify definition of &#39;draft&#39; (#7037)
* Listed the jekyll-target-blank plugin in plugins list. (#7046)
* Typo (#7058)
* Add Hints for some Improved Travis Config in Doc (#7049)
* Added plugin json-get. (#7086)
* Update travis-ci.md to point out &#34;this is an example Gemfile&#34; (#7089)
* Adding `jekyll-info` plugin (#7091)
* GitHub enables you to use themes from other repos (#7112)
* Updates to CODE OF CONDUCT (v1.4.0) (#7105)
* Instructions to view themes files under Linux (#7095)
* add jekyll-xml-source (#7114)
* Add the jekyll-firstimage filter plugin (#7127)
* Use a real theme in the example (#7125)
* Update docs about post creation (#7138)
* Add DEV Community&#39;s Jekyll tag to community page (#7139)
* Initialize upgrading doc for v4.0 (#7140)
* Add version badge for date filters with ordinal (#7162)
* Add closing tags for &lt;a&gt; (#7163)
* Add TSV to list of supported _data files. (#7168)
### Minor Enhancements
* use jekyll-compose if installed (#6932)
* Memoize computing excerpt&#39;s relative_path (#6951)
* Liquefied link tag (#6269)
* Suggest re-running command with --trace on fail (#6551)
* Update item_property to return numbers as numbers instead of strings (#6608)
* Use .markdown for page templates (#7126)
* Fix custom 404 page for GitHub pages (#7132)
### Major Enhancements
* Remove unused error class (#6511)
* Drop support for Ruby 2.1 and 2.2 (#6560)
* Add vendor folder to a newly installed site&#39;s .gitignore (#6968)
* bump i18n (#6931)
* We are not using Ruby 2.2 anymore (#6977)
* Drop support for older versions of Rouge (#6978)
* Remove support for Redcarpet (#6987)
* Remove support for rdiscount (#6988)
* Remove &#39;cache_dir&#39; during `jekyll clean` (#7158)
* Output Jekyll Version while debugging (#7173)
### Development Fixes
* Remove unnecessary Jekyll::Page constant (#6770)
* Loggers should accept both numbers and symbols (#6967)
* Update instructions for releasing docs Gem (#6975)
* yajl-ruby update to v1.4.0 (#6976)
* Load Rouge for TestKramdown (#7007)
* Useless privates removed (#6768)
* Allow i18n v0.9.5 and higher (#7044)
* Update Rubocop&#39;s config (#7050)
* Remember to release docs gem (#7066)
* Use assert_include (#7093)
* Update rubocop version to 0.57.x ### -docs (#7078)
* Example of CircleCI deployment through CircleCI v2 (#7024)
* Fix Rubocop offences in test files (#7128)
* fix up refute_equal call (#7133)
* Fix incorrectly passed arguments to assert_equal (#7134)
* Lock Travis to Bundler-1.16.2 (#7144)
### Bug Fixes
* Add call to unused method `validate_options` in `commands/serve.rb` (#7122)
### feature
* Disable Liquid via front matter (#6824)
* Do not process Liquid in post excerpt when disabled in front matter (#7146)
## 3.8.3 / 2018-06-05
### Bug Fixes
* Fix --unpublished not affecting collection documents (#7027)
## 3.8.2 / 2018-05-18
### Development Fixes
* Update rubocop version (#7016)
### Bug Fixes
* Add whitespace control to LIQUID_TAG_REGEX (#7015)
## 3.8.1 / 2018-05-01
### Bug Fixes
* Fix rendering Liquid constructs in excerpts (#6945)
* Liquify documents unless published == false (#6959)
## 3.8.0 / 2018-04-19
### Development Fixes
* move duplicate code to a single private method (#6593)
* Test against Ruby 2.5 on AppVeyor (#6668)
* Replace simple regex with a native Ruby method (#6732)
* Codeclimate: exclude livereload.js (#6776)
* Add a cucumber feature to test link tag (#6777)
* Fix theme gem feature (#6784)
* Replace simple regex with equivalent Ruby methods (#6736)
* Rewrite `script/rubyprof` as a Ruby script (#6813)
* Add debug output to theme rendering (#5195)
* fix minitest deprecation warning in test (#6839)
* Memoize `Site#site_data` (#6809)
* Memoize document output extension (#6814)
* Access document permalink attribute efficiently (#6740)
* Minimize array allocations in the `where` filter (#6860)
* Bump JRuby (#6878)
* Assert existence of &lt;collection&gt;.files (#6907)
* Bump Rubocop to 0.54.x (#6915)
* Regenerate unconditionally unless its an incremental build (#6917)
* Centralize require statements (#6910)
* Bump to Rubocop 0.55 (#6929)
* Refactor private method `HighlightBlock#parse_options` (#6822)
### Minor Enhancements
* Two massive performance improvements for large sites (#6730)
* Cache the list of documents to be written (#6741)
* Allow Jekyll Doctor to detect stray posts dir (#6681)
* Excerpt relative-path should match its path (#6597)
* Remind user to resolve conflict in `jekyll new` with `--force` (#6801)
* Memoize helper methods in site-cleaner (#6808)
* Compute document&#39;s relative_path faster (#6767)
* Create a single instance of PostReader per site (#6759)
* Allow date filters to output ordinal days (#6773)
* Change regex to sanitize and normalize filenames passed to LiquidRenderer (#6610)
* Allow passing :strict_variables and :strict_filters options to Liquid&#39;s renderer (#6726)
* Debug writing files during the build process (#6696)
* Improve regex usage in `Tags::IncludeTag` (#6848)
* Improve comment included in the starter index.md (#6916)
* Store and retrieve converter instances for Jekyll::Filters via a hash (#6856)
* Implement a cache within the `where` filter (#6868)
* Store regexp in a constant (#6887)
* Optimize computing filename in LiquidRenderer (#6841)
### Documentation
* Adding the jekyll-algolia plugin to the list of plugins (#6737)
* Added Premonition plugin to list of plugins (#6750)
* Add document on releasing a new version (#6745)
* Mention Talkyard, a new commenting system for Jekyll and others. (#6752)
* Add &#39;jekyll-fontello&#39; to plugins (#6757)
* Install dh-autoreconf on Windows (#6765)
* Fix common typos (#6764)
* Fix documentation for `{{ page.excerpt }}` (#6779)
* Update docs on permalink configuration (#6775)
* Propose fix some typos (#6785)
* Say hello to Jekyll&#39;s New Lead Developer (#6790)
* Add reference to Liquid to plugin docs (#6794)
* Draft a release post for v3.7.3 (#6803)
* add missing step for gem-based theme conversion (#6802)
* Update windows.md to explain an issue with jekyll new. (#6838)
* Add Bundler Installation Instructions (#6828)
* Docs: describe difference between tags and categories (#6882)
* Add `jekyll-random` plugin to docs (#6833)
* Fixed typo in description of categories and tags (#6896)
* Add missing ul-tag (#6897)
* doc: add liquid tag plugin jekyll-onebox for html previews (#6898)
* Add `jekyll-w2m` to plugins (#6855)
* Fix tutorials navigation HTML (#6919)
* add Arch Linux instalation troubleshoot (#6782)
* Docs: Install Jekyll on macOS (#6881)
* Fix CodeClimate badges [ci skip] (#6930)
* Update index.md (#6933)
### Site Enhancements
* Remove links to Gists (#6751)
* Always load Google Fonts over HTTPS (#6792)
* always load analytics.js over HTTPS (#6807)
### Bug Fixes
* Append appropriate closing tag to Liquid block in an excerpt ### -minor (#6724)
* Bypass rendering via Liquid unless required (#6735)
* Delegated methods after `private` keyword are meant to be private (#6819)
* Improve handling non-default collection documents rendering and writing (#6795)
* Fix passing multiline params to include tag when using the variable syntax (#6858)
* `include_relative` tag should find related documents in collections gathered within custom `collections_dir` (#6818)
* Handle liquid tags in excerpts robustly (#6891)
* Allow front matter defaults to be applied properly to documents gathered under custom `collections_dir` (#6885)
## 3.7.3 / 2018-02-25
### Bug Fixes
* Do not hardcode locale unless certainly necessary (#6791)
## 3.7.2 / 2018-01-25
### Development Fixes
* CI: Test against Ruby 2.5.0 (#6664)
* Bump rdoc to 6.0 (#6600)
* Lint file and bump theme dependencies (#6698)
* Write a Rubocop Cop to ensure no `#p` or `#puts` calls get committed to master. (#6615)
* Remove redgreen gem (#6720)
### Site Enhancements
* Display latest version in header (#6676)
* Update version in `config.yml` via YAML load / dump (#6677)
### Documentation
* Fix: Add note about posts in context of collections_dir (#6680)
* Update deploy-script in documentation (#6666)
* Add note about naming of collections_dir (#6703)
* Update installation.md (#6694)
* Add `jekyll-html` to plugins. (#6654)
* Update plugins.md (#6716)
* Release v3.7.1 (#6695)
### Bug Fixes
* inform that symlinks are not allowed in safe mode (#6670)
* Glob scope path only if configured with a pattern (#6692)
* Add gem &#34;wdm&#34; to all newly generated Gemfiles (#6711)
* Fix timezone inconsistencies between different ruby version (#6697)
* Refactor collections_dir feature for consistency (#6685)
### Minor Enhancements
* Require external library only if necessary (#6596)
## 3.7.0 / 2018-01-02
### Minor Enhancements
* Add LiveReload functionality to Jekyll. (#5142)
* Add Utils::Internet.connected? to determine whether host machine has internet connection. (#5870)
* Disable default layouts for Pages with a `layout: none` declaration (#6182)
* Scope path glob (#6268)
* Allow the user to set collections_dir to put all collections under one subdirectory (#6331)
* Upgrade to Rouge 3 (#6381)
* Allow URL filters to work directly with documents (#6478)
* filter relative_url should keep absolute urls with scheme/authority (#6490)
* `.sass-cache` doesn&#39;t *always* land in `options[&#39;source&#39;]` (#6500)
* Allow plugins to modify the obsolete files. (#6502)
* Add latin mode to `slugify` (#6509)
* Log Kramdown warnings if log level is WARN (#6522)
* Add an option to configure kramdown warning output (#6554)
* Add `json` extension to list of directory indices (#6550)
* Dependency: Bump jekyll-watch to 2.0 (#6589)
* Remove paginate check (#6606)
* update classifier-reborn to 2.2.0 (#6631)
* Switch to an actively-maintained TOML parser. (#6652)
* Do not coerce layout paths in theme-gem to the source directory (#6603)
### Bug Fixes
* Raise when theme root directory is not available (#6455)
* Avoid block parser warning in SmartyPants (#6565)
* Fail gracefully if &#34;sass&#34; gem cannot be loaded (#6573)
* return correct file in dir if dir has same name as file (#6569)
* Register reload hooks in Server#process (#6605)
* Memoize path to metadata file (#6602)
* Use `require_relative` to load Jekyll classes (#6609)
### Development Fixes
* Added direct collection access to future collection item feature test(#6151)
* add failing test for non-utf8 encoding (#6339)
* Upgrade to Cucumber 3.0 (#6395)
* Provide a better default hash for tracking liquid stats (#6417)
* Add configuration for first-timers bot (#6431)
* Do not linkify escaped characters as PRs in History (#6468)
* Rely on jekyll-mentions for linking usernames (#6469)
* Update first-timers-issue-template.md (#6472)
* Enable `Lint/RescueWithoutErrorClass` Cop (#6482)
* Clean up Rubocop config (#6495)
* Use Gem to discover the location of bundler (#6499)
* Remove unnecessary encoding comment (#6513)
* Suggest using Rubocop to automatically fix errors (#6514)
* Assert raising Psych::SyntaxError when`&#34;strict_front_matter&#34;=&gt;true` (#6520)
* Use Kernel#Array instead of explicit Array check (#6525)
* RuboCop: Enable `Style/UnneededCapitalW` cop (#6526)
* Refactor method to reduce ABC Metric size (#6529)
* Remove parentheses around arguments to raise (#6532)
* Use double-quotes around gem name (#6535)
* Dependencies: upgrade to toml 0.2.0 (#6541)
* Lock to cucumber 3.0.1 on Ruby 2.1 (#6546)
* Bump JRuby version in Travis config (#6561)
* Rescue from Psych::SyntaxError instead of SyntaxError after parsing YAML(#5828)
* Drop forwarding to private methods by exposing those methods as public(#6577)
* Upgrade pygments to v1.x (#5937)
* Bump yajl-ruby (#6582)
* Cleanup test_redcarpet.rb (#6584)
* Add PageWithoutAFile class from jekyll plugins (#6556)
* Cleanup LiveReloadReactor (#6607)
### Documentation
* Add formester to the list of saas form backend (#6059)
* GitHub Pages instructions (#6384)
* Improve documentation for theme-gem installation (#6387)
* Fix diff syntax-highlighting (#6388)
* Update instructions (#6396)
* Fix code-block highlighting in docs (#6398)
* Filtering Posts with categories, tags, or other variables (#6399)
* Fixes formatting on pre-formatted text. (#6405)
* Added new tutorial to tutorials section on docs (#6406)
* Updates (#6407)
* Fix `collections_dir` example (#6408)
* Renaming duplicate of &#34;Scenario 6&#34; to &#34;Scenario 7&#34; (#6411)
* Mark `collection_dir` as unreleased (#6412)
* Fix link to SUPPORT (#6415)
* Fix list appearance by adding missing `ol` tag (#6421)
* Explain how to override output collection index page (#6424)
* Added github-cards to the list of plugins (#6425)
* CoC violation correspondants (#6429)
* Add a note about Liquid and syntax highlighting (#6466)
* Remove `sudo` from macOS troubleshooting instructions (#6486)
* Add a note on `:jekyll_plugins` group in the docs (#6488)
* Updated custom-404-page.md (#6489)
* Fix a few minor issues in the docs (#6494)
* Add jekyll-pwa-plugin (#6533)
* Remove Jekyll-Smartify from plugins directory (#6548)
* Updated Jekyll-Pug listing to include official website (#6555)
* Remove link to severely outdated asset plugin (#6613)
* Default time zone depends upon server (#6617)
* Add `disqus-for-jekyll` to plugins. (#6618)
* Update &#34;Requirements&#34; for Ruby version (#6623)
* Fix: Update link to i18n_filter plugin (#6638)
* Correct WordPress capitalization (#6645)
* Add Tweetsert, Stickyposts, Paginate::Content (#6651)
* Post: Jekyll 3.7.0 released (#6634)
### Site Enhancements
* Add special styling for code-blocks run in shell (#6389)
* Add post about diversity (#6447)
* Update list of files excluded from Docs site (#6457)
* Update site History (#6460)
* Add default twitter card image (#6476)
* Update normalize.css to v7.0.0 (#6491)
* Optimize images (#6519)
* Back to original main navigation (#6544)
* Styles: mobile-docs select element (#6545)
* Search with DocSearch by @Algolia (#6557)
* Site header redesign (#6567)
* Move logo above site navigation on small screens (#6570)
* Docs: Include version badge for latest features (#6574)
* Use version-badge on an existing feature intro (#6575)
* Add jekyll-category-pages plugin (#6632)
* Improve docs styling for code to be run in shell (#6641)
* Fix permalink icon markup in news-item layout (#6639)
## 3.6.2 / 2017-10-21
### Development Fixes
* Update Rubocop to 0.51.0 (#6444)
* Add test for layout as string (#6445)
### Bug Fixes
* Problematic UTF+bom files (#6322)
* Always treat `data.layout` as a string (#6442)
## 3.6.1 / 2017-10-20
### Documentation
* Doc y_day in docs/permalinks (#6244)
* Update frontmatter.md (#6371)
* Elaborate on excluding items from processing (#6136)
* Style lists in tables (#6379)
* Remove duplicate &#34;available&#34; (#6380)
### Development Fixes
* Bump rubocop to use `v0.50.x` (#6368)
## 3.6.0 / 2017-09-21
### Minor Enhancements
* Ignore final newline in folded YAML string (#6054)
* Add URL checks to Doctor (#5760)
* Fix serving files that clash with directories (#6222) (#6231)
* Bump supported Ruby version to `>= 2.1.0` (#6220)
* set `LiquidError#template_name` for errors in included file (#6206)
* Access custom config array throughout session (#6200)
* Add support for Rouge 2, in addition to Rouge 1 (#5919)
* Allow `yield` to logger methods &amp; bail early on no-op messages (#6315)
* Update mime-types. (#6336)
* Use a Schwartzian transform with custom sorting (#6342)
* Alias `Drop#invoke_drop` to `Drop#[]` (#6338)
### Bug Fixes
* `Deprecator`: fix typo for `--serve` command (#6229)
* `Reader#read_directories`: guard against an entry not being a directory (#6226)
* kramdown: symbolize keys in-place (#6247)
* Call `to_s` on site.url before attempting to concatenate strings (#6253)
* Enforce Style/FrozenStringLiteralComment (#6265)
* Update theme-template README to note &#39;assets&#39; directory (#6257)
* Memoize the return value of `Document#url` (#6266)
* delegate `StaticFile#to_json` to `StaticFile#to_liquid` (#6273)
* Fix `Drop#key?` so it can handle a nil argument (#6281)
* Guard against type error in absolute url (#6280)
* Mutable drops should fallback to their own methods when a mutation isn&#39;t present (#6350)
* Skip adding binary files as posts (#6344)
* Don&#39;t break if bundler is not installed (#6377)
### Documentation
* Fix a typo in `custom-404-page.md` (#6218)
* Docs: fix links to issues in History.markdown (#6255)
* Update deprecated gems key to plugins. (#6262)
* Fixes minor typo in post text (#6283)
* Execute build command using bundle. (#6274)
* name unification - buddy details (#6317)
* name unification - application index (#6318)
* trim and relocate plugin info across docs (#6311)
* update Jekyll&#39;s README (#6321)
* add SUPPORT file for GitHub (#6324)
* Rename CODE_OF_CONDUCT to show in banner (#6325)
* Docs : illustrate page.id for a collection&#39;s document (#6329)
* Docs: post&#39;s date can be overriden in YAML front matter (#6334)
* Docs: `site.url` behavior on development and production environments (#6270)
* Fix typo in site.url section of variables.md :-[ (#6337)
* Docs: updates (#6343)
* Fix precedence docs (#6346)
* add note to contributing docs about `script/console` (#6349)
* Docs: Fix permalink example (#6375)
### Site Enhancements
* Adding DevKit helpers (#6225)
* Customizing url in collection elements clarified (#6264)
* Plugins is the new gems (#6326)
### Development Fixes
* Strip unnecessary leading whitespace in template (#6228)
* Users should be installing patch versions. (#6198)
* Fix tests (#6240)
* Define path with `__dir__` (#6087)
* exit site.process sooner (#6239)
* make flakey test more robust (#6277)
* Add a quick test for DataReader (#6284)
* script/backport-pr: commit message no longer includes the `#` (#6289)
* Add Add CODEOWNERS file to help automate reviews. (#6320)
* Fix builds on codeclimate (#6333)
* Bump rubies on Travis (#6366)
## 3.5.2 / 2017-08-12
### Bug Fixes
* Backport #6281 for v3.5.x: Fix `Drop#key?` so it can handle a nil argument (#6288)
* Backport #6280 for v3.5.x: Guard against type error in `absolute_url` (#6287)
* Backport #6266 for v3.5.x: Memoize the return value of `Document#url` (#6301)
* Backport #6273 for v3.5.x: delegate `StaticFile#to_json` to `StaticFile#to_liquid` (#6302)
* Backport #6226 for v3.5.x: `Reader#read_directories`: guard against an entry not being a directory (#6304)
* Backport #6247 for v3.5.x: kramdown: symbolize keys in-place (#6303)
## 3.5.1 / 2017-07-17
### Minor Enhancements
* Use Warn for deprecation messages (#6192)
* site template: Use plugins key instead of gems (#6045)
### Bug Fixes
* Backward compatiblize URLFilters module (#6163)
* Static files contain front matter default keys when `to_liquid`'d (#6162)
* Always normalize the result of the `relative_url` filter (#6185)
### Documentation
* Update reference to trouble with OS X/macOS (#6139)
* added BibSonomy plugin (#6143)
* add plugins for multiple page pagination (#6055)
* Update minimum Ruby version in installation.md (#6164)
* Add information about finding a collection in `site.collections` (#6165)
* Add `{% raw %}` to Liquid example on site (#6179)
* Added improved Pug plugin - removed 404 Jade plugin (#6174)
* Linking the link (#6210)
* Small correction in documentation for includes (#6193)
* Fix docs site page margin (#6214)
### Development Fixes
* Add jekyll doctor to GitHub Issue Template (#6169)
* Test with Ruby 2.4.1-1 on AppVeyor (#6176)
* set minimum requirement for jekyll-feed (#6184)
## 3.5.0 / 2017-06-18
### Minor Enhancements
* Upgrade to Liquid v4 (#4362)
* Convert StaticFile liquid representation to a Drop & add front matter defaults support to StaticFiles (#5871)
* Add support for Tab-Separated Values data files (`*.tsv`) (#5985)
* Specify version constraint in subcommand error message. (#5974)
* Add a template for custom 404 page (#5945)
* Require `runtime_dependencies` of a Gem-based theme from its `.gemspec` file (#5914)
* Don't raise an error if URL contains a colon (#5889)
* Date filters should never raise an exception (#5722)
* add `plugins` config key as replacement for `gems` (#5130)
* create configuration from options only once in the boot process (#5487)
* Add option to fail a build with front matter syntax errors (#5832)
* Disable default layouts for documents with a `layout: none` declaration (#5933)
* In `jekyll new`, make copied site template user-writable (#6072)
* Add top-level `layout` liquid variable to Documents (#6073)
* Address reading non-binary static files in themes (#5918)
* Allow filters to sort & select based on subvalues (#5622)
* Add strip_index filter (#6075)
### Documentation
* Install troubleshooting on Ubuntu (#5817)
* Add Termux section on troubleshooting (#5837)
* fix ial css classes in theme doc (#5876)
* Update installation.md (#5880)
* Update Aerobatic docs (#5883)
* Add note to collections doc on hard-coded collections. (#5882)
* Makes uri_escape template docs more specific. (#5887)
* Remove duplicate footnote_nr from default config (#5891)
* Fixed tutorial for publishing gem to include repo. (#5900)
* update broken links (#5905)
* Fix typo in contribution information (#5910)
* update plugin repo URL to reflect repo move (#5916)
* Update exclude array in configuration.md (#5947)
* Fixed path in "Improve this page" link in Tutorials section (#5951)
* Corrected permalink (#5949)
* Included more details about adding defaults to static files (#5971)
* Create buddyworks (#5962)
* added (buddyworks) to ci list (#5965)
* Add a tutorial on serving custom Error 404 page (#5946)
* add custom 404 to tutorial navigation (#5978)
* Add link to order of interpretation tutorial in Tutorials nav (#5952)
* Document Jekyll's Philosophy (#5792)
* Require Ruby > 2.1.0 (#5983)
* Fix broken link (#5994)
* Default options for script/proof (#5995)
* Mention Bash on Ubuntu on Windows (#5960)
* Document `--unpublished` flag introduced in 91e9ecf (#5959)
* Update upgrading.md to mention usage of `bundle update` (#5604)
* Fix missing quotation mark (#6002)
* New tutorial: Convert an HTML site to Jekyll (#5881)
* Revamp Permalink section (#5912)
* Fixup tutorial on creating theme from existing HTML templates (#6006)
* Standardise on "URLs" without apostrophe in docs (#6018)
* Added txtpen in tutorial (#6021)
* fix typo using past participle (#6026)
* changed formatting to fit the style of the documentation (#6027)
* doc fix typo word usage (#6028)
* corrected reference to layout in index.md (#6032)
* (Minor) Update MathJax CDN (#6013)
* Add MvvmCross to samples (#6035)
* Update travis-ci.md to correct procedure (#6043)
* fix sentence in documentation (#6048)
* rephrase a sentence in posts.md to be more direct (#6049)
* Compress Website Sass output (#6009)
* doc correct spelling error (#6050)
* adjusted date-format in sitemap (#6053)
* Typo fix (welcomed change -> welcome change). (#6070)
* Fixed documentation inconsistency (#6068)
* Add own plugin -> Jekyll Brand Social Wall (#6064)
* Added plugin jekyll-analytics (#6042)
* Use more precise language when explaining links (#6078)
* Update plugins.md (#6088)
* windows 10 tutorial (#6100)
* Explain how to override theme styles (#6107)
* updated Bash on Ubuntu on Windows link in tutorial (#6111)
* Fix wording in `_docs/templates.md` links section (#6114)
* Update windows.md (#6115)
* Added windows to docs.yml (#6109)
* Be more specific on what to upload (#6119)
* Remove Blank Newlines from "Jekyll on Windows" Page (#6126)
* Link the troubleshooting page in the quickstart page (#6134)
* add documentation about the &#34;pinned&#34; label (#6147)
* docs(JekyllOnWindows): Add a new Installation way (#6141)
* corrected windows.md (#6149)
* Refine documentation for Windows (#6153)
### Development Fixes
* Rubocop: add missing comma (#5835)
* Appease classifier-reborn (#5934)
* Allow releases & development on `*-stable` branches (#5926)
* Add script/backport-pr (#5925)
* Prefer .yaml over .toml (#5966)
* Fix Appveyor with DST-aware cucumber steps (#5961)
* Use Rubocop v0.47.1 till we're ready for v0.48 (#5989)
* Test against Ruby 2.4.0 (#5687)
* rubocop: lib/jekyll/renderer.rb complexity fixes (#5052)
* Use yajl-ruby 1.2.2 (now with 2.4 support) (#6007)
* Bump Rubocop to v0.48 (#5997)
* doc use example.com (#6031)
* fix typo (#6040)
* Fix CI (#6044)
* Remove `ruby RUBY_VERSION` from generated Gemfile (#5803)
* Test if hidden collections output a document with a future date (#6103)
* Add test for uri_escape on reserved characters (#6086)
* Allow you to specify the rouge version via an environment variable for testing (#6138)
* Bump Rubocop to 0.49.1 (#6093)
* Lock nokogiri to 1.7.x for Ruby 2.1 (#6140)
### Site Enhancements
* Corrected date for version 3.4.0 (#5842)
* Add the correct year to the 3.4.0 release date (#5858)
* Add documentation about order of interpretation (#5834)
* Documentation on how to build navigation (#5698)
* Navigation has been moved out from docs (#5927)
* Make links in sidebar for current page more prominent (#5820)
* Update normalize.css to v6.0.0 (#6008)
* Docs: rename `gems` to `plugins` (#6082)
* plugins -> gems (#6110)
* Document difference between cgi_escape and uri_escape #5970 (#6081)
### Bug Fixes
* Exclude Gemfile by default (#5860)
* Convertible#validate_permalink!: ensure the return value of `data["permalink"]` is a string before asking if it is empty (#5878)
* Allow abbreviated post dates (#5920)
* Remove dependency on include from default about.md (#5903)
* Allow colons in `uri_escape` filter (#5957)
* Re-surface missing public methods in `Jekyll::Document` (#5975)
* absolute_url should not mangle URL if called more than once (#5789)
* patch URLFilters to prevent `//` (#6058)
* add test to ensure variables work in `where_exp` condition (#5315)
* Read explicitly included dot-files in collections. (#6092)
* Default `baseurl` to `nil` instead of empty string (#6137)
* Filters#time helper: Duplicate time before calling #localtime. (#5996)
## 3.4.5 / 2017-06-30
* Backport #6185 for v3.4.x: Always normalize the result of the `relative_url` filter (#6186)
## 3.4.4 / 2017-06-17
* Backport #6137 for v3.4.x: Default `baseurl` to `nil` instead of empty string (#6146)
## 3.4.3 / 2017-03-21
* Backport #5957 for v3.4.x: Allow colons in `uri_escape` filter (#5968)
## 3.4.2 / 2017-03-09
* Backport #5871 for v3.4.x: Convert StaticFile liquid representation to a Drop & add front matter defaults support to StaticFiles (#5940)
## 3.4.1 / 2017-03-02
* Backport #5920 for v3.4.x: Allow abbreviated post dates (#5924)
## 3.4.0 / 2017-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
* Use only the used Font Awesome icons. (#5530)
* Switch to `https` when possible. (#5611)
* Update `_font-awesome.scss` to move .woff file before .ttf (#5614)
* Update documentation on updating FontAwesome Iconset (#5655)
* Use defaults for docs and news-items (#5744)
* Sort gems in `docs/_config.yml` (#5746)
* Add missing class (#5791)
* Improve template docs (#5694)
### Development Fixes
* clean unit-test names in `test/test_tags.rb` (#5608)
* Add cucumber feature to test for bonafide theme gems (#5384)
* Use `assert_nil` instead of `assert_equal nil` (#5652)
* Rubocop -a on lib/jekyll (#5666)
* 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)
* Bump rdoc to v5.0 (#5797)
* Bump codeclimate-test-reporter to v1.0.5 (#5798)
### 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)
* use backticks for Gemfile for consistency since in the next sentence … (#5641)
* Update Core team list in the README file (#5643)
* Improve Permalinks documentation. (#5653)
* Fix typo in Variables doc page (#5657)
* 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)
* 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
### Minor Enhancements
* Collapse `gsub` for performance (#5494)
* URL: warn if key doesn't exist in url drop (#5524)
### Bug Fixes
* Fix typo in `theme_template` README (#5472)
* Do not swallow all exceptions on render (#5495)
* Site template: fixed `_config.yml` comment typo (#5511)
* `jekyll new-theme` should specify Jekyll as a runtime dependency for the theme (#5457)
* Be much more specific about ignoring specific vendored directories. (#5564)
* Only warn about auto-regeneration bug on Bash On Windows. (#5464)
* Allow permalink template to have underscores (#5572)
### Site Enhancements
* Documentation: `link` Liquid tag (#5449)
* Documentation: {% link %} tag (#5449)
* Updating install instruction link for Jekyll 3 on Windows (#5475)
* Update normalize.css to v5.0.0 (#5471)
* Add jekyll-data to the list of plugins (#5491)
@@ -808,32 +10,21 @@
* Add jekyll-include-absolute-plugin to list of third-party plugins (#5492)
* Remove jekyll-hook from deployment methods (#5502)
* Update deployment-methods.md (#5504)
* Ubuntu users should install ruby2.3-dev (#5512)
* Remove Glynn as deployment option (#5519)
* Fix broken forum link (#5466)
* Move documentation to docs folder (#5459)
* Fix broken links in CONTRIBUTING (#5533)
* Update documentation on jekyllrb.com (#5540)
* Fix HTML rendering (#5536)
* Remove outdated deployment information (#5557)
* no more invalid US-ASCII on lines 30 and 97 (#5520)
* Add permalinks to docs in '/maintaining/' (#5532)
* Add jekyll-pinboard to list of third-party plugins (#5514)
* Fix formatting in 2-to-3.md (#5507)
* Add two plugins to the plugins page (#5493)
* Use site.baseurl before link and post_url tags (#5559)
* Fix link to jekyll-pinboard plugin (#5570)
* mention `docs` folder as a way to deploy on GitHub Pages (#5571)
### Bug Fixes
* Fix typo in theme_template README (#5472)
* Do not swallow all exceptions on render (#5495)
### Development Fixes
* fix rubocop errors on testing with Rubocop 0.44 (#5489)
* script/test: add missing whitespace (#5479)
* Restrict Rubocop version (#5496)
* include a hashbang for all benchmark scripts & make them executable (#5505)
* Update source in script/proof (#5538)
* Collections.feature: conditional steps to have it pass on Windows (#5546)
* Fix tests to get script/test to pass on Windows (#5526)
### Minor Enhancements
* Collapse `gsub` (#5494)
## 3.3.0 / 2016-10-06
@@ -901,10 +92,10 @@
* Site: exclude README.md and .gitignore (#5304)
* Add link to Staticman (#5224)
* Update url for OpenShift (#5320)
* Add help for missing static_file e.g. on heroku (#5334)
* [docs] add help for missing static_file e.g. on heroku (#5334)
* Add a line about updating theme-gems in the docs (#5318)
* Explain how to copy a theme's files (#5335)
* .md as default extension in examples (#5316)
* [docs] .md as default extension in examples (#5316)
* Fix small typo in docs (#5347)
* Add missing period to sentence in first paragraph. (#5372)
* added jekyll-spotify plugin (#5369)
@@ -913,7 +104,7 @@
* Add documentation for `relative_url` and `absolute_url` (#5405)
* Bugfix on logo in JSON-LD (#5421)
* Fix Travis.ci documentation (#5413)
* Update documentation regarding `bundle install` after `jekyll new` (#5428)
* [docs] Update documentation regarding `bundle install` after `jekyll new` (#5428)
* Replace classic box-sizing reset with inheritance reset (#5411)
* Update Wikipedia YAML list link (#5452)
* Add Jekyll 3.3 release post (#5442)
@@ -923,9 +114,9 @@
* Update appveyor.yml and fix optional deps for Ruby x64 (#5180)
* Improve tests for Jekyll::PluginManager (#5167)
* Update Ruby versions in travis.yml (#5221)
* Avoid installing unnecessary gems for site testing (#5272)
* Avoid installing unecessary gems for site testing (#5272)
* Proposal: Affinity teams and their captains (#5273)
* Replace duplicate with positive local test in issue template (#5286)
* Replace duplicate with postive local test in issue template (#5286)
* Update AppVeyor config. (#5240)
* Execute jekyll from clone instead of defined binary when running 'script/default-site' (#5295)
* rubocop: lib/jekyll/document.rb complexity fixes (#5045)
@@ -969,7 +160,7 @@
* Allow collections to have documents that have no file extension (#4545)
* Add size property to `group_by` result (#4557)
* Site Template: Removed unnecessary nesting from `_base.scss` (#4637)
* Adding a debug log statement for skipped future documents. (#4558)
* Adding a debug log statment for skipped future documents. (#4558)
* Site Template: Changed main `<div>` to `<main>` and added accessibility info (#4636)
* Add array support to `where` filter (#4555)
* 'jekyll clean': also remove .sass-cache (#4652)
@@ -978,7 +169,7 @@
* Add `show_dir_listing` option for serve command and fix index file names (#4533)
* Site Template: write a Gemfile which is educational to the new site (#4542)
* Site template: add explanation of site variables in the example `_config.yml` (#4704)
* Adds `link` Liquid tag to make generation of URLs easier (#4624)
* Adds `link` Liquid tag to make generation of URL's easier (#4624)
* Allow static files to be symlinked in unsafe mode or non-prod environments (#4640)
* Add `:after_init` hook & add `Site#config=` to make resetting config easy (#4703)
* DocumentDrop: add `#<=>` which sorts by date (falling back to path) (#4741)
@@ -1217,7 +408,7 @@
* Fix broken links to the Code of Conduct (#4436)
* Upgrade notes: mention trailing slash in permalink; fixes #4440 (#4455)
* Add hooks to the plugin categories toc (#4463)
* Jekyll 3 requires newer version of Ruby. (#4461)
* [add note] Jekyll 3 requires newer version of Ruby. (#4461)
* Fix typo in upgrading docs (#4473)
* Add note about upgrading documentation on jekyllrb.com/help/ (#4484)
* Update Rake link (#4496)
@@ -1278,14 +469,14 @@
* utils/drops: update Drop to support `Utils.deep_merge_hashes` (#4289)
* Make sure jekyll/drops/drop is loaded first. (#4292)
* Convertible/Page/Renderer: use payload hash accessor & setter syntax for backwards-compatibility (#4311)
* Drop: fix hash setter precedence (#4312)
* Drop: fix hash setter precendence (#4312)
* utils: `has_yaml_header?` should accept files with extraneous spaces (#4290)
* Escape html from site.title and page.title in site template (#4307)
* Allow custom file extensions if defined in `permalink` YAML front matter (#4314)
* Fix deep_merge_hashes! handling of drops and hashes (#4359)
* Page should respect output extension of its permalink (#4373)
* Disable auto-regeneration when running server detached (#4376)
* Drop#: only use public_send for keys in the content_methods array (#4388)
* Drop#[]: only use public_send for keys in the content_methods array (#4388)
* Extract title from filename successfully when no date. (#4195)
### Development Fixes
@@ -1687,7 +878,7 @@
### Site Enhancements
* Add @alfredxing to the @jekyll/core team. :tada: (#3218)
* Add `@alfredxing` to the `@jekyll/core` team. :tada: (#3218)
* Document the `-q` option for the `build` and `serve` commands (#3149)
* Fix some minor typos/flow fixes in documentation website content (#3165)
* Add `keep_files` to configuration documentation (#3162)
@@ -1761,7 +952,7 @@
* Fix Rouge's RedCarpet plugin interface integration (#2951)
* Remove `--watch` from the site template blog post since it defaults to watching in in 2.4.0 (#2922)
* Fix code for media query mixin in site template (#2946)
* Allow post URLs to have `.htm` extensions (#2925)
* Allow post URL's to have `.htm` extensions (#2925)
* `Utils.slugify`: Don't create new objects when gsubbing (#2997)
* The jsonify filter should deep-convert to Liquid when given an Array. (#3032)
* Apply `jsonify` filter to Hashes deeply and effectively (#3063)

View File

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

View File

@@ -3,13 +3,13 @@
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
[![Linux Build Status](https://img.shields.io/travis/jekyll/jekyll/master.svg?label=Linux%20build)][travis]
[![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
[![Maintainability](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/maintainability)][codeclimate]
[![Test Coverage](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/test_coverage)][coverage]
[![Test Coverage](https://img.shields.io/codeclimate/coverage/github/jekyll/jekyll.svg)][coverage]
[![Code Climate](https://img.shields.io/codeclimate/github/jekyll/jekyll.svg)][codeclimate]
[![Dependency Status](https://img.shields.io/gemnasium/jekyll/jekyll.svg)][gemnasium]
[![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
[![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)
[ruby-gems]: https://rubygems.org/gems/jekyll
[gemnasium]: https://gemnasium.com/jekyll/jekyll
[codeclimate]: https://codeclimate.com/github/jekyll/jekyll
[coverage]: https://codeclimate.com/github/jekyll/jekyll/coverage
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
@@ -22,11 +22,9 @@ Jekyll is a simple, blog-aware, static site generator perfect for personal, proj
Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
See: https://jekyllrb.com/philosophy
## Having trouble with OS X El Capitan?
## Having trouble?
See: https://jekyllrb.com/docs/troubleshooting/
See: https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
## Getting Started
@@ -39,13 +37,14 @@ See: https://jekyllrb.com/docs/troubleshooting/
## Code of Conduct
In order to have a more open and welcoming community, Jekyll adheres to a
[code of conduct](CODE_OF_CONDUCT.markdown) adapted from the Ruby on Rails code of
[code of conduct](CONDUCT.markdown) adapted from the Ruby on Rails code of
conduct.
Please adhere to this code of conduct in any interactions you have in the
Jekyll community. It is strictly enforced on all official Jekyll
repositories, websites, and resources. If you encounter someone violating
these terms, please let one of our [core team members](https://jekyllrb.com/team/#core-team) know and we will address it as soon as possible.
these terms, please let a maintainer ([@parkr](https://github.com/parkr), [@envygeeks](https://github.com/envygeeks), or [@mattr-](https://github.com/mattr-)) know
and we will address it as soon as possible.
## Diving In
@@ -56,28 +55,6 @@ these terms, please let one of our [core team members](https://jekyllrb.com/team
* Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
## Credits
### Contributors
This project exists thanks to all the people who contribute.
<a href="graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
### Backers
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
<a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
<a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
## License
See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.

View File

@@ -1,15 +1,13 @@
# frozen_string_literal: true
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.expand_path("lib", __dir__)
require "jekyll/version"
Dir.glob("rake/**.rake").each { |f| import f }
Dir.glob('rake/**.rake').each { |f| import f }
#############################################################################
#
@@ -29,53 +27,55 @@ def docs_name
"#{name}-docs"
end
def docs_folder
"docs"
end
def gemspec_file
"#{name}.gemspec"
end
def gem_file
"#{name}-#{Gem::Version.new(version)}.gem"
"#{name}-#{Gem::Version.new(version).to_s}.gem"
end
def normalize_bullets(markdown)
markdown.gsub(%r!\n\s{2}\*{1}!, "\n-")
markdown.gsub(/\n\s{2}\*{1}/, "\n-")
end
def linkify_prs(markdown)
markdown.gsub(%r!(?<\!&)#(\d+)!) do |word|
markdown.gsub(/#(\d+)/) do |word|
"[#{word}]({{ site.repository }}/issues/#{word.delete("#")})"
end
end
def linkify_users(markdown)
markdown.gsub(/(@\w+)/) do |username|
"[#{username}](https://github.com/#{username.delete("@")})"
end
end
def linkify(markdown)
linkify_prs(markdown)
linkify_users(linkify_prs(markdown))
end
def liquid_escape(markdown)
markdown.gsub(%r!(`{[{%].+[}%]}`)!, "{% raw %}\\1{% endraw %}")
markdown.gsub(/(`{[{%].+[}%]}`)/, "{% raw %}\\1{% endraw %}")
end
def custom_release_header_anchors(markdown)
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|
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|
_, major, minor, patch = *release_notes.match(header_regexp)
release_notes
.gsub(header_regexp, "\\0\n{: #v\\1-\\2-\\3}")
.gsub(section_regexp) { |section| "#{section}\n{: ##{slugify(section)}-v#{major}-#{minor}-#{patch}}" }
.gsub(section_regexp) { |section| "#{section}\n{: ##{sluffigy(section)}-v#{major}-#{minor}-#{patch}}" }
end.join("\n## ")
end
def slugify(header)
header.delete("#").strip.downcase.gsub(%r!\s+!, "-")
def sluffigy(header)
header.gsub(/#/, '').strip.downcase.gsub(/\s+/, '-')
end
def remove_head_from_history(markdown)
index = markdown =~ %r!^##\s+\d+\.\d+\.\d+!
index = markdown =~ /^##\s+\d+\.\d+\.\d+/
markdown[index..-1]
end
@@ -84,28 +84,25 @@ 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.exist?(file)
abort "You seem to have misplaced your #{file} file. I can haz?" unless File.exists?(file)
title = begin
File.read(file).match(%r!\A# (.*)$!)[1]
rescue NoMethodError
File.read(file).match(/\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.",
"note" => "This file is autogenerated. Edit /#{file} instead."
}.merge(overrides_front_matter)
contents = "#{front_matter.to_yaml}---\n\n#{content_for(file)}"
File.write("#{docs_folder}/_docs/#{slug}.md", contents)
File.write("site/_docs/#{slug}.md", contents)
end
def content_for(file)
@@ -114,7 +111,7 @@ def content_for(file)
when "History.markdown"
converted_history(contents)
else
contents.gsub(%r!\A# .*\n\n?!, "")
contents.gsub(/\A# .*\n\n?/, "")
end
end
@@ -127,23 +124,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
@@ -151,9 +148,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

View File

@@ -16,17 +16,19 @@ install:
environment:
BUNDLE_WITHOUT: "benchmark:site:development"
matrix:
- RUBY_FOLDER_VER: "25"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "25"
TEST_SUITE: "cucumber"
- RUBY_FOLDER_VER: "25"
TEST_SUITE: "default-site"
- RUBY_FOLDER_VER: "25-x64"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "24"
- RUBY_FOLDER_VER: "23"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "23"
TEST_SUITE: "cucumber"
- RUBY_FOLDER_VER: "23"
TEST_SUITE: "fmt"
- RUBY_FOLDER_VER: "23"
TEST_SUITE: "default-site"
- RUBY_FOLDER_VER: "23-x64"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "22"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "21"
TEST_SUITE: "test"
test_script:

1
benchmark/capture-assign.rb Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require "liquid"
require "benchmark/ips"

View File

@@ -1,101 +0,0 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require "liquid"
require "benchmark/ips"
# Test if processing content string without any Liquid constructs, via Liquid,
# is slower than checking whether constructs exist ( using `String#include?` )
# and return-ing the "plaintext" content string as is..
#
# Ref: https://github.com/jekyll/jekyll/pull/6735
# Sample contents
WITHOUT_LIQUID = <<-TEXT.freeze
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor libero at
pharetra tempus. Etiam bibendum magna et metus fermentum, eu cursus lorem
mattis. Curabitur vel dui et lacus rutrum suscipit et eget neque.
Nullam luctus fermentum est id blandit. Phasellus consectetur ullamcorper
ligula, at finibus eros laoreet id. Etiam sit amet est in libero efficitur
tristique. Ut nec magna augue. Quisque ut fringilla lacus, ac dictum enim.
Aliquam vel ornare mauris. Suspendisse ornare diam tempor nulla facilisis
aliquet. Sed ultrices placerat ultricies.
TEXT
WITH_LIQUID = <<-LIQUID.freeze
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor libero at
pharetra tempus. {{ author }} et metus fermentum, eu cursus lorem
mattis. Curabitur vel dui et lacus rutrum suscipit et eget neque.
Nullam luctus fermentum est id blandit. Phasellus consectetur ullamcorper
ligula, {% if author == "Jane Doe" %} at finibus eros laoreet id. {% else %}
Etiam sit amet est in libero efficitur.{% endif %}
tristique. Ut nec magna augue. Quisque ut fringilla lacus, ac dictum enim.
Aliquam vel ornare mauris. Suspendisse ornare diam tempor nulla facilisis
aliquet. Sed ultrices placerat ultricies.
LIQUID
WITH_JUST_LIQUID_VAR = <<-LIQUID.freeze
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor libero at
pharetra tempus. et metus fermentum, eu cursus lorem, ac dictum enim.
mattis. Curabitur vel dui et lacus rutrum suscipit et {{ title }} neque.
Nullam luctus fermentum est id blandit. Phasellus consectetur ullamcorper
ligula, at finibus eros laoreet id. Etiam sit amet est in libero efficitur.
tristique. Ut nec magna augue. {{ author }} Quisque ut fringilla lacus
Aliquam vel ornare mauris. Suspendisse ornare diam tempor nulla facilisis
aliquet. Sed ultrices placerat ultricies.
LIQUID
SUITE = {
:"plain text" => WITHOUT_LIQUID,
:"tags n vars" => WITH_LIQUID,
:"just vars" => WITH_JUST_LIQUID_VAR,
}.freeze
# Mimic how Jekyll's LiquidRenderer would process a non-static file, with
# some dummy payload
def always_liquid(content)
Liquid::Template.error_mode = :warn
Liquid::Template.parse(content, :line_numbers => true).render(
"author" => "John Doe",
"title" => "FooBar"
)
end
# Mimic how the proposed change would first execute a couple of checks and
# proceed to process with Liquid if necessary
def conditional_liquid(content)
return content if content.nil? || content.empty?
return content unless content.include?("{%") || content.include?("{{")
always_liquid(content)
end
# Test https://github.com/jekyll/jekyll/pull/6735#discussion_r165499868
# ------------------------------------------------------------------------
def check_with_regex(content)
!content.to_s.match?(%r!{[{%]!)
end
def check_with_builtin(content)
content.include?("{%") || content.include?("{{")
end
SUITE.each do |key, text|
Benchmark.ips do |x|
x.report("regex-check - #{key}") { check_with_regex(text) }
x.report("builtin-check - #{key}") { check_with_builtin(text) }
x.compare!
end
end
# ------------------------------------------------------------------------
# Let's roll!
SUITE.each do |key, text|
Benchmark.ips do |x|
x.report("always thru liquid - #{key}") { always_liquid(text) }
x.report("conditional liquid - #{key}") { conditional_liquid(text) }
x.compare!
end
end

1
benchmark/end-with-vs-regexp Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
Benchmark.ips do |x|

0
benchmark/file-dir-ensure-trailing-slash Executable file → Normal file
View File

1
benchmark/flat-map Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
enum = (0..50).to_a

1
benchmark/hash-fetch Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
h = {:bar => 'uco'}

0
benchmark/jekyll-sanitize-path Executable file → Normal file
View File

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'benchmark/ips'
require 'jekyll'
require 'json'
DATA = {"foo"=>"bar", "alpha"=>{"beta"=>"gamma"}, "lipsum"=>["lorem", "ipsum", "dolor"]}
def local_require
require 'json'
JSON.pretty_generate(DATA)
end
def global_require
JSON.pretty_generate(DATA)
end
def graceful_require
Jekyll::External.require_with_graceful_fail("json")
JSON.pretty_generate(DATA)
end
Benchmark.ips do |x|
x.report("local-require") { local_require }
x.report("global-require") { global_require }
x.report("graceful-require") { graceful_require }
x.compare!
end

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env ruby
# -------------------------------------------------------------------
# Benchmarking changes in https://github.com/jekyll/jekyll/pull/6767
# -------------------------------------------------------------------
require 'benchmark/ips'
require 'pathutil'
DOC_PATH = File.join(File.expand_path(__dir__), "_puppies", "rover.md")
COL_PATH = File.join(File.expand_path(__dir__), "_puppies")
def pathutil_relative
Pathutil.new(DOC_PATH).relative_path_from(COL_PATH).to_s
end
def native_relative
DOC_PATH.sub("#{COL_PATH}/", "")
end
if pathutil_relative == native_relative
Benchmark.ips do |x|
x.report("pathutil") { pathutil_relative }
x.report("native") { native_relative }
x.compare!
end
else
print "PATHUTIL: "
puts pathutil_relative
print "NATIVE: "
puts native_relative
end

1
benchmark/proc-call-vs-yield Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
def fast

0
benchmark/regexp-vs-include.rb Executable file → Normal file
View File

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env ruby
require "benchmark/ips"
PATH = "/../../..../...//.....//lorem/ipsum//dolor///sit.xyz"
def sanitize_with_regex
"/" + PATH.gsub(%r!/{2,}!, "/").gsub(%r!\.+/|\A/+!, "")
end
def sanitize_with_builtin
"/#{PATH}".gsub("..", "/").gsub("./", "").squeeze("/")
end
if sanitize_with_regex == sanitize_with_builtin
Benchmark.ips do |x|
x.report("sanitize w/ regexes") { sanitize_with_regex }
x.report("sanitize w/ builtin") { sanitize_with_builtin }
x.compare!
end
else
puts "w/ regexes: #{sanitize_with_regex}"
puts "w/ builtin: #{sanitize_with_builtin}"
puts ""
puts "Thank you. Do try again :("
end

View File

@@ -1,115 +0,0 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# The Ruby documentation for #sort_by describes what's called a Schwartzian transform:
#
# > A more efficient technique is to cache the sort keys (modification times in this case)
# > before the sort. Perl users often call this approach a Schwartzian transform, after
# > Randal Schwartz. We construct a temporary array, where each element is an array
# > containing our sort key along with the filename. We sort this array, and then extract
# > the filename from the result.
# > This is exactly what sort_by does internally.
#
# The well-documented efficiency of sort_by is a good reason to use it. However, when a property
# does not exist on an item being sorted, it can cause issues (no nil's allowed!)
# In Jekyll::Filters#sort_input, we extract the property in each iteration of #sort,
# which is quite inefficient! How inefficient? This benchmark will tell you just how, and how much
# it can be improved by using the Schwartzian transform. Thanks, Randall!
require 'benchmark/ips'
require 'minitest'
require File.expand_path("../lib/jekyll", __dir__)
def site
@site ||= Jekyll::Site.new(
Jekyll.configuration("source" => File.expand_path("../docs", __dir__))
).tap(&:reset).tap(&:read)
end
def site_docs
site.collections["docs"].docs.dup
end
def sort_by_property_directly(docs, meta_key)
docs.sort! do |apple, orange|
apple_property = apple[meta_key]
orange_property = orange[meta_key]
if !apple_property.nil? && !orange_property.nil?
apple_property <=> orange_property
elsif !apple_property.nil? && orange_property.nil?
-1
elsif apple_property.nil? && !orange_property.nil?
1
else
apple <=> orange
end
end
end
def schwartzian_transform(docs, meta_key)
docs.collect! { |d|
[d[meta_key], d]
}.sort! { |apple, orange|
if !apple[0].nil? && !orange[0].nil?
apple.first <=> orange.first
elsif !apple[0].nil? && orange[0].nil?
-1
elsif apple[0].nil? && !orange[0].nil?
1
else
apple[-1] <=> orange[-1]
end
}.collect! { |d| d[-1] }
end
# Before we test efficiency, do they produce the same output?
class Correctness
include Minitest::Assertions
require "pp"
define_method :mu_pp, &:pretty_inspect
attr_accessor :assertions
def initialize(docs, property)
@assertions = 0
@docs = docs
@property = property
end
def assert!
assert sort_by_property_directly(@docs, @property).is_a?(Array), "sort_by_property_directly must return an array"
assert schwartzian_transform(@docs, @property).is_a?(Array), "schwartzian_transform must return an array"
assert_equal sort_by_property_directly(@docs, @property),
schwartzian_transform(@docs, @property)
puts "Yeah, ok, correctness all checks out for property #{@property.inspect}"
end
end
Correctness.new(site_docs, "redirect_from".freeze).assert!
Correctness.new(site_docs, "title".freeze).assert!
# First, test with a property only a handful of documents have.
Benchmark.ips do |x|
x.config(time: 10, warmup: 5)
x.report('sort_by_property_directly with sparse property') do
sort_by_property_directly(site_docs, "redirect_from".freeze)
end
x.report('schwartzian_transform with sparse property') do
schwartzian_transform(site_docs, "redirect_from".freeze)
end
x.compare!
end
# Next, test with a property they all have.
Benchmark.ips do |x|
x.config(time: 10, warmup: 5)
x.report('sort_by_property_directly with non-sparse property') do
sort_by_property_directly(site_docs, "title".freeze)
end
x.report('schwartzian_transform with non-sparse property') do
schwartzian_transform(site_docs, "title".freeze)
end
x.compare!
end

1
benchmark/sequential-assignment Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
Benchmark.ips do |x|

3
benchmark/string-concat Executable file → Normal file
View File

@@ -1,7 +1,6 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
url = "https://jekyllrb.com"
url = "http://jekyllrb.com"
Benchmark.ips do |x|
x.report('+=') { url += '/' }

1
benchmark/string-replacement Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
def str

1
benchmark/symbol-to-proc Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
Benchmark.ips do |x|

View File

@@ -1,48 +0,0 @@
---
version: 3.8.3
name: Jekyll • Simple, blog-aware, static sites
description: Transform your plain text into static websites and blogs
url: https://jekyllrb.com
repository: https://github.com/jekyll/jekyll
timezone: America/Los_Angeles
twitter:
username: jekyllrb
logo: "/img/logo-2x.png"
google_analytics_id: UA-50755011-1
google_site_verification: onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY
collections:
docs:
permalink: "/:collection/:path/"
output: true
posts:
permalink: "/news/:year/:month/:day/:title/"
output: true
tutorials:
output: true
defaults:
- scope:
path: _docs
type: docs
values:
layout: docs
- scope:
path: _posts
type: posts
values:
layout: news_item
image: "/img/twitter-card.png"
plugins:
- jekyll-avatar
- jekyll-feed
- jekyll-mentions
- jekyll-redirect-from
- jekyll-seo-tag
- jekyll-sitemap
- jemoji
sass:
style: compressed
exclude:
- ".gitignore"
- CNAME
- icomoon-selection.json
- readme.md

View File

@@ -1,15 +0,0 @@
- name: Forestry.io
image: /img/forestry-logo.png
url: https://forestry.io
width: 140
height: 30
- name: CloudCannon
image: /img/cloudcannon-logo.png
url: https://cloudcannon.com
width: 75
height: 30
- name: Siteleaf
image: /img/siteleaf-logo.png
url: https://siteleaf.com
width: 40
height: 50

View File

@@ -1,13 +0,0 @@
- title: Tutorials
tutorials:
- home
- video-walkthroughs
- navigation
- orderofinterpretation
- custom-404-page
- convert-site-to-jekyll
- using-jekyll-with-bundler
#- title: Another section
# tutorials:
# - sample

View File

@@ -1,62 +0,0 @@
---
title: "Buddy"
---
[Buddy][buddy-homepage] is a [Docker][docker-homepage]-based CI server that you can set up in 15-20 minutes to build, test, and deploy your Jekyll websites. It supports [GitHub][github-homepage], [Bitbucket][bitbucket-homepage], and [GitLab][gitlab-homepage] repositories, and can be installed on-premises or used in cloud. The following guide will show you how to set up a free environment to build and test your Jekyll project.
[buddy-homepage]: https://buddy.works
[docker-homepage]: https://www.docker.com/
[github-homepage]: https://github.com
[bitbucket-homepage]: https://bitbucket.org/
[gitlab-homepage]: https://gitlab.com
## 1. Getting started
1. Log in at [https://buddy.works][buddy-homepage] with your GitHub/Bitbucket account or email
2. Choose your Git provider and select or push your Jekyll Project
3. Create a new pipeline and set the trigger mode to 'On every push'
4. Add and configure the Jekyll action and save the pipeline
## 2. How it works
Whenever you make a push to the selected branch, the Jekyll action runs `jekyll build` in an isolated [Jekyll Docker image][jekyll-docker-image]. The output is generated to the `/filesystem` directory, and can be further deployed to FTP/SFTP and IaaS services. You can add your own commands, install additional packages, attach services, and run Selenium tests, as well as add other actions down the pipeline, eg. a Slack notification or an SSH script that will restart your server.
![Jekyll Build](https://buddy.works/data/blog/_images/buddyworks-jekyll-small.png)
[jekyll-docker-image]: https://hub.docker.com/r/jekyll/jekyll/
## 3. Using YAML for configuration
If you prefer configuration as code over GUI, you can generate a `buddy.yml` that will create a pipeline with the Jekyll action once you push it to the target branch:
```yaml
- pipeline: "Build and Deploy Jekyll site"
trigger_mode: "ON_EVERY_PUSH"
ref_name: "master"
actions:
- action: "Execute: jekyll build"
type: "BUILD"
docker_image_name: "jekyll/jekyll"
docker_image_tag: "latest"
execute_commands:
- "chown jekyll:jekyll $WORKING_DIR"
- "jekyll build"
```
## 4. Setting up on-premises server
The self-hosted version of Buddy can be installed on any type of server supporting Docker, including [Linux][bw-linux], [Mac][bw-mac], [AWS EC2][bw-aws-ec2], [DigitalOcean][bw-digitalocean], and [Microsoft Azure][bw-azure].
[bw-linux]: https://buddy.works/knowledge/standalone/installation-linux
[bw-mac]: https://buddy.works/knowledge/standalone/installation-mac-osx
[bw-aws-ec2]: https://buddy.works/knowledge/standalone/installation-amazon-ec2
[bw-digitalocean]: https://buddy.works/knowledge/standalone/installation-digitalocean
[bw-azure]: https://buddy.works/knowledge/standalone/installation-azure
## 5. Questions?
This entire guide is open-source. Go ahead and [edit it][jekyll-docs-ci-buddy] if you want to expand it or have a fix or [ask for help][jekyll-help] if you run into trouble and need assistance. Buddy also has an [online community][buddy-forum] for help.
[jekyll-docs-ci-buddy]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration/buddyworks.md
[jekyll-help]: https://jekyllrb.com/help/
[buddy-forum]: http://forum.buddy.works/

View File

@@ -1,161 +0,0 @@
---
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
```ruby
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.
```yaml
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 in v1:
```yaml
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
```
for CircleCI v2, a Docker-based system which new projects will follow, set the `S3_BUCKET_NAME` environment variable (an example of the required config file is shown below).
```yaml
defaults: &defaults
working_directory: ~/repo
version: 2
jobs:
build:
<<: *defaults
docker:
- image: circleci/ruby:2.5
environment:
BUNDLE_PATH: ~/repo/vendor/bundle
steps:
- checkout
- restore_cache:
keys:
- rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
- rubygems-v1-fallback
- run:
name: Bundle Install
command: bundle check || bundle install
- run:
name: HTMLProofer tests
command: |
bundle exec htmlproofer ./_site \
--allow-hash-href \
--check-favicon \
--check-html \
--disable-external
- save_cache:
key: rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
paths:
- vendor/bundle
- run:
name: Jekyll build
command: bundle exec jekyll build
- persist_to_workspace:
root: ./
paths:
- _site
deploy:
<<: *defaults
docker:
- image: circleci/python:3.6.3
environment:
S3_BUCKET_NAME: <<YOUR BUCKET NAME HERE>>
steps:
- attach_workspace:
at: ./
- run:
name: Install AWS CLI
command: pip install awscli --upgrade --user
- run:
name: Upload to s3
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --delete --acl public-read
workflows:
version: 2
test-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
```
## 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

@@ -1,10 +0,0 @@
---
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)
* [Buddy](buddyworks)

View File

@@ -1,140 +0,0 @@
---
title: GitHub Pages
permalink: /docs/github-pages/
---
[GitHub Pages](https://pages.github.com) are public web pages for users,
organizations, and repositories, that are freely hosted on GitHub's `github.io`
domain or on a custom domain name of your choice. GitHub Pages are powered by
Jekyll behind the scenes, so they're a great way to host your Jekyll-powered
website for free.
Your site is automatically generated by GitHub Pages when you push your source
files. Note that GitHub Pages works equally well for regular HTML content,
simply because Jekyll treats files without YAML front matter as static assets.
So if you only need to push generated HTML, you're good to go without any
further setup.
Never built a website with GitHub Pages before? [See this marvelous guide by
Jonathan McGlone](http://jmcglone.com/guides/github-pages/) to get you up and
running. This guide will teach you what you need to know about Git, GitHub, and
Jekyll to create your very own website on GitHub Pages.
## The github-pages gem
Our friends at GitHub have provided the
[github-pages](https://github.com/github/pages-gem) gem which is used to manage
[Jekyll and its dependencies on GitHub Pages](https://pages.github.com/versions/).
Using it in your projects means that when you deploy your site to GitHub Pages,
you will not be caught by unexpected differences between various versions of the
gems.
Note that GitHub Pages runs in `safe` mode and only allows [a set of whitelisted
plugins](https://help.github.com/articles/configuring-jekyll-plugins/#default-plugins).
To use the currently-deployed version of the gem in your project, add the
following to your `Gemfile`:
```ruby
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
```
Be sure to run `bundle update` often.
<div class="note">
<h5>GitHub Pages Documentation, Help, and Support</h5>
<p>
For more information about what you can do with GitHub Pages, as well as for
troubleshooting guides, you should check out
<a href="https://help.github.com/categories/github-pages-basics/">GitHubs Pages Help section</a>.
If all else fails, you should contact <a href="https://github.com/contact">GitHub Support</a>.
</p>
</div>
### Project Page URL Structure
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
Project Pages complicates the proper resolution of URLs. In order to assure your
site builds properly, use the handy [URL filters](../templates/#filters):
{% raw %}
```liquid
<!-- For styles with static names... -->
<link href="{{ "/assets/css/style.css" | relative_url }}" rel="stylesheet">
<!-- For documents/pages whose URLs can change... -->
[{{ page.title }}]("{{ page.url | relative_url }}")
```
{% endraw %}
This way you can preview your site locally from the site root on localhost,
but when GitHub generates your pages from the `gh-pages` branch all the URLs
will resolve properly.
## Deploying Jekyll to GitHub Pages
GitHub Pages work by looking at certain branches of repositories on GitHub.
There are two basic types available: [user/organization and project pages](https://help.github.com/articles/user-organization-and-project-pages/).
The way to deploy these two types of sites are nearly identical, except for a
few minor details.
### User and Organization Pages
User and organization pages live in a special GitHub repository dedicated to
only the GitHub Pages files. This repository must be named after the account
name. For example, [@mojombos user page repository](https://github.com/mojombo/mojombo.github.io) has the name
`mojombo.github.io`.
Content from the `master` branch of your repository will be used to build and
publish the GitHub Pages site, so make sure your Jekyll site is stored there.
<div class="note info">
<h5>Custom domains do not affect repository names</h5>
<p>
GitHub Pages are initially configured to live under the
<code>username.github.io</code> subdomain, which is why repositories must
be named this way <strong>even if a custom domain is being used</strong>.
</p>
</div>
### Project Pages
Unlike user and organization Pages, Project Pages are kept in the same
repository as the project they are for, except that the website content is
stored in a specially named `gh-pages` branch or in a `docs` folder on the
`master` branch. The content will be rendered using Jekyll, and the output
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 of this branch
structure—the [master branch]({{ site.repository }}) contains the
actual software project for Jekyll, and the Jekyll website that youre
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 project pages](https://help.github.com/articles/user-organization-and-project-pages/)
to see more detailed examples.
<div class="note warning">
<h5>Source files must be in the root directory</h5>
<p>
GitHub Pages <a href="https://help.github.com/articles/troubleshooting-github-pages-build-failures#source-setting">overrides</a>
the <a href="/docs/configuration/#global-configuration">“Site Source”</a>
configuration value, so if you locate your files anywhere other than the
root directory, your site may not build correctly.
</p>
</div>
<div class="note info">
<h5>Installing the <code>github-pages</code> gem on Windows</h5>
<p>
While Windows is not officially supported, it is possible
to install the <code>github-pages</code> gem on Windows.
Special instructions can be found on our
<a href="../windows/#installation">Windows-specific docs page</a>.
</p>
</div>

View File

@@ -1,192 +0,0 @@
---
title: Includes
permalink: /docs/includes/
---
The `include` tag allows you to include the content from another file stored in the `_includes` folder:
{% raw %}
```liquid
{% 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:
{% raw %}
```liquid
{% 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:
{% raw %}
```liquid
{% 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:
{% raw %}
```liquid
<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:
{% raw %}
```liquid
{% 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" />
</a>
<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:
{% raw %}
```liquid
<figure>
<a href="{{ include.url }}">
<img src="{{ include.file }}" style="max-width: {{ include.max-width }};"
alt="{{ include.alt }}"/>
</a>
<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`):
{% raw %}
```liquid
{% 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://shopify.github.io/liquid/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:
{% raw %}
```liquid
{% 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):
{% raw %}
```liquid
{% 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:
{% raw %}
```liquid
{% 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 %}
```liquid
{% 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,41 +0,0 @@
---
title: Welcome
permalink: /docs/home/
redirect_from: /docs/index.html
---
This site aims to be a comprehensive guide to Jekyll. Well cover topics such as getting your site up and running, creating and managing content, customizing your build, and deploying.
## What is Jekyll, exactly?
Jekyll is a simple, blog-aware, static site generator.
You create your content as text files ([Markdown](https://daringfireball.net/projects/markdown/)), and organize them into folders. Then, you build the shell of your site using [Liquid](https://shopify.github.io/liquid/)-enhanced HTML templates. Jekyll automatically stitches the content and templates together, generating a website made entirely of static assets, suitable for uploading to any server.
Jekyll happens to be the engine behind [GitHub Pages](https://pages.github.com), so you can host your projects Jekyll page/blog/website on GitHubs servers **for free**.
## Navigating the Guide
Throughout this guide, you'll see these special sections that help you get the most out of Jekyll:
<div class="note">
<h5>ProTips™</h5>
<p>Tips and tricks that'll make you a Jekyll wizard!</p>
</div>
<div class="note info">
<h5>Notes</h5>
<p>Extra tidbits that are sometimes necessary to understand Jekyll.</p>
</div>
<div class="note warning">
<h5>Warnings</h5>
<p>Common pitfalls to avoid.</p>
</div>
<div class="note unreleased">
<h5>Unreleased</h5>
<p>Features planned for future versions of Jekyll, but not available yet.</p>
</div>
If you find anything we havent covered, or would like to share a tip that others might find handy, please [file an issue]({{ site.repository }}/issues/new) and well see about adding it to the guide.

View File

@@ -1,202 +0,0 @@
---
title: Installation
description: Official guide to install Jekyll on macOS, GNU/Linux or Windows.
permalink: /docs/installation/
---
Jekyll is a [Ruby Gem](http://guides.rubygems.org/rubygems-basics/), and can be
installed on most systems.
- [Requirements](#requirements)
- [Install Jekyll on macOS](#macOS)
- [Install Jekyll on Ubuntu Linux](#ubuntu)
- [Install Jekyll on Windows](../windows/)
- [Upgrade Jekyll](#upgrade-jekyll)
## Requirements
Before you start, make sure your system has the following:
- [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.2.5 or above, including all development headers (ruby installation can be checked by running `ruby -v`)
- [RubyGems](https://rubygems.org/pages/download) (which you can check by running `gem -v`)
- [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`,`g++ -v` and `make -v` in your system's command line interface)
## Install on macOS {#macOS}
We only cover macOS High Sierra 10.13 here, which comes with Ruby 2.3.3, older systems will need to [install a more recent Ruby version via Homebrew](#homebrew).
First, you need to install the command-line tools to be able to compile native extensions, open a terminal and run:
```sh
xcode-select --install
```
### Set up Ruby included with the OS
Check your Ruby version meet our requirements:
```sh
ruby -v
2.3.3
```
Great, let's install Jekyll. We also need [Bundler](https://bundler.io/) to help us handle [plugins](../plugins) and [themes](../themes):
```sh
gem install bundler jekyll
```
That's it, you're ready to go, either by installing our [default minimal blog theme](https://github.com/jekyll/minima) with `jekyll new jekyll-website` or by starting from scratch:
```sh
mkdir jekyll-website
cd jekyll-website
# Create a Gemfile
bundle init
# Add Jekyll
bundle add jekyll
# Install gems
bundle install
```
Great, from there you can now either use a [theme](../themes/) or [create your own layouts](../templates/).
### Install a newer Ruby version via Homebrew {#homebrew}
If you wish to install the latest version of Ruby and get faster builds, we recommend to do it via [Homebrew](https://brew.sh) a handy package manager for macOS.
```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ruby
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
```
Yay! Now you have a shiny Ruby on your system!
### Install multiple Ruby versions with rbenv {#rbenv}
Developers often use [rbenv](https://github.com/rbenv/rbenv) to manage multiple Ruby versions. This can be useful if you want to run the same Ruby version used by [GitHub Pages](https://pages.github.com/versions/) or [Netlify](https://www.netlify.com/docs/#ruby) for instance.
```sh
# Install rbenv and ruby-build
brew install rbenv
# Setup rbenv integration to your shell
rbenv init
# Check your install
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
```
Restart your terminal for changes to take effect.
Now we can install the Ruby version of our choice, let's go with Ruby 2.5.1 here:
```sh
rbenv install 2.5.1
rbenv global 2.5.1
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
```
That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#command-reference) to learn how to use different versions of Ruby in your projects.
<div class="note info" markdown="1">
##### Problems installing Jekyll?
Check out the [troubleshooting](../troubleshooting/) page or
[ask for help on our forum](https://talk.jekyllrb.com).
</div>
## Install on Ubuntu Linux {#ubuntu}
Before we install Jekyll, we need to make sure we have all the required
dependencies.
```sh
sudo apt-get install ruby ruby-dev build-essential
```
It is best to avoid installing Ruby Gems as the root user. Therefore, we need to
set up a gem installation directory for your user account. The following
commands will add environment variables to your `~/.bashrc` file to configure
the gem installation path. Run them now:
```sh
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```
Finally, install Jekyll:
```sh
gem install jekyll bundler
```
That's it! You're ready to start using Jekyll.
## Upgrade Jekyll
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find the currently installed version of Jekyll, run one of these commands:
```sh
jekyll --version
gem list jekyll
```
You can use RubyGems to find [the current version of Jekyll](https://rubygems.org/gems/jekyll). Another way to check if you have the latest version is to run the command `gem outdated`. This will provide a list of all the gems on your system that need to be updated. If you aren't running the latest version, run this command:
```sh
bundle update jekyll
```
Alternatively, if you don't have Bundler installed run:
```sh
gem update jekyll
```
To upgrade to latest Rubygems, run:
```
gem update --system
```
Refer to our [upgrading section](../upgrading/) to upgrade from Jekyll 2.x or 1.x.
## Pre-releases
In order to install a pre-release, make sure you have all the requirements
installed properly and run:
```sh
gem install jekyll --pre
```
This will install the latest pre-release. If you want a particular pre-release,
use the `-v` switch to indicate the version you'd like to install:
```sh
gem install jekyll -v '2.0.0.alpha.1'
```
If you'd like to install a development version of Jekyll, the process is a bit
more involved. This gives you the advantage of having the latest and greatest,
but may be unstable.
```sh
git clone git://github.com/jekyll/jekyll.git
cd jekyll
script/bootstrap
bundle exec rake build
ls pkg/*.gem | head -n 1 | xargs gem install -l
```
Now that youve got everything up-to-date and installed, lets get to work!

View File

@@ -1,21 +0,0 @@
---
title: Maintaining Jekyll
permalink: /docs/maintaining/
---
**This guide is for Jekyll contributors and maintainers.** These special people contribute to one or more of Jekyll's repositories or help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.
{: .note .info }
Hello! This is where we document various processes for maintaining Jekyll. Being a maintainer for any Jekyll project is a big responsibility, so we put together some helpful documentation for various tasks you might do as a maintainer.
- [Affinity teams & their captains](affinity-team-captain/)
- [Triaging an issue](triaging-an-issue/)
- [Reviewing a pull request](reviewing-a-pull-request/)
- [Merging a pull request](merging-a-pull-request/)
- [Avoiding burnout](avoiding-burnout/)
- [Special Labels](special-labels/)
- [Releasing a new version](releasing-a-new-version/)
Interested in becoming a maintainer? Here is some documentation for **contributors**:
- [Becoming a maintainer](becoming-a-maintainer/)

View File

@@ -1,89 +0,0 @@
---
title: "Releasing a new version"
---
**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.
{: .note .info }
The most important thing to understand before making a release is that there's no need to feel nervous. Most things are revertable, and even if you do publish an incomplete gem version, we can always skip that one. Don't hestitate to contact the other maintainers if you feel unsure or don't know what to do next.
### Bump the version
The only important place you need to manually bump the version is in `lib/jekyll/version.rb`. Adjust that, and everything else should work fine.
### Update the history document
Replace the first header of the history document with a version milestone. This looks like the following:
```diff
-## HEAD
+## 3.7.1 / 2018-01-25
```
Adjust the version number and the date. The `## HEAD` heading will be regenerated next time a pull request is merged.
Once you've done this, update the website by running the following command:
```sh
bundle exec rake site:generate
```
This updates the website's changelog, and pushes the versions in various other places.
It's recommended that you go over the `History.markdown` file manually one more time, in case there are any spelling errors or such. Feel free to fix those manually, and after you're done generating the website changelog, commit your changes.
## Write a release post
In case this isn't done already, you can generate a new release post using the included `rake` command:
```sh
bundle exec rake site:releases:new[3.8.0]
```
where `3.8.0` should be replaced with the new version. Then, write the post. Be sure to thank all of the collaborators and maintainers who have contributed since the last release. You can generate a log of their names using the following command:
```sh
git shortlog -sn master...v3.7.2
```
where, again `v3.7.2` is the last release. Be sure to open a pull request for your release post.
### Push the version
Before you do this step, make sure the following things are done:
- You have permission to push a new gem version to RubyGems
- You're logged into RubyGems on your command line
- A release post has been prepared, and is ideally already live
- All of the prior steps are done, committed, and pushed to `master`
Really the only thing left to do is to run this command:
```sh
bundle exec rake release
```
This will automatically build the new gem, make a release commit and tag and then push the new gem to RubyGems. Don't worry about creating a GitHub release, @jekyllbot should take care of that.
And then, you're done! :tada: Feel free to celebrate!
If you have access to the [@jekyllrb](https://twitter.com/jekyllrb) Twitter account, you should tweet the release post from there. If not, just ask another maintainer to do it or to give you access.
### Build the docs
We package our documentation as a :gem: Gem for offline use.
This is done with the
[**jekyll-docs**](https://github.com/jekyll/jekyll-docs#building) repository,
and more detailed instructions are provided there.
## For non-core gems
If you're not a maintainer for `jekyll/jekyll`, the procedure is much simpler in a lot of cases. Generally, the procedure still looks like this:
- Bump the gem version manually, usually in `lib/<plugin_name>/version.rb`
- Adjust the history file
- Run `bundle exec rake release` or `script/release`, depending on which of the two exists
- Rejoice
Be sure to ask your project's maintainers if you're unsure!

View File

@@ -1,74 +0,0 @@
---
title: Creating pages
permalink: /docs/pages/
---
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.
## Homepage
Just about every web server configuration you come across will look for an HTML
file called `index.html` (by convention) in the site's root folder and display
that as the homepage. Unless the web server youre using is configured to look
for some different filename as the default, this file will turn into the
homepage of your Jekyll-generated site.
<div class="note">
<h5>ProTip™: Use layouts on your homepage</h5>
<p>
Any HTML file on your site can use layouts and/or includes, even the
homepage. Common content, like headers and footers, make excellent
candidates for extraction into a layout.
</p>
</div>
## Where additional pages live
Where you put HTML or [Markdown](https://daringfireball.net/projects/markdown/)
files for pages depends on how you want the pages to work. There are two main ways of creating pages:
- Place named HTML or [Markdown](https://daringfireball.net/projects/markdown/)
files for each page in your site's root folder.
- Place pages inside folders and subfolders named whatever you want.
Both methods work fine (and can be used in conjunction with each other),
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
The simplest way of adding a page is just to add an HTML file in the root
directory with a suitable name for the page you want to create. For a site with
a homepage, an about page, and a contact page, heres what the root directory
and associated URLs might look like:
```sh
.
|-- _config.yml
|-- _includes/
|-- _layouts/
|-- _posts/
|-- _site/
|-- about.html # => http://example.com/about.html
|-- index.html # => http://example.com/
|-- other.md # => http://example.com/other.html
└── contact.html # => http://example.com/contact.html
```
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.
## Flattening pages from subfolders into the root directory
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:
```yaml
---
title: My page
permalink: mypageurl.html
---
```
### Named folders containing index HTML files
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.
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.

View File

@@ -1,394 +0,0 @@
---
title: Permalinks
permalink: /docs/permalinks/
---
Permalinks refer to the URLs (excluding the domain name or directory folder) for your pages, posts, or collections.
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.
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:output_ext`. Each of the colon-prefixed keywords is a template variable.
## Where to configure permalinks
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:output_ext
```
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:output_ext`, 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">
<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>year</code></p>
</td>
<td>
<p>
Year from the post's filename. May be overridden via the documents
<code>date</code> YAML front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>month</code></p>
</td>
<td>
<p>
Month from the post's filename. May be overridden via the documents
<code>date</code> YAML front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>i_month</code></p>
</td>
<td>
<p>
Month without leading zeros from the post's filename. May be
overridden via the documents <code>date</code> YAML front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>day</code></p>
</td>
<td>
<p>
Day from the post's filename. May be overridden via the documents
<code>date</code> YAML front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>i_day</code></p>
</td>
<td>
<p>
Day without leading zeros from the post's filename. May be overridden
via the documents <code>date</code> YAML front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>y_day</code></p>
</td>_
<td>
<p>Day of the year from the post's filename, with leading zeros.</p>
</td>
</tr>
<tr>
<td>
<p><code>short_year</code></p>
</td>
<td>
<p>
Year without the century from the post's filename. May be overridden
via the documents <code>date</code> YAML front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>hour</code></p>
</td>
<td>
<p>
Hour of the day, 24-hour clock, zero-padded from the post's
<code>date</code> front matter. (00..23)
</p>
</td>
</tr>
<tr>
<td>
<p><code>minute</code></p>
</td>
<td>
<p>
Minute of the hour from the post's <code>date</code> front matter. (00..59)
</p>
</td>
</tr>
<tr>
<td>
<p><code>second</code></p>
</td>
<td>
<p>
Second of the minute from the post's <code>date</code> front matter. (00..59)
</p>
</td>
</tr>
<tr>
<td>
<p><code>title</code></p>
</td>
<td>
<p>
Title from the documents filename. May be overridden via
the documents <code>slug</code> YAML front matter.
</p>
</td>
</tr>
<tr>
<td>
<p><code>slug</code></p>
</td>
<td>
<p>
Slugified title from the documents filename (any character
except numbers and letters is replaced as hyphen). May be
overridden via the documents <code>slug</code> YAML front matter.
</p>
</td>
</tr>
<tr>
<td>
<p><code>categories</code></p>
</td>
<td>
<p>
The specified categories for this post. If a post has multiple
categories, Jekyll will create a hierarchy (e.g. <code>/category1/category2</code>).
Also Jekyll automatically parses out double slashes in the URLs,
so if no categories are present, it will ignore this.
</p>
</td>
</tr>
</tbody>
</table>
</div>
Note that all template variables relating to time or categories are available to posts only.
## Built-in permalink styles {#builtinpermalinkstyles}
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">
<table>
<thead>
<tr>
<th>Permalink Style</th>
<th>URL Template</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>date</code></p>
</td>
<td>
<p><code>/:categories/:year/:month/:day/:title:output_ext</code></p>
</td>
</tr>
<tr>
<td>
<p><code>pretty</code></p>
</td>
<td>
<p><code>/:categories/:year/:month/:day/:title/</code></p>
</td>
</tr>
<tr>
<td>
<p><code>ordinal</code></p>
</td>
<td>
<p><code>/:categories/:year/:y_day/:title:output_ext</code></p>
</td>
</tr>
<tr>
<td>
<p><code>none</code></p>
</td>
<td>
<p><code>/:categories/:title:output_ext</code></p>
</td>
</tr>
</tbody>
</table>
</div>
Rather than typing `permalink: /:categories/:year/:month/:day/:title/`, you can just type `permalink: pretty`.
<div class="note info">
<h5>Specifying permalinks through the YAML Front Matter</h5>
<p>Built-in permalink styles are not recognized in YAML Front Matter. As a result, <code>permalink: pretty</code> will not work.</p>
</div>
## Permalink style examples with posts {#permalink-style-examples}
Here are a few examples to clarify how permalink styles get applied with posts.
Given a post named: `/2009-04-29-slap-chop.md`
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>URL Template</th>
<th>Resulting Permalink URL</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>None specified, or <code>permalink: date</code></p>
</td>
<td>
<p><code>/2009/04/29/slap-chop.html</code></p>
</td>
</tr>
<tr>
<td>
<p><code>pretty</code></p>
</td>
<td>
<p><code>/2009/04/29/slap-chop/</code></p>
</td>
</tr>
<tr>
<td>
<p><code>/:month-:day-:year/:title:output_ext</code></p>
</td>
<td>
<p><code>/04-29-2009/slap-chop.html</code></p>
</td>
</tr>
<tr>
<td>
<p><code>/blog/:year/:month/:day/:title/</code></p>
</td>
<td>
<p><code>/blog/2009/04/29/slap-chop/</code></p>
</td>
</tr>
<tr>
<td>
<p><code>/:year/:month/:title</code></p>
<p>See <a href="#extensionless-permalinks">Extensionless permalinks with no trailing slashes</a> for details.</p>
</td>
<td>
<p><code>/2009/04/slap-chop</code></p>
</td>
</tr>
</tbody>
</table>
</div>
## Permalink settings for pages and collections {#pages-and-collections}
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.
For example:
* A permalink style of `/:categories/:year/:month/:day/:title:output_ext` 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 (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:
```yaml
---
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
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:
{% highlight apache %}
Options +MultiViews
{% endhighlight %}
### Nginx
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.
{% highlight nginx %}
try_files $uri $uri.html $uri/ =404;
{% 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,53 +0,0 @@
---
title: Quick-start guide
permalink: /docs/quickstart/
---
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
gem install jekyll bundler
# Create a new Jekyll site at ./myblog
jekyll new myblog
# Change into your new directory
cd myblog
# Build the site on the preview server
bundle exec jekyll serve
# Now browse to http://localhost:4000
```
If you encounter any unexpected errors during the above, please refer to the [troubleshooting](/docs/troubleshooting/#configuration-problems) page or the already-mentioned [requirements](/docs/installation/#requirements) page, as you might be missing development headers or other prerequisites.
## About Bundler
`gem install bundler` installs the [bundler](https://rubygems.org/gems/bundler) gem through [RubyGems](https://rubygems.org/). You only need to install it once &mdash; not every time you create a new Jekyll project. Here are some additional details:
* `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.
* 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`.
* 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.
For more information about how to use Bundler in your Jekyll project, this [tutorial](https://jekyllrb.com/tutorials/using-jekyll-with-bundler/) should provide answers to the most common questions and explain how to get up and running quickly.
## 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,62 +0,0 @@
---
title: Resources
permalink: /docs/resources/
---
Jekyll's growing use is producing a wide variety of tutorials, frameworks, extensions, examples, and other resources that can be very helpful. Below is a collection of links to some of the most popular Jekyll resources.
## Editors
- [jekyll-atom](https://atom.io/packages/jekyll): A collection of snippets and tools for Jekyll in Atom
- [markdown-writer](https://atom.io/packages/markdown-writer): An Atom package for Jekyll. It can create new posts/drafts, manage tags/categories, insert link/images and add many useful key mappings.
- [sublime-jekyll](https://github.com/23maverick23/sublime-jekyll): A Sublime Text package for Jekyll static sites. This package should help creating Jekyll sites and posts easier by providing access to key template tags and filters, as well as common completions and a current date/datetime command (for dating posts). You can install this package manually via GitHub, or via [Package Control](https://packagecontrol.io/packages/Jekyll).
- [vim-jekyll](https://github.com/parkr/vim-jekyll): A vim plugin to generate new posts and run `jekyll build` all without leaving vim.
- [WordPress2Jekyll](https://wordpress.org/plugins/wp2jekyll/): A WordPress plugin that allows you to use WordPress as your editor and (automatically) export content in to Jekyll. WordPress2Jekyll attempts to marry these two systems together in order to make a site that can be easily managed from all devices.
## Useful Guides
- [CloudCannon Academy](https://learn.cloudcannon.com/) is a set of resources created by [CloudCannon](https://cloudcannon.com/) to help folks get up and running with Jekyll. They cover all skill levels, and even include some great video tutorials.
- [Jekyll Cheatsheet](https://learn.cloudcannon.com/jekyll-cheat-sheet/) is a single-page resource for Jekyll filters, variables, and the like.
- ["Creating and Hosting a Personal Site on GitHub"](http://jmcglone.com/guides/github-pages/)
- ['Build A Blog With Jekyll And GitHub Pages' on Smashing Magazine](https://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/)
- Publishing to GitHub Pages? [Check out our documentation page for just that purpose](/docs/github-pages/).
- [Blogging with Git, Emacs and Jekyll](https://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/)
- [Tips for working with GitHub Pages Integration](https://gist.github.com/jedschneider/2890453)
## Integrations
- Use a SaaS service as a backend for forms (contact forms, hiring forms, etc.)
- [Formspree (open source)](https://formspree.io/)
- [FormKeep](https://formkeep.com/guides/contact-form-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll)
- [Simple Form](https://getsimpleform.com/)
- [Formingo](https://www.formingo.co/guides/jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=Jekyll%20Documentation)
- [Formester](http://www.formester.com)
- [Talkyard](https://www.talkyard.io/blog-comments): Embedded comments for Jekyll and others (free and open source, or hosted serverless)
- [Staticman](https://staticman.net): Add user-generated content to a Jekyll site (free and open source)
- [Snipcart](https://snipcart.com/blog/static-site-e-commerce-part-2-integrating-snipcart-with-jekyll): Add a shopping cart to a Jekyll site
- [Contentful](https://www.contentful.com/ecosystem/jekyll/): use Jekyll together with the API-driven Contentful CMS.
- [Algolia](https://blog.algolia.com/instant-search-blog-documentation-jekyll-plugin/): Add a powerful instant search to your Jekyll site
## Other commentary
- [How I'm using Jekyll in 2016](https://mademistakes.com/articles/using-jekyll-2016/)
- [Talkyard comments instructions for Jekyll](https://jekyll-demo.talkyard.io/2018/01/09/installation-instructions.html)
- [Static Comments with Jekyll & Staticman](https://mademistakes.com/articles/improving-jekyll-static-comments/)
- [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/05/adding-ajax-pagination-to-jekyll.html)
- ['My Jekyll Fork', by Mike West](https://mikewest.org/2009/11/my-jekyll-fork)
> "Jekyll is a well-architected throwback to a time before WordPress, when men were men, and HTML was static. I like the ideas it espouses, and have made a few improvements to it's core. Here, I'll point out some highlights of my fork in the hopes that they see usage beyond this site."
- ['About this Website', by Carter Allen](http://cartera.me/2010/08/12/about-this-website/)
> "Jekyll is everything that I ever wanted in a blogging engine. Really. It isn't perfect, but what's excellent about it is that if there's something wrong, I know exactly how it works and how to fix it. It runs on the your machine only, and is essentially an added"build" step between you and the browser. I coded this entire site in TextMate using standard HTML5 and CSS3, and then at the end I added just a few little variables to the markup. Presto-chango, my site is built and I am at peace with the world."
- [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/) A guide to implementing a tag cloud and per-tag content pages using Jekyll.
- A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
- [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)

View File

@@ -1,100 +0,0 @@
---
title: Static Files
permalink: /docs/static-files/
---
In addition to renderable and convertible content, we also have **static
files**.
A static file is a file that does not contain any YAML front matter. These
include images, PDFs, and other un-rendered content.
They're accessible in Liquid via `site.static_files` and contain the
following metadata:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><p><code>file.path</code></p></td>
<td><p>
The relative path to the file, e.g. <code>/assets/img/image.jpg</code>
</p></td>
</tr>
<tr>
<td><p><code>file.modified_time</code></p></td>
<td><p>
The `Time` the file was last modified, e.g. <code>2016-04-01 16:35:26 +0200</code>
</p></td>
</tr>
<tr>
<td><p><code>file.name</code></p></td>
<td><p>
The string name of the file e.g. <code>image.jpg</code> for <code>image.jpg</code>
</p></td>
</tr>
<tr>
<td><p><code>file.basename</code></p></td>
<td><p>
The string basename of the file e.g. <code>image</code> for <code>image.jpg</code>
</p></td>
</tr>
<tr>
<td><p><code>file.extname</code></p></td>
<td><p>
The extension name for the file, e.g.
<code>.jpg</code> for <code>image.jpg</code>
</p></td>
</tr>
</tbody>
</table>
</div>
Note that in the above table, `file` can be anything. It's simply an arbitrarily set variable used in your own logic (such as in a for loop). It isn't a global site or page variable.
## Add front matter to static files
Although you can't directly add front matter values to static files, you can set front matter values through the [defaults property](../configuration/#front-matter-defaults) in your configuration file. When Jekyll builds the site, it will use the front matter values you set.
Here's an example:
In your `_config.yml` file, add the following values to the `defaults` property:
```yaml
defaults:
- scope:
path: "assets/img"
values:
image: true
```
This assumes that your Jekyll site has a folder path of `assets/img` where you have images (static files) stored. When Jekyll builds the site, it will treat each image as if it had the front matter value of `image: true`.
Suppose you want to list all your image assets as contained in `assets/img`. You could use this for loop to look in the `static_files` object and get all static files that have this front matter property:
{% raw %}
```liquid
{% assign image_files = site.static_files | where: "image", true %}
{% for myimage in image_files %}
{{ myimage.path }}
{% endfor %}
```
{% endraw %}
When you build your site, the output will list the path to each file that meets this front matter condition.

View File

@@ -1,24 +0,0 @@
---
title: Support
permalink: "/docs/support/"
note: This file is autogenerated. Edit /.github/SUPPORT.markdown instead.
---
## Getting Help
**Jekyll's issue tracker is not a support forum.**
If you're looking for support for Jekyll, there are a lot of options:
* Read [Jekyll Documentation](https://jekyllrb.com/docs/home/)
* If you have a question about using Jekyll, start a discussion on [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll)
* Chat with Jekyllers &mdash; Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc:irc.freenode.net/jekyll)
There are a bunch of helpful community members on these services that should be willing to point you in the right direction.
## Report a bug
* If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository &mdash; First [look for the plugin on rubygems](https://rubygems.org/) then click on the `Homepage` link to access the plugin repository.
* If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new).
Happy Jekyllin'!

View File

@@ -1,316 +0,0 @@
---
title: Themes
permalink: /docs/themes/
---
Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes specify plugins and package up assets, layouts, includes, and stylesheets in a way that can be overridden by your site's content.
## Understanding gem-based themes
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).
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.
In the case of Minima, you see only the following files in your Jekyll site directory:
```
├── Gemfile
├── Gemfile.lock
├── _config.yml
├── _posts
│ └── 2016-12-04-welcome-to-jekyll.markdown
├── about.markdown
└── index.markdown
```
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.
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
Jekyll themes set default layouts, includes, and stylesheets. However, you can override any of the theme defaults with your own site content.
To replace layouts or includes in your theme, make a copy in your `_layouts` or `_includes` directory of the specific file you wish to modify, or create the file from scratch giving it the same name as the file you wish to override.
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`).
To locate a theme's files on your computer:
1. Run `bundle show` followed by the name of the theme's gem, e.g., `bundle show minima` for Jekyll's default theme.
This returns the location of the gem-based theme files. For example, the Minima theme's files might be 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:
```sh
# On MacOS
open $(bundle show minima)
# On Windows
explorer /usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0
# On Linux
xdg-open $(bundle show minima)
```
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, for a second example, 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.
To modify any stylesheet you must take the extra step of also copying the main sass file (`_sass/minima.scss` in the Minima theme) into the `_sass` directory in your site's source.
Jekyll will look first to your site's content before looking to the theme's defaults for any requested file in the following folders:
- `/assets`
- `/_layouts`
- `/_includes`
- `/_sass`
Note that making copies of theme files will prevent you from receiving any theme updates on those files. An alternative, to continue getting theme updates on all stylesheets, is to use higher specificity CSS selectors in your own additional, originally named CSS files.
Refer to your selected theme's documentation and source repository for more information on what files you can override.
{: .note .info}
## 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 you must tell Jekyll about the plugins that were referenced by the theme. You can find these plugins in the theme's gemspec file as runtime dependencies. If you were converting the Minima theme, for example, you might see:
```
spec.add_runtime_dependency "jekyll-feed", "~> 0.9"
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1"
```
You should include these references in the `Gemfile` in one of two ways.
You could list them individually in both `Gemfile` and `_config.yml`.
```ruby
# ./Gemfile
gem "jekyll-feed", "~> 0.9"
gem "jekyll-seo-tag", "~> 2.1"
```
```yaml
# ./_config.yml
plugins:
- jekyll-feed
- jekyll-seo-tag
```
Or you could list them explicitly as Jekyll plugins in your Gemfile, and not update `_config.yml`, like this:
```ruby
# ./Gemfile
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.9"
gem "jekyll-seo-tag", "~> 2.1"
end
```
Either way, don't forget to `bundle update`.
However, if you're publishing on GitHub Pages you should update only your `_config.yml` as GitHub Pages doesn't load plugins via Bundler.
Finally, 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 gem to your site's `Gemfile`:
```ruby
# ./Gemfile
# This is an example, declare the theme gem you want to use here
gem "jekyll-theme-minimal"
```
Or if you've started with the `jekyll new` command, replace `gem "minima", "~> 2.0"` with the gem you want, e.g:
```diff
# ./Gemfile
- gem "minima", "~> 2.0"
+ gem "jekyll-theme-minimal"
```
2. Install the theme:
```sh
bundle install
```
3. Add the following to your site's `_config.yml` to activate the theme:
```yaml
theme: jekyll-theme-minimal
```
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](https://pages.github.com/themes/). GitHub Pages also supports [using any theme hosted on GitHub](https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site/#adding-a-jekyll-theme-in-your-sites-_configyml-file) using the `remote_theme` configuration as if it were a gem-based theme.
## 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
jekyll new-theme jekyll-theme-awesome
create /path/to/jekyll-theme-awesome/_layouts
create /path/to/jekyll-theme-awesome/_includes
create /path/to/jekyll-theme-awesome/_sass
create /path/to/jekyll-theme-awesome/_layouts/page.html
create /path/to/jekyll-theme-awesome/_layouts/post.html
create /path/to/jekyll-theme-awesome/_layouts/default.html
create /path/to/jekyll-theme-awesome/Gemfile
create /path/to/jekyll-theme-awesome/jekyll-theme-awesome.gemspec
create /path/to/jekyll-theme-awesome/README.md
create /path/to/jekyll-theme-awesome/LICENSE.txt
initialize /path/to/jekyll-theme-awesome/.git
create /path/to/jekyll-theme-awesome/.gitignore
Your new Jekyll theme, jekyll-theme-awesome, is ready for you in /path/to/jekyll-theme-awesome!
For help getting started, read /path/to/jekyll-theme-awesome/README.md.
```
Add your template files in the corresponding folders. Then complete the `.gemspec` and the README files according to your needs.
### 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.
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
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.
### Stylesheets
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.
{% raw %}
```css
@import "{{ site.theme }}";
```
{% endraw %}
### Theme-gem dependencies {%- include docs_version_badge.html version="3.5.0" -%}
Jekyll will automatically require all whitelisted `runtime_dependencies` of your theme-gem even if they're not explicitly included under the `plugins` array in the site's config file. (Note: whitelisting is only required when building or serving with the `--safe` option.)
With this, the end-user need not keep track of the plugins required to be included in their config file for their theme-gem to work as intended.
### Documenting your theme
Your theme should include a `/README.md` file, which explains how site authors can install and use your theme. What layouts are included? What includes? Do they need to add anything special to their site's configuration file?
### Adding a screenshot
Themes are visual. Show users what your theme looks like by including a screenshot as `/screenshot.png` within your theme's repository where it can be retrieved programmatically. You can also include this screenshot within your theme's documentation.
### Previewing your theme
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.
{: .info .note}
### Publishing your theme
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, you need to have it in a git repository:
```sh
git init # Only the first time
git add -A
git commit -m "Init commit"
```
2. Next, package your theme, by running the following command, replacing `jekyll-theme-awesome` with the name of your theme:
```sh
gem build jekyll-theme-awesome.gemspec
```
3. Finally, 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:
```sh
gem push jekyll-theme-awesome-*.gem
```
4. 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 - 3 above. We recommend that you follow [Semantic Versioning](http://semver.org/) while bumping your theme-version.

View File

@@ -1,29 +0,0 @@
---
layout: docs
title: Upgrading
permalink: /docs/upgrading/
---
Upgrading from an older version of Jekyll? Upgrading to a new major version of
Jekyll (e.g. from v2.x to v3.x) may cause some headaches. Take the following
guides to aid your upgrade:
- [From 0.x to 1.x and 2.x](/docs/upgrading/0-to-2/)
- [From 2.x to 3.x](/docs/upgrading/2-to-3/)
## Minor updates
<div class="note">
<h5>Stay Up to Date</h5>
<p>We recommend you update Jekyll as often as possible to benefit from
the latest bug fixes.
</p>
</div>
If you followed our setup recommendations and installed [Bundler](http://bundler.io/), run `bundle update jekyll` or simply `bundle update` and all your gems will
update to the latest versions.
If you don't have Bundler installed, run `gem update jekyll`.
The procedure is similar [if you use the `github-pages`
gem](https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/#keeping-your-site-up-to-date-with-the-github-pages-gem).

View File

@@ -1,51 +0,0 @@
---
title: Upgrading from 3.x to 4.x
permalink: /docs/upgrading/3-to-4/
---
Upgrading from an older version of Jekyll? A few things have changed in Jekyll 4
that you'll want to know about.
Before we dive in, you need to have at least Ruby 2.3.0 installed. Run the following
in your terminal to check
```sh
ruby -v
```
If you're using Ruby >= 2.3.0, go ahead and fetch the latest version of Jekyll:
```sh
gem update jekyll
```
### Template rendering
We've slightly altered the way Jekyll parses and renders your various templates to improve
the overall build times. Jekyll now parses a template once, caches it internally and then
renders the parsed template multiple times as required by your pages and documents.
The downside to this is that some of the community-authored plugins may not work as they
previously used to.
#### For Plugin-authors
* If your plugin depends on the following code: `site.liquid_renderer.file(path).parse(content)`,
note that the return value (`template`, an instance of *`Liquid::Template`*), from that line will
always be the **same object** for a given `path`. <br/>
The *`template`* instance is then rendered as previously, with respect to the `payload` passed to it.
You'll therefore have to ensure that *`payload`* is not memoized or cached in your plugin instance.
* If its a requirement that `template` you get from the above step *be different* at all times,
you can invoke *`Liquid::Template`* directly:
```diff
- template = site.liquid_renderer.file(path).parse(content)
+ template = Liquid::Template.parse(content)
```
---
*Did we miss something? Please click "Improve this page" above and add a section. Thanks!*

View File

@@ -1,138 +0,0 @@
---
title: Jekyll on Windows
permalink: /docs/windows/
---
While Windows is not an officially-supported platform, it can be used to run Jekyll with the proper tweaks. This page aims to collect some of the general knowledge and lessons that have been unearthed by Windows users.
## Installing Jekyll
The easiest way to run Jekyll is by using the [RubyInstaller][] for Windows.
### Installation via RubyInstaller
[RubyInstaller][] is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
We only cover RubyInstaller-2.4 and newer here, older versions need to [install the Devkit][Devkit-install] manually.
1. Download and Install a **Ruby+Devkit** version from [RubyInstaller Downloads][RubyInstaller-downloads].
Use default options for installation.
2. Open a new command prompt window from the start menu, so that changes to the `PATH` environment variable becomes effective.
Install Jekyll and Bundler via: `gem install jekyll bundler`
3. Check if Jekyll installed properly: `jekyll -v`
That's it, you're ready to install our [default minimal blog theme](https://github.com/jekyll/minima) with `jekyll new jekyll-website`.
[RubyInstaller]: https://rubyinstaller.org/
[RubyInstaller-downloads]: https://rubyinstaller.org/downloads/
[Devkit-install]: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
### Encoding
If you use UTF-8 encoding, make sure that no `BOM` header characters exist in your files or very, very bad things will happen to
Jekyll. This is especially relevant when you're running Jekyll on Windows.
Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command:
```sh
chcp 65001
```
### Time-Zone 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.
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][IANA-database].
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
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
```
[IANA-database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
### Auto Regeneration
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve. While `listen` has built-in support for UNIX systems, it may require an extra gem for compatibility with Windows.
Add the following to the Gemfile for your site if you have issues with auto-regeneration on Windows alone:
```ruby
gem 'wdm', '~> 0.1.1' if Gem.win_platform?
```
You have to use a [Ruby+Devkit](https://rubyinstaller.org/downloads/) version of the RubyInstaller.
## Installation via Bash on Windows 10
If you are using Windows 10 version 1607 or later, another option to run Jekyll is by [installing][WSL-Guide] the Windows Subsystem for Linux.
*Note:* You must have [Windows Subsystem for Linux][BASH-WSL] enabled.
First let's make sure all our packages / repositories are up to date. Open a new Command Prompt instance, and type the following:
```sh
bash
```
Your Command Prompt instance should now be a Bash instance. Now we must update our repo lists and packages.
```sh
sudo apt-get update -y && sudo apt-get upgrade -y
```
Now we can install Ruby. To do this we will use a repository from [BrightBox](https://www.brightbox.com/docs/ruby/ubuntu/), which hosts optimized versions of Ruby for Ubuntu.
```sh
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.4 ruby2.4-dev build-essential dh-autoreconf
```
Next let's update our Ruby gems:
```sh
sudo gem update
```
Now all that is left to do is install Jekyll.
```sh
sudo gem install jekyll bundler
```
Check if Jekyll installed properly by running:
```sh
jekyll -v
```
Configure the bundler/gem path so bundle doesn't prompt for sudo
```sh
bundle config path vendor/bundle
```
**And that's it!**
To start a new project named `my_blog`, just run:
```sh
jekyll new my_blog
```
You can make sure time management is working properly by inspecting your `_posts` folder. You should see a markdown file with the current date in the filename.
<div class="note info">
<h5>Non-superuser account issues</h5>
<p>If the `jekyll new` command prints the error "Your user account isn't allowed to install to the system RubyGems", see the "Running Jekyll as Non-Superuser" instructions in <a href="/docs/troubleshooting/#no-sudo">Troubleshooting</a>.</p>
</div>
**Note:** Bash on Ubuntu on Windows is still under development, so you may run into issues.
[WSL-Guide]: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
[BASH-WSL]: https://msdn.microsoft.com/en-us/commandline/wsl/about

View File

@@ -1,13 +0,0 @@
{% if site.google_analytics_id %}
<!-- Google Analytics (https://www.google.com/analytics) -->
<script>
!function(j,e,k,y,l,L){j.GoogleAnalyticsObject=y,j[y]||(j[y]=function(){
(j[y].q=j[y].q||[]).push(arguments)}),j[y].l=+new Date,l=e.createElement(k),
L=e.getElementsByTagName(k)[0],l.src='https://www.google-analytics.com/analytics.js',
L.parentNode.insertBefore(l,L)}(window,document,'script','ga');
ga('create', '{{ site.google_analytics_id }}', 'jekyllrb.com');
ga('send', 'pageview');
</script>
{% endif %}

View File

@@ -1 +0,0 @@
<span class="version-badge" title="This feature is available starting version {{ include.version }}">{{ include.version }}</span>

View File

@@ -1,31 +0,0 @@
<header>
<div class="flexbox">
<div class="center-on-mobiles">
<h1>
<a href="/" class="logo">
<span class="sr-only">Jekyll</span>
<img src="/img/logo-2x.png" width="140" height="65" alt="Jekyll Logo">
</a>
</h1>
</div>
<nav class="main-nav hide-on-mobiles">
{% include primary-nav-items.html %}
</nav>
<div class="search hide-on-mobiles">
{% include search/input.html %}
</div>
<div class="meta hide-on-mobiles">
<ul>
<li>
<a href="{{ site.repository }}/releases/tag/v{{ site.version }}">v{{ site.version }}</a>
</li>
<li>
<a href="{{ site.repository }}">GitHub</a>
</li>
</ul>
</div>
</div>
<nav class="mobile-nav show-on-mobiles">
{% include mobile-nav-items.html %}
</nav>
</header>

View File

@@ -1,14 +0,0 @@
<ul>
<li class="{% if page.overview %}current{% endif %}">
<a href="/">Home</a>
</li>
<li class="{% if page.url contains '/docs/' %}current{% endif %}">
<a href="/docs/home/">Docs</a>
</li>
<li class="{% if page.author %}current{% endif %}">
<a href="/news/">News</a>
</li>
<li class="{% if page.url contains '/help/' %}current{% endif %}">
<a href="/help/">Help</a>
</li>
</ul>

View File

@@ -1 +0,0 @@
<input type="text" id="docsearch-input" placeholder="Search the docs…">

View File

@@ -1,9 +0,0 @@
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '50fe39c839958dfad797000f33e2ec17',
indexName: 'jekyllrb',
inputSelector: '#docsearch-input',
enhancedSearchInput: true,
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>

View File

@@ -1,39 +0,0 @@
{% comment %}
Map grabs the tutorials sections, giving us an array of arrays. Join, flattens all
the items to a comma delimited string. Split turns it into an array again.
{% endcomment %}
{% assign tutorials = site.data.tutorials | map: 'tutorials' | join: ',' | split: ',' %}
{% comment %}
Because this is built for every page, lets find where we are in the ordered
document list by comparing url strings. Then if there's something previous or
next, lets build a link to it.
{% endcomment %}
{% for tutorial in tutorials %}
{% assign tutorial_url = tutorial | prepend:"/tutorials/" | append:"/" %}
{% if tutorial_url == page.url %}
<div class="section-nav">
<div class="left align-right">
{% if forloop.first %}
<span class="prev disabled">Back</span>
{% else %}
{% assign previous = forloop.index0 | minus: 1 %}
{% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" %}
<a href="{{ previous_page }}" class="prev">Back</a>
{% endif %}
</div>
<div class="right align-left">
{% if forloop.last %}
<span class="next disabled">Next</span>
{% else %}
{% assign next = forloop.index0 | plus: 1 %}
{% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" %}
<a href="{{ next_page }}" class="next">Next</a>
{% endif %}
</div>
</div>
<div class="clear"></div>
{% break %}
{% endif %}
{% endfor %}

View File

@@ -1,10 +0,0 @@
<div class="unit one-fifth hide-on-mobiles">
<aside>
{% for section in site.data.tutorials %}
<h4>{{ section.title }}</h4>
{% include tutorials_ul.html items=section.tutorials %}
{% endfor %}
</aside>
</div>

View File

@@ -1,10 +0,0 @@
<div class="docs-nav-mobile unit whole show-on-mobiles">
<select onchange="if (this.value) window.location.href=this.value">
<option value="">Navigate the tutorials…</option>
{% for section in site.data.tutorials %}
<optgroup label="{{ section.title }}">
{% include tutorials_option.html items=section.tutorials %}
</optgroup>
{% endfor %}
</select>
</div>

View File

@@ -1,5 +0,0 @@
{% for item in include.items %}
{% assign item_url = item | prepend:"/tutorials/" | append:"/" %}
{% assign tutorial = site.tutorials | where: "url", item_url | first %}
<option value="{{ tutorial.url }}">{{ tutorial.title }}</option>
{% endfor %}

View File

@@ -1,7 +0,0 @@
<ul>
{% for item in include.items %}
{% assign item_url = item | prepend:"/tutorials/" | append:"/" %}
{% assign p = site.tutorials | where:"url", item_url | first %}
<li class="{% if item_url == page.url %}current{% endif %}"><a href="{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
</ul>

View File

@@ -1,27 +0,0 @@
---
layout: default
---
<section class="docs">
<div class="grid">
{% include tutorials_contents_mobile.html %}
<div class="unit four-fifths">
<article>
<div class="improve right hide-on-mobiles">
<a href="https://github.com/jekyll/jekyll/edit/master/docs/{{ page.path }}"><i
class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
<h1>{{ page.title }}</h1>
{{ content }}
{% include section_nav_tutorials.html %}
</article>
</div>
{% include tutorials_contents.html %}
<div class="clear"></div>
</div>
</section>

View File

@@ -1,23 +0,0 @@
---
title: "Jekyll 1.1.1 Released"
date: "2013-07-24 22:24:14 +0200"
author: parkr
version: 1.1.1
categories: [release]
---
Coming just 10 days after the release of v1.1.0, v1.1.1 is out with a patch for
the nasty excerpt inception bug ([#1339]({{ site.repository }}/issues/1339)) and
non-zero exit codes for invalid commands ([#1338]({{ site.repository
}}/issues/1338)).
To all those affected by the [strange excerpt bug in v1.1.0]({{ site.repository
}}/issues/1321), I'm sorry. I think we have it all patched up and it should be
deployed to [GitHub Pages](https://pages.github.com/) in the next couple weeks.
Thank you for your patience!
If you're checking out v1.1.x for the first time, definitely check out [what
shipped with v1.1.0!]({{ site.repository }}/releases/tag/v1.1.0)
See the [GitHub Release]({{ site.repository }}/releases/tag/v1.1.1) page for
more a more detailed changelog for this release.

View File

@@ -1,18 +0,0 @@
---
title: 'Jekyll 3.3.1 Released'
date: 2016-11-14 14:29:59 -0800
author: parkr
version: 3.3.1
categories: [release]
---
Hello! We have a bugfix release of Jekyll hot off the presses for you. Key
fixes to call out:
1. Only warn about auto-regeneration issues on Windows instead of disabling
2. Exclude very specific `vendor/` subdirectories instead of all of `vendor/`
3. Allow permalink templates to have plaintext underscores
..and lots more! Check out the [full history for more](/docs/history/#v3-3-1).
Happy Jekylling!

View File

@@ -1,42 +0,0 @@
---
title: 'Jekyll turns 3.4.0'
date: 2017-01-18 14:19:13 -0500
author: parkr
version: 3.4.0
categories: [release]
---
Hey there! We have a quick update of Jekyll for you to enjoy this January.
Packed full of bug fixes as usual, thanks to the tireless efforts of our
exceptional Jekyll community. Three changes to call out:
1. If you're a big fan of [`where_by_exp`](/docs/templates/#filters), you'll be an
even bigger fan of [`group_by_exp`](/docs/templates/#filters).
2. Using a custom timezone in Jekyll on Windows? Yeah, sorry that hasn't ever worked
properly. We made it possible to accurately [set the timezone using IANA
timezone codes](https://jekyllrb.com/docs/windows/#timezone-management).
3. Documentation has been improved, notably on themes, includes and permalinks.
And [lots and lots more!](/docs/history/#v3-4-0)
This update was made possible by the dedicated efforts of our excellent
contributors: Ajay Karwal, Alexey Rogachev, Ashwin Maroli,
BlueberryFoxtrot, Chase, Chayoung You, Dean Attali, Dmitrii Evdokimov, Don
Denton, Eldritch Cheese, Fabrice Laporte, Florian Thomas, Frank
Taillandier, Hugo, Ivan Dmitrievsky, Joel Meyer-Hamme, Josh Habdas, Kenton
Hansen, Kevin Wojniak, Kurt Anderson, Longwelwind, Max Chadwick, Nicolas
Hoizey, Nursen, Parker Moore, Pat Hawks, Purplecarrot, Ricardo N Feliciano,
Rob Crocombe, Roger Ogden, Skylar Challand, Thiago Arrais, Tim Banks, Tom
Johnson, Tunghsiao Liu, XhmikosR, Zlatan Vasović, alexmalik, brainscript,
kimbaudi, muratayusuke, penny, and yoostk.
As always, if you encounter bugs, please do [search the issues]({{ site.repository }}/issues)
and [file an issue]({{ site.repository }}/issues/new) if you aren't able to
find a resolution. We also have [our Jekyll Talk
forum](https://talk.jekyllrb.com) for those of you with general questions
about how to accomplish certain tasks with Jekyll.
We have some exciting updates in store for v3.5, and we're hard at work on
those already.
Happy Jekylling!

View File

@@ -1,106 +0,0 @@
---
title: 'Jekyll 3.4.1, or "Unintended Consequences"'
date: 2017-03-02 14:20:26 -0500
author: parkr
version: 3.4.1
categories: [release]
---
Conformity is a confounding thing.
We write tests to ensure that a piece of functionality that works today
will work tomorrow, as further modifications are made to the codebase. This
is a principle of modern software development: every change must have a
test to guard against regressions to the functionality implemented by that
change.
And yet, occasionally, our very best efforts to test functionality will be
thwarted. This is because of how our code produces unintended
functionality, which naturally goes untested.
In our documentation, we tell users to name their posts with the following
format:
```text
YYYY-MM-DD-title.extension
```
That format specifies exactly four numbers for the year, e.g. 2017, two
letters for the month, e.g. 03, and two letters for the day, e.g. 02. To
match this, we had the following regular expression:
```ruby
%r!^(?:.+/)*(\d+-\d+-\d+)-(.*)(\.[^.]+)$!
```
You might already see the punchline. While our documentation specifies the
exact number of numbers that is required for each section of the date, our
regular expression does not enforce this precision. What happens if a user
doesn't conform to our documentation?
We recently [received a bug report](https://github.com/jekyll/jekyll/issues/5603)
that detailed how the following file was considered a post:
```text
84093135-42842323-42000001-b890-136270f7e5f1.md
```
Of course! It matches the above regular expression, but doesn't satisfy
other requirements about those numbers being a valid date (unless you're
living in a world that has 43 million months, and 42 million (and one)
days). So, we [modified the regular expression to match our
documentation](https://github.com/jekyll/jekyll/pull/5609):
```ruby
%r!^(?:.+/)*(\d{4}-\d{2}-\d{2})-(.*)(\.[^.]+)$!
```
Our tests all passed and we were properly excluding this crazy date with 43
million months and days. This change shipped in Jekyll v3.4.0 and all was
well.
Well, not so much.
A very common way to specify the month of February is `2`. This is true for
all single-digit months and days of the month. Notice anything about our
first regular expression versus our second? The second regular expression
imposes a **minimum**, as well as maximum, number of digits. This change
made Jekyll ignore dates with single-digit days and months.
The first eight years of Jekyll's existence had allowed single-digit days
and months due to an imprecise regular expression. For some people, their
entire blog was missing, and there were no errors that told them why.
After receiving a few bug reports, it became clear what had happened.
Unintended functionality of the last eight years had been broken. Thus,
v3.4.0 was broken for a non-negligible number of sites. With a test site
in-hand from @andrewbanchich, I tracked it down to this regular expression
and [reintroduced](https://github.com/jekyll/jekyll/pull/5920) a proper
minimum number of digits for each segment:
```ruby
%r!^(?:.+/)*(\d{2,4}-\d{1,2}-\d{1,2})-(.*)(\.[^.]+)$!
```
And, I wrote a test.
This change was quickly backported to v3.4.0 and here we are: releasing
v3.4.1. It will fix the problem for all users who were using single-digit
months and days.
With this, I encourage all of you to look at your code for *unintended*
functionality and make a judgement call: if it's allowed, *should it be*?
If it should be allowed, make it *intended* functionality and test it! I
know I'll be looking at my code with much greater scrutiny going forward,
looking for unintended consequences.
Many thanks to our Jekyll affinity team captains who helped out, including
@pathawks, @pnn, and @DirtyF. Thanks, too, to @ashmaroli for reviewing my
change with an eye for consistency and precision. This was certainly a team
effort.
We hope Jekyll v3.4.1 brings your variable-digit dates back to their
previous glory. We certainly won't let that unintended functionality be
unintended any longer.
As always, Happy Jekylling!

View File

@@ -1,51 +0,0 @@
---
title: 'Jekyll 3.4.2 Released'
date: 2017-03-09 15:41:57 -0500
author: parkr
version: 3.4.2
categories: [release]
---
Another one-PR patch update, though without the same [lessons as for the
previous release]({% link _posts/2017-03-02-jekyll-3-4-1-released.markdown %}).
This release includes a beneficial change for a number of plugins:
**static files now respect front matter defaults**.
You might be asking yourself: "why would static files, files that are
static files explicitly because they *don't* have YAML front matter, want
to respect YAML front matter?" That's a great question. Let me illustrate
with an example.
Let's look at `jekyll-sitemap`. This plugin generates a list of documents,
pages, and static files, and some metadata for them in an XML file for a
Google/Yahoo/Bing/DuckDuckGo crawler to consume. If you don't want a given
file in this list, you set `sitemap: false` in the YAML front matter. But
what about static files, which don't have YAML front matter? Before this
release, they could not be excluded because they had no properties in YAML
other than [the ones we explicitly assigned](https://github.com/jekyll/jekyll/blob/v3.4.1/lib/jekyll/static_file.rb#L98-L106).
So if you had a PDF you didn't want to be in your sitemap, you couldn't use
`jekyll-sitemap`.
With this release, you can now set [front matter
defaults](/docs/configuration/#front-matter-defaults) for static files:
```yaml
defaults:
-
scope:
path: "pdfs/"
values:
sitemap: false
```
Now, for every file in the Liquid `site.static_files` loop which is in the
folder `pdfs/`, you'll see `sitemap` equal to `false`.
Many thanks to @benbalter for coming up with the solution and ensuring
sitemaps everywhere are filled with just the right content.
As always, if you notice any bugs, please search the issues and file one if
you can't find another related to your issue.
Happy Jekylling!

View File

@@ -1,49 +0,0 @@
---
title: 'Jekyll 3.4.3 Released'
date: 2017-03-21 08:52:53 -0500
author: pathawks
version: 3.4.3
categories: [release]
---
Another one-PR patch update as we continue our quest to destroy all bugs. A
fairly technical debriefing follows, but the TLDR is that we have updated the
`uri_escape` filter to more closely follow the pre-v3.4.0 behavior.
In [v3.4.0]({% link _posts/2017-01-18-jekyll-3-4-0-released.markdown %}), we
moved away from using the deprecated
[`URI.escape`](https://ruby-doc.org/stdlib-2.3.0/libdoc/uri/rdoc/URI/Escape.html#method-i-encode)
in favor of
[`Addressable::URI.encode`](http://www.rubydoc.info/gems/addressable/Addressable/URI#encode-class_method).
This is what powers our [`uri_escape`
filter](https://jekyllrb.com/docs/templates/).
While this transition was mostly a smooth one, the two methods are not
identical. While `URI.escape` was happy to escape any string,
`Addressable::URI.encode` first turns the string into an `Addressable::URI`
object, and will then escape each component of that object. In most cases, this
difference was insignificant, but there were a few cases where this caused some
unintended regressions when encoding colons.
While **Addressable** can understand that something like `"/example :page"` is a
relative URI, without the slash it cannot figure out how to turn
`"example :page"` into an `Addressable::URI` object. `URI.escape` had no such
objection. This lead to the following Liquid code working fine in Jekyll 3.3.x
but breaking in 3.4.0:
{% raw %}
```liquid
{{ "example :page" | uri_escape }}
```
{% endraw %}
This was not an intended consequence of switching to **Addressable**.
Fortunately, the solution was not complicated. **Addressable** has a method
[`Addressable::URI.normalize_component`](http://www.rubydoc.info/gems/addressable/Addressable/URI#normalize_component-class_method)
which will simply escape the characters in a string, much like `URI.escape`.
Thanks to @cameronmcefee and @FriesFlorian for reporting
[this issue](https://github.com/jekyll/jekyll/issues/5954).
Happy Jekylling!

View File

@@ -1,38 +0,0 @@
---
title: 'Jekyll turns 3.5, oh my!'
date: 2017-06-15 17:32:32 -0400
author: parkr
version: 3.5.0
categories: [release]
---
Good news! Nearly 400 commits later, Jekyll 3.5.0 has been released into
the wild. Some new shiny things you might want to test out:
- Jekyll now uses Liquid 4, the latest! It comes with whitespace control, new filters `concat` and `compact`, loop performance improvements and [many fixes](https://github.com/Shopify/liquid/blob/master/History.md#400--2016-12-14--branch-4-0-stable)
- Themes can specify runtime dependencies (in their gemspecs) and we'll require those. This makes it easier for theme writers to use plugins.
- Speaking of themes, we'll properly handle the discrepancy between a convertible file in the local site and a static file in the theme. Overriding a file locally now doesn't matter if it's convertible or static.
- Pages, posts, and other documents can now access layout variables via `{% raw %}{{ layout }}{% endraw %}`.
- The `gems` key in the `_config.yml` is now `plugins`. This is backwards-compatible, as Jekyll will gracefully upgrade `gems` to `plugins` if you use the former.
- Filters like `sort` now allow you to sort based on a subvalue, e.g. `{% raw %}{% assign sorted = site.posts | sort: "image.alt_text" %}{% endraw %}`.
- You can now create tab-separated data files.
- Using `layout: none` will now produce a file with no layout. Equivalent to `layout: null`, with the exception that `none` is a truthy value and won't be overwritten by front matter defaults.
- No more pesky errors if your URL contains a colon (sorry about those!)
- We now automatically exclude the `Gemfile` from the site manifest when compiling your site. No more `_site/Gemfile`!
- We fixed a bug where abbreviated post dates were ignored, e.g. `_posts/2016-4-4-april-fourth.md`.
And [so much more!](/docs/history/)
There was a huge amount of effort put into this release by our maintainers,
especially @pathawks, @DirtyF, and @pup. Huge thanks to them for ushering
this release along and keeping the contributions flowing! Jekyll wouldn't
work without the tireless dedication of our team captains & maintainers.
Thank you, all!
A huge thanks as well to our contributors to this release: Adam Hollett, Aleksander Kuś, Alfred Myers, Anatoliy Yastreb, Antonio Argote, Ashton Hellwig, Ashwin Maroli, Ben Balter, BlueberryFoxtrot, Brent Yi, Chris Finazzo, Christoph Päper, Christopher League, Chun Fei Lung, Colin, David Zhang, Eric Leong, Finn Ellis, Florian Thomas, Frank Taillandier, Hendrik Schneider, Henry Kobin, Ivan Storck, Jakub Klímek, Jan Pobořil, Jeff Puckett, Jonathan Hooper, Kaligule, Kevin Funk, Krzysztof Szafranek, Liu Cheng, Lukasz Brodowski, Marc Bruins, Marcelo Canina, Martin Desrumaux, Mer, Nate, Oreonax, Parker Moore, Pat Hawks, Pedro Lamas, Phil Nash, Ricardo N Feliciano, Ricky Han, Roger Sheen, Ryan Lue, Ryan Streur, Shane Neuville, Sven Meyer, Tom Johnson, William Entriken, Yury V. Zaytsev, Zarino Zappia, dyang, jekylltools, sean delaney, zenHeart
Please file any bugs with detailed replication instructions if you find any
bugs. Better yet, submit a patch if you find the bug in the code and know
how to fix it! :heart:
Happy Jekylling! :tada:

View File

@@ -1,19 +0,0 @@
---
title: 'Jekyll 3.5.1 Released'
date: 2017-07-17 12:40:37 -0400
author: parkr
version: 3.5.1
categories: [release]
---
We've released a few bugfixes in the form of v3.5.1 today:
- Some plugins stopped functioning properly due to a NoMethodError for `registers` on NilClass. That's been fixed.
- A bug in `relative_url` when `baseurl` is `nil` caused URL's to come out wrong. Squashed.
- Static files' liquid representations should now have all the keys you were expecting when serialized into JSON.
We apologize for the breakages! We're working diligently to improve how we test our plugins with Jekyll core to prevent breakages in the future.
More details in [the history](/docs/history/#v3-5-1). Many thanks to all the contributors to Jekyll v3.5.1: Adam Voss, ashmaroli, Ben Balter, Coby Chapple, Doug Beney, Fadhil, Florian Thomas, Frank Taillandier, James, jaybe, Joshua Byrd, Kevin Plattret, & Robert Jäschke.
Happy Jekylling!

View File

@@ -1,23 +0,0 @@
---
title: 'Jekyll 3.5.2 Released'
date: 2017-08-12 16:31:40 -0400
author: parkr
version: 3.5.2
categories: [release]
---
3.5.2 is out with 6 great bug fixes, most notably one which should dramatically speed up generation of your site! In testing #6266, jekyllrb.com generation when from 18 seconds down to 8! Here is the full line-up of fixes:
* Backport #6266 for v3.5.x: Memoize the return value of `Document#url` (#6301)
* Backport #6247 for v3.5.x: kramdown: symbolize keys in-place (#6303)
* Backport #6281 for v3.5.x: Fix `Drop#key?` so it can handle a nil argument (#6288)
* Backport #6280 for v3.5.x: Guard against type error in `absolute_url` (#6287)
* Backport #6273 for v3.5.x: delegate `StaticFile#to_json` to `StaticFile#to_liquid` (#6302)
* Backport #6226 for v3.5.x: `Reader#read_directories`: guard against an entry not being a directory (#6304
A [full history](/docs/history/#v3-5-2) is available for your perusal. As always, please file bugs if you encounter them! Opening a pull request with a failing test for your expected behaviour is the easiest way for us to address the issue since we have a reproducible example to test again. Short of that, please fill out our issue template to the best of your ability and we'll try to get to it quickly!
Many thanks to our contributors without whom this release could not be
possible: Ben Balter & Kyle Zhao.
Happy Jekylling!

View File

@@ -1,17 +0,0 @@
---
title: 'Jekyll turns 3.6!'
date: 2017-09-21 16:38:20 -0400
author: parkr
version: 3.6.0
categories: [release]
---
Another much-anticipated release of Jekyll. This release comes with it Rouge 2 support, but note you can continue to use Rouge 1 if you'd prefer. We also now require Ruby 2.1.0 as 2.0.x is no longer supported by the Ruby team.
Otherwise, it's a massive bug-fix release! A few bugs were found and squashed with our `Drop` implementation. We're using the Schwartzian transform to speed up our custom sorting (thanks, Perl community!). We now protect against images that are named like posts and we generally worked on guarding our code to enforce requirements, instead of assuming the input was as expected.
Please let us know if you find any bugs! You can see [the full history here](/docs/history/#v3-6-0).
Many thanks to our contributors who helped make this release possible: Aleksander Kuś, André Jaenisch, Antonio Argote, ashmaroli, Ben Balter, Bogdan, Bradley Meck, David Zhang, Florian Thomas, Frank Taillandier, Jordon Bedwell, Joshua Byrd, Kyle Zhao, lymaconsulting, Maciej Bembenista, Matt Sturgeon, Natanael Arndt, Ohad Schneider, Pat Hawks, Pedro Lamas, and Sid Verma.
As always, Happy Jekylling!

View File

@@ -1,44 +0,0 @@
---
title: "Diversity in Open Source, and Jekyll's role in it"
date: 2017-10-19 21:33:00 +0200
author: oe
categories: [community]
---
Open Source has a problem with diversity. GitHub recently conducted a [survey](http://opensourcesurvey.org/2017) which revealed that 95% of the respondents were identifying as male. This is even worse than in the tech industry overall, where the percentage is only about 76%. Every other week, there seems to be another case of a maintainer engaging in targeted harassment against minorities. People somehow deem it completely okay to let these things slide, though.
Fortunately, there's a couple of things we can do to make it easier and more comfortable for people that have never contributed to any open source project before, to contribute to our projects.
## Add a Code of Conduct, and enforce it
This might seem like one of the easiest steps to do, but it actually requires a lot of dedication to pull through with. Basically, a Code of Conduct is a document detailing what is and what isn't acceptable behavior in your project. A good Code of Conduct also details enforcement procedures, that means how the person violating the Code of Conduct gets dealt with. This is the point at which I've seen a looooot of projects fail. It's easy enough to copy-paste a Code of Conduct into your project, but it's more important to be clear on how to enforce it. Inconsistent —or worse, nonexistent— enforcement is just going to scare off newcomers even more!
The most widely adopted Code of Conduct is the [Contributor Covenant](https://www.contributor-covenant.org/). It's a very good catch-all document, but it is a bit light in the enforcement section, so I'd recommend to flesh it out by yourself, be it by means of adding contact information or expanding the enforcement rules.
No matter which Code of Conduct you pick, the most important thing is to actually _read it for yourself_. The worst thing in open source is a maintainer that doesn't know when they've violated their own Code of Conduct.
## Document your contributing workflow
The problem that puts people off the most is incomplete or missing documentation, as revealed through GitHub's [open source survey](http://opensourcesurvey.org/2017). A very popular myth in programming is that good code explains itself, which might be true, but only for the person writing it. It's important, especially once you put your project out there for the world to see, to document not only your code, but also the process by which you maintain it. Otherwise, it's going to be extremely hard for newcomers to even figure out where to begin contributing to your project.
Jekyll has [an entire section of its docs](/docs/contributing) dedicated to information on how to contribute for this very reason. Every documentation page has a link to directly edit and improve it on GitHub. It's also important to realize that not all contributions are code. It can be documentation, it can be reviewing pull requests, but it can also just be weighing into issues, and all of this should be recognized in the same way. At Jekyll, out of 397 total merged pull requests in the last year, __204__ were documentation pull requests!
## Create newcomer-friendly issues
For most people new to open source, the biggest hurdle is creating their first pull request. That's why initiatives such as [YourFirstPR](https://twitter.com/yourfirstpr) and [First Timers Only](http://www.firsttimersonly.com/) were started. Recently, [a GitHub bot that automatically creates first-timer friendly issues](https://github.com/hoodiehq/first-timers-bot) was launched, which makes it very easy for maintainers to convert otherwise small or trivial changes into viable pull requests that can be taken on by newcomers! So we decided to give it a shot, and we've created a couple of very easy `first timers only` issues:
- [Issue #6437](https://github.com/jekyll/jekyll/issues/6437)
- [Issue #6438](https://github.com/jekyll/jekyll/issues/6438)
- [Issue #6439](https://github.com/jekyll/jekyll/issues/6439)
(There's also an up-to-date listing of all of our `first timers only` issues [here](https://github.com/jekyll/jekyll/issues?q=is%3Aissue+is%3Aopen+label%3Afirst-time-only))
These issues are designed to be taken on only by someone who has had little to no exposure to contributing to open source before, and additionally, project maintainers offer support in case a question arises.
Jekyll is a very big and popular open source project, and we hope that with these special issues, we can help people who haven't contributed to open source before to catch a footing in these unsteady waters.
## Be nice
I know this is a cliche and a overused phrase, but really, it works if you pull through with it. Come to terms with the fact that some people aren't as fast or reliable as you might want to think. Don't get angry when a contributor takes a day longer than you might like them to. Treat new contributors to your project with respect, but also with hospitality. Think twice before you send that comment with slurs in it.
I've been contributing to open source for about 4 years now, and I've had my fair share of horrible, horrible experiences. But Jekyll has historically been a project that has always valued the people contributing to it over the code itself, and I hope we can keep it that way. I also hope that other project maintainers read this and take inspiration from this post. Every project should be more diverse.

View File

@@ -1,42 +0,0 @@
---
title: 'Jekyll 3.6.2 Released'
date: 2017-10-21 21:31:40 +0200
author: dirtyf
version: 3.6.2
categories: [release]
---
3.6.2 is out, it's a tiny patch release and we invite you to run `bundle update`
if you want to avoid possible build problems with:
* some UTF-8 and UTF-16 encoded files,
* fully numeric layout names (we convert those to string for you now).
Other changes include updates to our documentation, like this [complete
video series by Giraffe Academy](../tutorials/video-walkthroughs/) aimed at
complete beginners. A big thanks to Mike for this.
And if you're wondering what happened to version 3.6.1, it was just our new
release maintainer getting familiar with the release process. 😄
We try to release patch releases as quickly as possible and we're already
working on the next minor version 3.7.0 that will allow you to store all your
collections in a single directory. Stay tuned.
Theme developers are invited to test the brand new
[`jekyll-remote-theme`](https://github.com/benbalter/jekyll-remote-theme) plugin
and give their feedback to @benbalter. This plugin allows you to use any
GitHub hosted theme as a remote theme!
Once again, many thanks to our contributors who helped make this release possible:
ashmaroli, bellvat, Frank Taillandier, i-give-up, Jan Piotrowski, Maximiliano
Kotvinsky, Oliver Steele and Pat Hawks. For some it was their [first
contribution to open-source]({% link
_posts/2017-10-19-diversity-open-source.markdown %}) 👏
As it's been nine years this week that Tom Preston-Werner started this project,
I also wanna seize this opportunity to thank [all of the 732 contributors](https://github.com/jekyll/jekyll/graphs/contributors) who
helped make it possible for Jekyll to power millions of websites around the world
today.
Happy Birthday Jekyll! 🎂

View File

@@ -1,37 +0,0 @@
---
title: "Jekyll 3.7.0 Released"
description: "Jekyll 3.7.0 brings LiveReload, a directory for your collections and much more…"
date: 2018-01-02 11:21:40 +0100
author: DirtyF
version: 3.7.0
categories: [release]
---
We're happy to release a new minor for the new year.
Here are a few of the latest additions from our contributors:
* LiveReload is available as an option during development: with `jekyll serve --livereload` no more manual page refresh. A big thanks to @awood for this feature and to @andreyvit, LiveReload author.
* New `collections_dir` configuration option allows you to store all your [collections](/docs/collections) in a single folder. Your source root folder should now look cleaner :sparkles: .
* If you're using a [gem-based theme](/docs/themes/) in coordination with the `--incremental` option, you should notice some significant speed during the regeneration process, we did see build time went down **from 12s to 2s** with @mmistakes [minimal-mistakes theme](https://github.com/mmistakes/minimal-mistakes) during our tests.
* Jekyll will now check to determine whether host machine has internet connection.
* A new `latin` option is available to better [handle URLs slugs](/docs/templates/#options-for-the-slugify-filter).
* And of course many bug fixes and updates to our documentation — which you can now search thanks to our friends @Algolia.
* [Full history is here](/docs/history/#v3-7-0).
This release wouldn't have been possible without all the following people:
Aaron Borden, Alex Tsui, Alex Wood, Alexey Pelykh, Andrew Dassonville, Angelika Tyborska, Ankit Singhaniya, Ashwin Maroli, bellvat, Brandon Dusseau, Chris Finazzo, Doug Beney, Dr. Wolfram Schroers, Edward Shen, Florian Thomas, Frank Taillandier, Gert-jan Theunissen, Goulven Champenois, János Rusiczki, Jed Fox, Johannes Müller, Jon Anning, Jonathan Hooper, Jordon Bedwell, Junko Suzuki, Kacper Duras, Kenton Hansen, Kewin Dousse, Matt Rogers, Maximiliano Kotvinsky, mrHoliday, Olivia, Parker Moore, Pat Hawks, Sebastian Kulig, Vishesh Ruparelia, Xiaoiver and Yashu Mittal.
A big thanks to everyone!
Oh, one last thing…
### :pray: upgrade your Ruby
Prepare for the next major update, as next major version Jekyll 4.0 will drop support for Ruby 2.1 and 2.2.
> Ruby 2.2 is now under the state of the security maintenance phase, until the end of the March of 2018. After the date, maintenance of Ruby 2.2 will be ended. We recommend you start planning migration to newer versions of Ruby, such as 2.4 or 2.3. — [Ruby Core Team](https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-2-9-released/)
We strongly encourage you to upgrade to at least Ruby 2.4.x [like our friends at GitHub Pages](https://pages.github.com/versions/) or even go with [Ruby 2.5](https://www.ruby-lang.org/en/news/2017/12/25/ruby-2-5-0-released/).
Happy new year to all from the Jekyll team!

View File

@@ -1,67 +0,0 @@
---
title: "Jekyll 3.7.2 Released"
date: 2018-01-25 22:22:22 +0530
author: ashmaroli
version: 3.7.2
categories: [release]
---
Close on the heels of shipping 3.7.0, we were informed of a couple of
regressions due to the changes made in that release. In due time, Team Jekyll
set out to address those issues as early as possible.
Days later here we're, announcing 3.7.2 (sorry for skipping 3.7.1,
RubyGems didn't want to play nice) that fixes numerous issues! :tada:
The highlights being:
* A major regression in 3.7.0 was that when a Front Matter Default was
configured with a `scope["path"]` set to a directory, Jekyll would scan
that directory for any subfolders and files, for each document in that
`path`.
Though this is intended, it increases build times in proportion to the size
of the directory.
We addressed this by having Jekyll scan the directory path only if the user
explicitly configures the `scope["path"]` using wildcards.
Read our [documentation](/docs/configuration/#glob-patterns-in-front-matter-defaults)
for more details.
A huge shout-out to @mmistakes for bringing this to our notice and
additionally providing us with a test repository to aid in resolving the issue.
* Another regression reported was related to our "Custom collections
directory" feature introduced in 3.7.0.
Users setting `collection_dir` to a certain directory would have *altered*
paths to their posts still at the root of their site's source. This
roughly translated to 404 errors on URLs to their posts.
Props to @localheinz for bringing this regression to our notice.
We decided to resolve this by having Jekyll ignore posts and drafts at the
root of the site's source directory if the user customizes the
`collection_dir` setting.
Ergo, if you set a custom location for your collections, please ensure you
move all of your collections into that directory. **This includes posts and
drafts as well**. Your links generated by
`{% raw %}{% post_url %}{% endraw %}` or `{% raw %}{% link %}{% endraw %}`
will adapt automatically.
* We also found out that `gem "wdm"` boosts performance while directories are
being watched on Windows. So we recommend having it included in your Gemfile
for a better development experience on Windows. (Newly generated Gemfiles
will hereafter have that gem listed automatically :wink:)
In addition to the above, numerous other minor fixes and documentation updates
have been made that should improve your Jekyll experience. All of which, would
not have been possible without our wonderful contributors:
Alexandr, Andreas Möller, Ashwin Maroli, Chayoung You, Florian Thomas,
Frank Taillandier, Hendrik Schneider, Kacper Duras, Olivia, Parker Moore and
Paul Robert Lloyd.
As always, you can see our full changelog on [the History page](/docs/history/).
Happy Jekylling! :sparkles:

View File

@@ -1,43 +0,0 @@
---
layout: news_item
title: "Meet Jekyll's New Lead Developer"
date: "2018-02-19 20:48:09 -0500"
author: parkr
categories: [team]
---
Jekyll has a new Lead Developer: [Olivia](https://liv.cat/)!
After over 5 years of leading Jekyll, many releases from 0.12.1 to 3.6.0, and
countless conversations in GitHub Issues, Pull Requests, Jekyll Talk, and
more, I am passing on the torch as Lead Developer of Jekyll.
Olivia has been working with the Jekyll community for some time now. You
may have seen her around in issues and pull requests on the various Jekyll
repositories. She started as a contributor, then joined the Core team as our
community lead. Olivia joined the Jekyll Core Team with experience in the
Node.js community, both online and as a volunteer organizer with JSConf EU.
In my conversations with Olivia, it is clear that Jekyll's vision of
simplicity for the user ([no magic!](/philosophy#1-no-magic)) and letting
users' [content be king](/philosophy#3-content-is-king) will remain a top
priority. In just the last few weeks as the transition has been occurring,
we have seen some incredible work on performance that will make future
versions of Jekyll work better at scale. She will be prioritizing work on
innovative improvements to make Jekyll that much better for all of us.
Olivia balances an eye for quality with the need for shipping well.
When Tom Preston-Werner met me at GitHub HQ 2.0 in January 2013 to pass on
the torch, I could never have dreamed of all the amazing experiences this
community would share with me over the next 5 years. From visiting @qrush
in Buffalo, NY for a hack night on Jekyll to attending a Jekyll planning
session hosted by @benbalter at GitHub to Google Summer of Code which gave
us jekyll-admin, I am eternally grateful to all of you for the opportunity
to lead this excellent community. I'm confident Olivia will continue to
lead Jekyll to even greater heights.
As always, Happy Jekylling!
Parker
*Curious about who else runs this show? [Check out our excellent team.](/team/)*

View File

@@ -1,19 +0,0 @@
---
title: 'Jekyll 3.7.3 Released'
date: 2018-02-25 13:02:08 +0530
author: ashmaroli
version: 3.7.3
categories: [release]
---
Hello Jekyllers!! :wave:
We're pleased to announce the release of `v3.7.3` which fixes a bug one might encounter while using `Jekyll - 3.7.x` along with a
Jekyll plugin that in turn uses the `I18n` library.
When [v3.7.0]({% link _posts/2018-01-02-jekyll-3-7-0-released.md %}) enhanced our `slugify` filter with a `latin` option, we also
hardcoded a default fallback locale for the `I18n` library to avoid an exception raised in the event the library fails to find
any locale. This led to issues with third-party i18n plugins for Jekyll, especially since the default locale got assigned before
the plugin was loaded, irrespective of whether the `slugify` filter was used.
Jekyll will henceforth set the default locale if and only if necessary.

View File

@@ -1,28 +0,0 @@
---
title: "Jekyll 4.0 is on the Horizon!"
date: "2018-04-19 16:07:00 +0100"
author: oe
categories: [community]
---
With the release of Jekyll 3.8.0, it's been 2 and a half years since the last major release. Jekyll 3.0.0 was released in late October of 2015! That's a long time ago, and we've been working towards the next major release of Jekyll for a couple of months now. Here's a small preview of what's to come:
- Dropping support for Ruby 2.1 and 2.2. Both versions have reached their EOL period.
- Dropping Pygments as a dependency. We're already defaulting to Rouge, and this removes the implicit Python dependency. (finally!)
- Making the `link` tag use relative URLs. This is a big breaking change, but it's the cleaner solution.
We're open to more ideas, though. If the development cost isn't too high, or if someone volunteers to take care of the implementation, it's likely that your suggestion might make it into Jekyll 4.0. Head over to this [issue] for more details. Some interesting topics might be improving Internationalization support in Jekyll, creating convenience Liquid tags, et cetera.
That being said, the development period of version 4.0 begins _now_. This means a couple of things:
- New features will only be implemented in Jekyll 4.0. There will be no 3.9.0 or the like.
- Same with bug fixes, unless they concern something introduced in Jekyll 3.7 or 3.8, in which case we will backport the fixes and release a patch version.
- Now is a great time to finally take on the feature you've wanted to see in Jekyll for ages! Just open an issue or experiment with the code to get going!
As for a release date, we're currently aiming for late summer, around September or so. However, keep in mind that this project is purely volunteer-run, and as such, delays might occur and we might not hit that release date.
Finally, this is a great time for newcomers to open-source to make their first contribution. We'll be doing our best to mark recommended contributions and create newcomer-friendly issues, as well as to provide mentoring throughout the contribution process (although we'd like to think that we're already pretty proficient at that). So if you've always been hestitant about contributing to a large open-source project, Jekyll is a good place to start!
Happy Jekylling! :wave:
[issue]: https://github.com/jekyll/jekyll/issues/6948

View File

@@ -1,43 +0,0 @@
---
title: 'Jekyll 3.8.0 Released'
date: 2018-04-19 19:45:15 +0530
author: ashmaroli
version: 3.8.0
categories: [release]
---
Aloha Jekyllers!! :wave:
After months of toiling on the codebase and shipping a couple of release-candidates, the Jekyll Team is delighted to finally
present `v3.8.0`, packed with optimizations, improvements, some new features and a couple of bug-fixes. Yay!!!
Under the hood, Jekyll has undergone many minor changes that will allow it to run more performantly in the coming years. :smiley:
Rest assured, our users should see minor improvements in their site's build times.
Speaking of improvements, users running a site containing a huge amount of posts or those who like to use our `where` filter
frequently in a single template, are going to see a massive reduction in their total build times!! :tada:
Hold on, this version is not just about optimizations, there are some new features as well..:
* Detect non-existent variables and filters specified in a template by enabling `strict_variables` and `strict_filters` under the
`liquid` key in your config file.
* Allow *date filters* to output ordinal days.
* `jekyll doctor` now warns you if you have opted for custom `collections_dir` but placed `_posts` directory outside that
directory.
..and yes, a couple of bug-fixes, notably:
* Jekyll now handles future-dated documents properly.
* Jekyll is able to handle Liquid blocks intelligently in excerpts.
* A few methods that were *not meant to be publically accessible* have been entombed properly.
* A few bugs that still plagued our `collections_dir` feature from `v3.7` got crushed.
As always, the full list of changes since last release can be viewed [here](/docs/history/#v3-8-0).
A big thanks to the following people who contributed to our repository with pull-requests that improved our codebase, documentation
and tests:
Ana María Martínez Gómez, Antonio Argote, Ashwin Maroli, Awjin Ahn, Ben Balter, Benjamin Høegh, Christian Oliff, Damien Solodow,
David Zhang, Delson Lima, Eric Cornelissen, Florian Thomas, Frank Taillandier, Heinrich Hartmann, Jakob Vad Nielsen, John Eismeier,
Kacper Duras, KajMagnus, Mario Cekic, Max Vilimpoc, Michael H, Mike Kasberg, Parker Moore, Pat Hawks, Paweł Kuna, Robert Riemann,
Roger Rohrbach, Semen Zhydenko, Stefan Dellmuth, Tim Carry, olivia, and steelman.
Happy Jekylling!! :sparkles:

View File

@@ -1,20 +0,0 @@
---
title: 'Jekyll 3.8.1 Released'
date: 2018-05-01 11:56:01 -0500
author: pathawks
version: 3.8.1
categories: [release]
---
Happy May Day :tada:
The Jekyll team is happy to announce the release of `v3.8.1`, which fixes
a couple of bugs that were introduced two weeks ago in `v3.8.0`. If you have
experienced trouble regarding post excerpts or non-published posts, this release
should be the remedy. Thanks to @Chaosed0 and @domLocalHeroes for originally
reporting these issues, and to @ashmaroli for fixing them so quickly.
As a reminder, we have started work on Jekyll 4.0. If there are any
features that you would love to see added to Jekyll, or any pain points you
would like to see removed, please do add your ideas to the [Jekyll 4.0 idea
list](https://github.com/jekyll/jekyll/issues/6948).

View File

@@ -1,19 +0,0 @@
---
title: 'Jekyll 3.8.2 Released'
date: 2018-05-19 10:30:00 -0500
author: pathawks
version: 3.8.2
categories: [release]
---
Hello Jekyllers!!
Today we are releasing `v3.8.2`, which fixes the way Jekyll generates excerpts
for posts when the first paragraph of the post contains Liquid tags that take
advantage of [Liquid's whitespace control feature][Liquid whitespace].
Big thanks to @kylebarbour, who first reported this issue and also very quickly
submitted a fix. Also thanks to @nickskalkin for making sure that we are using
the latest version of Rubocop to lint our code.
[Liquid whitespace]: https://shopify.github.io/liquid/basics/whitespace/

View File

@@ -1,13 +0,0 @@
---
title: 'Jekyll 3.8.3 Released'
date: 2018-06-05 09:00:00 -0500
author: pathawks
version: 3.8.3
categories: [release]
---
This release fixes a regression in 3.8 where collections with `published: false`
do not show when using the `--unpublished` flag.
Thanks to @philipbelesky for reporting and fixing this issue; collections with
`published: false` now behave the same way as Posts.

View File

@@ -1,68 +0,0 @@
---
title: "Sponsoring Jekyll's development"
date: 2018-08-01 15:00:00 +0200
author: oe
categories: [community]
---
_(TL;DR: We're open for sponsorships on our [OpenCollective page](https://opencollective.com/jekyll))_
Hi Jekyllers,
As you may know, Jekyll is a completely free and open source project. We offer our
software and its related plugins and documentation at no cost because we believe
that good software should not cost anything. We're not planning on changing that,
but today I want to talk about a different monetary aspect of open source.
Open source developers being paid for the work they do is a rare sight. Most open source
software is effectively the result of hundreds and thousands of hours of free labor provided
by individuals who are passionate enough to work outside of their day job to create
software that, ironically, is being used by almost every company that offers
digital services. It's a problem that has gotten more attention in recent years, with
the open source community becoming more diverse and more and more companies actively
investing in providing monetary support for open source developers.
Jekyll has always been a product of volunteers. Rarely has someone been paid to implement
a certain plugin or feature. Today, we're excited to announce that we will finally
be able to fund our contributors! __We are opening an OpenCollective to receive
individual and corporate sponsorships__. This is not unheard of, [Hugo](http://gohugo.io)
is also funded by sponsorships, as are many other similar projects, such as
[webpack](https://opencollective.com/webpack), [Babel](https://opencollective.com/babel) or
[RuboCop](https://opencollective.com/rubocop).
OpenCollective is a service that makes it easy for open source projects to receive funding
from individuals and companies alike. It's specifically designed for open source and
many other projects already use it for funding.
Sponsoring is, for us, a method to finally realize some of the more ambitious goals we've had
with the project for years. The closest thing we want to realize is to __release Jekyll 4.0, and
to make it as polished as we can__. In the future, we would also like to work on other things that
will improve the Jekyll ecosystem. Here's a couple of ideas:
- Create a comprehensive official plugin and theme directory site
- Improve tooling built around measuring and improving Jekyll's performance
- Improve maintenance for official plugins
- Including the community into official decisions; making Jekyll more friendly to folks in the community
Again, these are just some ideas, but with the help of sponsoring, they are now one step closer
to being realized :heart:
<div align="center">
<img src="/img/forestry-logo.png" width="300" />
</div>
With that, we would like to announce our very first sponsor: [__Forestry.io__](https://forestry.io)! Forestry is
a CMS that integrates with your Jekyll sites and lets you update content using a beautiful
interface, and then automatically commits it back to your GitHub repository. We're excited to have
them on board on a new, exciting step of our journey.
Will anything change for Jekyll users? The answer is no - this step does not impact the Jekyll software
in any aspect. In fact, you might see positive changes, such as more features and better
performance. Surprisingly, that's what happens when you properly fund people for their work!
If you have been a long time user for Jekyll and would like to give something back to the project,
you can consider a small monthly donation to our [OpenCollective page](http://opencollective.com/jekyll).
If your company heavily relies on Jekyll, do consider sponsoring us! Contact me at
`olivia at fastmail dot com` and we'll figure something out together.
Thanks for sticking with us, and happy Jekylling! :tada:

View File

@@ -1,60 +0,0 @@
.searchbox {
padding-top: 1px;
.searchbox__input {
padding: 6px 5px 5px 29px;
font-size: 0.75em;
border: none;
border-radius: 5px;
color: #555;
background-color: #333 !important;
box-shadow: 0 0 1px 0 #555;
&::-webkit-input-placeholder {
color: #aaa;
}
&:-ms-input-placeholder {
color: #aaa;
}
&::placeholder {
color: #aaa;
}
&:focus, &:active {
color: #eaeaea;
background-color: #252525 !important;
}
}
}
.searchbox__submit svg { fill: #fc0 }
.searchbox__reset svg { fill: #999 }
.algolia-autocomplete {
.ds-dropdown-menu {
font-size: 1rem;
text-shadow: none;
.ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content {
background-color: rgba(221, 221, 221, 0.5);
}
}
.algolia-docsearch-suggestion--category-header {
background-color: #444;
color: #ddd;
padding: 0.35em;
}
.algolia-docsearch-suggestion--subcategory-column {
color: #444;
}
.algolia-docsearch-suggestion--highlight {
background-color: #fc0;
color: #222;
}
.algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
box-shadow: inset 0 -2px 0 0 #fc0;
}
}

View File

@@ -1,24 +0,0 @@
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/FontAwesome.eot?9h6hxj');
src: url('../fonts/FontAwesome.eot?9h6hxj#iefix') format('embedded-opentype'),
url('../fonts/FontAwesome.woff?9h6hxj') format('woff'),
url('../fonts/FontAwesome.ttf?9h6hxj') format('truetype'),
url('../fonts/FontAwesome.svg?9h6hxj#FontAwesome') format('svg');
font-weight: normal;
font-style: normal;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fa-link:before {
content: "\f0c1";
}
.fa-pencil:before {
content: "\f040";
}

View File

@@ -1,447 +0,0 @@
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
line-height: 1.15; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main { /* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details, /* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}

View File

@@ -1,521 +0,0 @@
---
layout: tutorials
permalink: /tutorials/convert-site-to-jekyll/
title: Convert an HTML site to Jekyll
---
If you're looking for themes for your Jekyll site, you don't have to restrict yourself to existing Jekyll themes. It's pretty easy to convert almost any static HTML files into a Jekyll website.
In many ways, any site that is currently a static site is *already* a Jekyll website. Jekyll just allows you to automate parts of the site (like inserting pages into templates, rendering lists for navigation, generating feeds and sitemaps, and more) as it processes the files.
Understanding how to convert any HTML site into Jekyll templates will open your world to many more options for Jekyll themes. Instead of [searching online for *Jekyll themes*](https://duckduckgo.com/?q=Jekyll+themes), you can choose from the large variety of HTML templates for your site, quickly Jekyll-ize the HTML templates as you need to, and build the output with Jekyll.
Although websites can have sophisticated features and controls, we'll keep things simple in this tutorial.
## What is a Jekyll Website?
First, let's start with a grounding in the basics. Stripping a Jekyll site down to an extremely basic level will help clarify what happens in a Jekyll site. If you haven't already installed the jekyll gem, [install it]({% link _docs/installation.md %}).
We'll start with a *basic Jekyll site* consisting of three files:
```
├── _config.yml
├── _layouts
│   └── default.html
└── index.md
```
Manually create these three files in a folder called `my_jekyll_site` or whatever suits you the most, and place `default.html` inside a folder named `_layouts`.
```sh
$ touch _config.yml index.md default.html
$ mkdir _layouts && mv default.html _layouts
```
Fire up your favorite editor, and populate the contents of the `default.html` and `index.md` files as follows:
**_config.yml**
```yaml
name: My Jekyll Website
```
**_layouts/default.html**
```html
<!DOCTYPE html>
<html>
<body>
{% raw %}{{ content }}{% endraw %}
</body>
</html>
```
**index.md**
```yaml
---
title: My page
layout: default
---
# {% raw %}{{ page.title }}{% endraw %}
Content is written in [Markdown](https://learnxinyminutes.com/docs/markdown/). Plain text format allows you to focus on your **content**.
<!--
You can use HTML elements in Markdown, such as the comment element, and they won't be affected by a markdown parser. However, if you create an HTML element in your markdown file, you cannot use markdown syntax within that element's contents.
-->
```
Now `cd` to `my_jekyll_site` and serve the site with the built-in server:
```
cd my_jekyll_site
jekyll serve
```
If you have a Gemfile, [use Bundler]({% link _docs/quickstart.md %}#about-bundler) by typing `bundle exec jekyll serve` instead.
{: .note .info}
When you serve the site, you get a preview URL such as `http://127.0.0.1:4000/` (which is the same as `http://localhost:4000/`). The site's files are built into the `_site` folder by default.
This is a Jekyll site at the most basic functional level. Here's what is happening:
* The `_config.yml` file contains settings that Jekyll uses as it processes your site. An empty config file will use default values for building a Jekyll site. For example, to convert [Markdown](https://learnxinyminutes.com/docs/markdown/) to HTML, Jekyll will automatically use the [kramdown Markdown filter](https://rubygems.org/gems/kramdown/), without any need to specify it.
* Jekyll looks for files with [front matter tags]({% link _docs/frontmatter.md %}) (the two sets of dashed lines `---` like those in `index.md`) and processes the files (populating site variables, rendering any [Liquid](https://shopify.github.io/liquid/), and converting Markdown to HTML).
* Jekyll pushes the content from all pages and posts into the `{% raw %}{{ content }}{% endraw %}` variable in the layout specified (`default`) in the front matter tags.
* The processed files get written as `.html` files in the `_site` directory.
You can read more about how Jekyll processes the files in [order of Interpretation]({% link _tutorials/orderofinterpretation.md %}).
With this basic understanding of how a Jekyll site works, you can convert almost any HTML theme for Jekyll. The following sections will take you through a step-by-step tutorial to do so.
## 1. Create a template for your default layout
Find your HTML theme and save it as a `default` layout. If you're converting or cloning an existing site, you can right-click the page and view the source code.
For example, suppose you're cloning your company site to create a documentation site with the same branding. Or suppose you have a personal site that you built with HTML and now want to make it a Jekyll site. Get the HTML source code for your site.
{: .note .info}
Regardless of the site, do check the license and make sure you have permission to copy and use the code.
Copy and paste the source code into a file called `default.html`. Put the `default.html` file inside the `_layouts` folder. This will be the default layout template for your pages and posts &mdash; that is, each page or post will use this layout when Jekyll builds the site.
Note that in looking for templates, you want the HTML output of the template. If the template has PHP tags or other dynamic scripts, these dynamic elements will need to be converted to HTML or to [Liquid](https://shopify.github.io/liquid/). Liquid is [Jekyll templating system]({% link _docs/templates.md %}) to retrieve dynamic content.
Open `default.html` into your browser locally to ensure the site looks and behaves like it does online. You will likely need to adjust CSS, JS, and image paths so they work.
For example, if the paths were relative on the site you copied, you'll need to either download the same assets into your Jekyll site or use absolute paths to the same assets in the cloud. (Syntax such as `src="//` requires a prefix such as `src="http://` to work in your local browser.)
Jekyll provides some [filters]({% link _docs/templates.md %}#filters) to prepend a site URL before path. For example, you could preface your stylesheet like this:
```liquid
{% raw %}{{ "/assets/style.css" | relative_url }}{% endraw %}
```
The `relative_url` filter will prepend the [`baseurl`](https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/) value from your config file (as`blog` for instance) to the input. This is useful if your site is hosted at a subpath rather than at the root of the domain (for example, `http://mysite.com/blog/`).
You can also use an `absolute_url` filter. This filter will prepend the `url` *and* `baseurl` value to the input:
```liquid
{% raw %}{{ "/assets/style.css" | absolute_url }}{% endraw %}
```
Again, both `url` and `baseurl` can be defined in your site's config file, like this:
```
url: http://mysite.com
baseurl: /blog
```
The result in the output will be `http://mysite.com/blog/assets/style.css`.
Note that the `url` property of any page begins with a forward slash (`/`), so omit this at the end of your `url` or `baseurl` property.
You don't have to prepend filters to link paths like this. You could also use relative links across your entire site. However you decide to code the paths to your assets, make sure they render correctly.
Does your local `default.html` page look good in your browser? Are all images, styles, and other elements showing up correctly? If so, great. Keep going. You can use this template as the layout for all your pages and posts or create as many templates as you need.
In the next section, you'll blank out the content of the layout and replace it with placeholder tags that get populated dynamically with your Jekyll pages.
## 2. Identify the content part of the layout
In `default.html`, find where the page content begins (usually at `h1` or `h2` tags). Replace the title that appears inside these tags with `{% raw %}{{ page.title }}{% endraw %}`.
Remove the content part (keep everything else: navigation menu, sidebar, footer, etc.) and replace it with `{% raw %}{{ content }}{% endraw %}`.
Check the layout again in your browser and make sure you didn't corrupt or alter it up by inadvertently removing a crucial `div` tag or other element. The only change should be to the title and page content, which are now blanked out or showing the placeholder tag.
## 3. Create a couple of files with front matter tags
Create a couple of files (`index.md` and `about.md`) in your root directory.
In your `index.md` file, add some front matter tags containing a `title` and `layout` property, like this:
```yaml
---
title: Home
layout: default
---
Some page content here...
```
Create another page for testing called `about.md` with similar front matter tags.
{: .note .info}
If you don't specify a layout in your pages, Jekyll will simply render that page as an unstyled basic HTML page.
## 4. Add a configuration file
Add a `_config.yml` file in your root directory. In `_config.yml`, you can optionally specify the markdown filter you want. By default, [kramdown](https://kramdown.gettalong.org/) is used (without the need to specify it). If no other filter is specified, your config file will automatically apply the following as a default setting:
```
markdown: kramdown
```
You can also specify [some options](https://kramdown.gettalong.org/converter/html.html) for kramdown to make it behave more like [GitHub Flavored Markdown (GFM)](https://github.github.com/gfm/):
```
kramdown:
input: GFM
auto_ids: true
hard_wrap: false
syntax_highlighter: rouge
```
## 5. Test your pages
Now run `jekyll serve` and toggle between your `index.html` and `about.html` pages. The default layout should load for both pages.
You've now extracted your content out into separate files and defined a common layout for pages.
You could define any number of layouts you want for pages. Then just identify the layout you want that particular page to use. For example:
```
---
title: Sample page
layout: homepage
---
```
This page would then use the `homepage.html` template in the `_layouts` folder.
You can even set [default front matter tags]({% link _docs/configuration.md %}#front-matter-defaults) for pages, posts, or [collections]({% link _docs/collections.md %}) in your `_config.yml` file so that you don't have to specify the layout in the front matter variables. Anywayd, setting defaults is beyond the scope of this tutorial, let's get back to work.
## 6. Configure site variables
You already configured the page title using `{% raw %}{{ page.title }}{% endraw %}` tags. But there are more `title` tags to populate. Pages also have a [`title`](https://moz.com/learn/seo/title-tag) tag that appears in the browser tab or window. Typically you put the page title followed by the site title here.
In your `default.html` layout, look for the `title` tags below your `head` tags:
```
<title>ACME Website</title>
```
Insert the following site variables:
```
{% raw %}<title>{{ page.title }} | {{ site.title }}</title>{% endraw %}
```
Open `_config.yml` and add a `title` property for your site's name.
```
title: ACME Website
```
Any properties you add in your `_config.yml` file are accessible through the `site` namespace. Similarly, any properties in your page's front matter are accessible through the `page` namespace. Use dot notation after `site` or `page` to access the value.
Stop your Jekyll server with <kbd>Ctrl</kbd> + <kbd>C</kbd> and restart it. Verify that the `title` tags are populating correctly.
{: .note .info}
Every time you modify your config file, you have to restart Jekyll for the changes to take effect. When you modify other files, Jekyll automatically picks up the changes when it rebuilds.
If you have other variables to populate in your site, rinse and repeat.
## 7. Show posts on a page
It's common to show a list of posts on the homepage. First, let's create some posts so that we have something to showcase.
Add some posts in a `_posts` folder following the standard `YYYY-MM-DD-title.md` post format:
* `2017-01-02-my-first-post.md`
* `2017-01-15-my-second-post.md`
* `2017-02-08-my-third-post.md`
In each post, add some basic content:
```
---
title: My First Post
layout: default
---
Some sample content...
```
Now let's create a layout that will display the posts. Create a new file in `_layouts` called `home.html` and add the following logic:
```
---
layout: default
---
{% raw %}{{ content }}
<ul class="myposts">
{% for post in site.posts %}
<li><a href="{{ post.url }}">{{ post.title}}</a>
<span class="postDate">{{ post.date | date: "%b %-d, %Y" }}</span>
</li>
{% endfor %}
</ul>{% endraw %}
```
Create a file called `blog.md` in your root directory and specify the `home` layout:
```
---
title: Blog
layout: home
---
```
In this case, contents of `blog.md` will be pushed into the `{% raw %}{{ content }}{% endraw %}` tag in the `home` layout. Then the `home` layout will be pushed into the `{% raw %}{{ content }}{% endraw %}` tag of the `default` layout.
### How layouts work
When a layout specifies another layout, it means the content of the first layout will be stuffed into the `{% raw %}{{ content }}{% endraw %}` tag of the second layout. As an analogy, think of Russian dolls that fit into each other. Each layout fits into another layout that it specifies.
The following diagram shows how layouts work in Jekyll:
<img src="../../img/jekylllayoutconcept.png" alt="Concept of Jekyll layouts" />
{: .image-description}
In this example, the content from a Markdown document `document.md` that specifies `layout: docs` gets pushed into the `{% raw %}{{ content }}{% endraw %}` tag of the layout file `docs.html`. Because the `docs` layout itself specifies `layout: page`, the content from `docs.html` gets pushed into the `{% raw %}{{ content }}{% endraw %}` tag in the layout file `page.html`. Finally because the `page` layout specifies `layout: default`, the content from `page.html` gets pushed into the `{% raw %}{{ content }}{% endraw %}` tag of the layout file `default.html`.
You don't need multiple layouts. You could just use one: `default`. You have options for how you design your site. In general, it's common to define one layout for pages and another layout for posts, but for both of these layouts to inherit the `default` template (which usually defines the top and bottom parts of the site).
In your browser, go to `blog.html` and see the list of posts.
Note that you don't have to use the method described here. You could have simply added the `for` loop to any page, such as `index.md`, to display these posts. But given that you may have more complex logic for other features, it can be helpful to store your logic in templates separate from the page area where you frequently type your content.
{: .note .info}
At minimum, a layout should contain `{% raw %}{{ content }}{% endraw %}`, which acts as a receiver for the *content* to be rendered.
### For loops
By the way, let's pause here to look at the `for` loop logic a little more closely. [For loops in Liquid](https://shopify.github.io/liquid/tags/iteration/) are one of the most commonly used Liquid tags. *For loops* let you iterate through content in your Jekyll site and build out a result. The `for` loop also has [certain properties available](https://help.shopify.com/themes/liquid/objects/for-loops) (like first or last iteration) based on the loop's position in the loop as well.
We've only scratched the surface of what you can do with `for` loops in retrieving posts. For example, if you wanted to display posts from a specific category, you could do so by adding a `categories` property to your post's front matter and then look in those categories. Further, you could limit the number of results by adding a `limit` property. Here's an example:
```liquid
{% raw %}<ul class="myposts">
{% for post in site.categories.podcasts limit:3 %}
<li><a href="{{ post.url }}">{{ post.title}}</a>
<span class="postDate">{{ post.date | date: "%b %-d, %Y" }}</span>
</li>
{% endfor %}{% endraw %}
```
This loop would get the latest three posts that have a category called `podcasts` in the front matter.
## 8. Configure navigation
Now that you've configured posts, let's configure page navigation. Most websites have some navigation either in the sidebar or header area.
In this tutorial, we'll assume you've got a simple list of pages you want to generate. If you only have a handful of pages, you could list them by using a `for` loop to iterate through the `site.pages` object and then order them by a front matter property.
Identify the part of your code where the list of pages appears. Usually this is a `<ul>` element with various child `<li>` elements. Replace the code with the following:
```html
{% raw %}<ul>
{% assign mypages = site.pages | sort: "order" %}
{% for page in mypages %}
<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li>
{% endfor %}
</ul>{% endraw %}
```
This example assumes each page would have front matter containing both a `title` and `order` property like this:
```
---
title: My page
order: 2
---
```
Here the `order` property will define how the pages get sorted, with `1` appearing first in the list.
You could also iterate through a list of pages that you maintain in a separate data file. This might be more appropriate if you have a lot of pages, or you have other properties about the pages you want to store.
To manage page links this way, create a folder in your Jekyll project called `_data`. In this folder, create a file called e.g. `navigation.yml` with this content:
```yaml
- title: Sample page 1
url: /page-1-permalink/
- title: Sample page 2
url: /page-2-permalink/
- title: Sample page 3
url: /page-3-permalink/
```
{: .note .info}
If you never wrote any YAML before, you'll get quickly familiar with it. Take a look at [what you can do with YAML](https://learnxinyminutes.com/docs/yaml/).
You can store additional properties for each item in this data file as desired. Arrange the list items in the order you want them to appear.
To print the list of pages from the data file, use code like this:
```html
{% raw %}<ul>
{% for link in site.data.navigation %}
<li><a href="{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
</ul>{% endraw %}
```
If you have more sophisticated requirements around navigation, such as when building a documentation site, see the [detailed tutorial on navigation](/tutorials/navigation/).
## 9. Simplify your site with includes
Let's suppose your `default.html` file is massive and hard to work with. You can break up your layout by putting some of the HTML code in *include* files.
Add a folder called `_includes` in your root directory. In that folder, add a file there called `sidebar.html`.
Remove your sidebar code from your `default.html` layout and insert it into the `sidebar.html` file.
Where the sidebar code previously existed in `default.html`, pull in your "include" like this:
```liquid
{% raw %}{% include sidebar.html %}{% endraw %}
```
You can break up other elements of your theme like this, such as your header or footer. Then you can apply these common elements to other layout files. This way you won't have duplicate code.
## 10. RSS feed
Your Jekyll site needs an RSS feed. Here's the [basic RSS feed syntax](http://www.w3schools.com/xml/xml_rss.asp). To create an RSS file in Jekyll, create a file called `feed.xml` in your root directory and add the following:
```xml
---
layout: null
---
{% raw %}<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>{{ site.title }}</title>
<link>{{ site.url }}</link>
<description>{{ site.description }}</description>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
{% for post in site.posts %}
<item>
<description>
{{ post.content | escape | truncate: '400' }}
</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<guid>
{{ post.url | prepend: site.url }}
</guid>
</item>
{% endfor %}
</channel>
</rss>{% endraw %}
```
Make sure your `_config.yml` file has properties for `title`, `url`, and `description`.
This code uses a `for` loop to look through your last 20 posts. The content from the posts gets escaped and truncated to the last 400 characters using [Liquid filters](https://help.shopify.com/themes/liquid/filters).
In your `default.html` layout, look for a reference to the RSS or Atom feed in your header, and replace it with a reference to the file you just created. For example:
```html
<link rel="alternate" type="application/rss+xml" href="{% raw %}{{ site.url }}{% endraw %}/feed.xml" title="{% raw %}{{ site.title }}{% endraw %}">
```
You can also auto-generate your posts feed by adding a gem called [`jekyll-feed`][jekyll-feed]. This gem will also work on GitHub Pages.
## 11. Add a sitemap
Finally, add a [site map](https://www.sitemaps.org/protocol.html). Create a `sitemap.xml` file in your root directory and add this code:
```xml
---
layout: null
search: exclude
---
{% raw %}<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in site.pages %}
<url>
<loc>{{page.url}}</loc>
<lastmod>{{site.time | date: '%Y-%m-%d' }}</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
{% endfor %}
{% for post in site.posts %}
<url>
<loc>{{post.url}}</loc>
<lastmod>{{site.time | date: '%Y-%m-%d' }}</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
{% endfor %}
</urlset>{% endraw %}
```
Again, we're using a `for` loop here to iterate through all posts and pages to add them to the sitemap.
You can also auto-generate your sitemap by adding a gem called [`jekyll-sitemap`][jekyll-sitemap]. This gem will also work on GitHub Pages.
## 12. Add external services
For other services you might need (such as contact forms, search, comments, and more), look for third-party services. For example, you might use the following:
* For comments: [Disqus](https://disqus.com/)
* For a newsletter: [Tinyletter](https://tinyletter.com/)
* For contact forms: [Wufoo](https://www.wufoo.com/)
* For search: [Algolia Docsearch](https://community.algolia.com/docsearch/)
For more details on services for static sites, see the [Third Parties](https://learn.cloudcannon.com/jekyll-third-parties/) list and tutorials from CloudCannon.
Your Jekyll pages consist of HTML, CSS, and JavaScript, so pretty much any code you need to embed will work without a problem.
As you integrate code for these services, note that **if a page in your Jekyll site doesn't have front matter tags, Jekyll won't process any of the content in that page.** The page will just be passed to the `_site` folder when you build your site.
If you do want Jekyll to process some page content (for example, to populate a variable that you define in your site's config file), just add front matter tags to the page. If you don't want any layout applied to the page, specify `layout: null` like this:
```
---
layout: null
---
```
## 13. Conclusion
Although websites can implement more sophisticated features and functionality, we've covered the basics in this tutorial. You now have a fully functional Jekyll site.
To deploy your site, consider using [GitHub Pages](https://pages.github.com/), [Netlify](https://www.netlify.com/), [Amazon AWS S3](https://aws.amazon.com/s3/) using the [s3_website plugin](https://github.com/laurilehmijoki/s3_website), or just FTP your files to your web server.
You can also package your layouts, includes and assets into a Ruby `gem` and [make it a Jekyll theme]({% link _docs/themes.md %}#creating-a-theme).
## Additional resources
Here are some additional tutorials on creating Jekyll sites:
* [Convert a static site to Jekyll](http://jekyll.tips/jekyll-casts/converting-a-static-site-to-jekyll/)
* [Building a Jekyll Site Part 1 of 3: Converting a Static Website To Jekyll](https://css-tricks.com/building-a-jekyll-site-part-1-of-3/)
[jekyll-sitemap]: https://help.github.com/articles/sitemaps-for-github-pages/
[jekyll-feed]: https://help.github.com/articles/atom-rss-feeds-for-github-pages/

View File

@@ -1,73 +0,0 @@
---
layout: tutorials
permalink: /tutorials/custom-404-page/
title: Custom 404 Page
---
You can easily serve custom 404 error pages with Jekyll to replace the default **Error 404 -- File Not Found** page displayed when one tries to access a broken link on your site.
## On GitHub Pages
Any `404.html` at the **root of your `_site` directory** will be served automatically by GitHub Pages and the local WEBrick development server.
Simply add a `404.md` or `404.html` at the root of your site's source directory and include the YAML Front Matter data to use the theme's base layout.
If you plan to organize your files under subdirectories, the error page should have the following Front Matter Data, set: `permalink: /404.html`. This is to ensure that the compiled `404.html` resides at the root of your processed site, where it'll be picked by the server.
```markdown
---
# example 404.md
layout: default
permalink: /404.html
---
# 404
Page not found! :(
```
## Hosting on Apache Web Servers
Apache Web Servers load a configuration file named [`.htaccess`](http://www.htaccess-guide.com/) that modifies the functionality of these servers.
Simply add the following to your `.htaccess` file.
```apache
ErrorDocument 404 /404.html
```
With an `.htaccess` file, you have the freedom to place your error page within a subdirectory.
```apache
ErrorDocument 404 /error_pages/404.html
```
Where the path is relative to your site's domain.
More info on configuring Apache Error Pages can found in [official documentation](https://httpd.apache.org/docs/current/mod/core.html#errordocument).
## Hosting on Nginx server
The procedure is just as simple as configuring Apache servers, but slightly different.
The nginx configuration file depends on the system in which it is installed. In most systems, it is the `nginx.conf` file, which is usually located inside `/etc/nginx/` or `/etc/nginx/conf/`. However, in other systems like Ubuntu, you would have to look for a `default` nginx configuration file, containing server related information, which is usually located inside `/etc/nginx/sites-available/` or `/etc/nginx/sites-enabled/`. Add the following to your nginx configuration file, _i.e._ either to `nginx.conf` file or to `default` file:
```nginx
server {
error_page 404 /404.html;
location = /404.html {
internal;
}
}
```
If the `server` block already exists, only add the code inside the `server` block given above.
The `location` directive prevents users from directly browsing the 404.html page.
More info on nginx error page can be found on [nginx official documentation](http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
<p class="note warning">
Proceed with caution while editing the configuration file.
</p>

View File

@@ -1,35 +0,0 @@
---
layout: tutorials
title: Tutorials
permalink: /tutorials/home/
redirect_from: /tutorials/index.html
---
In contrast to [Docs](/docs/home/), Tutorials provide more detailed, narrative instruction that cover a variety of Jekyll topics and scenarios. Tutorials might contain the following:
* Step-by-step processes through particular scenarios or challenges
* Full walk-throughs using sample data, showing inputs and results from the sample data
* Detailed explanation about the pros and cons for different Jekyll strategies
* End-to-end instruction in developing a complete feature on a Jekyll site
* Instruction that combines various techniques from across the docs
In short, tutorials aren't the core reference information in docs. They walk users through processes from beginning to end.
{: .info .note}
**Note:** The Tutorials section is new, so there aren't many tutorials yet. You can add a tutorial here to help populate this section.
Some of these techniques might even guide you through a supporting tool, script, service, or other hack used with your Jekyll site. Feel free to include tutorials involving external services with Jekyll as well. However, note that Jekyll in no way endorses any third-party tools mentioned in tutorials.
## How to contribute a tutorial
We welcome your tutorial contributions. To add your tutorial:
1. Fork the Jekyll project by clicking the **Fork** button in the upper-right corner of the [jekyll/jekyll project Github repo](https://github.com/jekyll/jekyll/).
2. Add your tutorial in the `_tutorials` collection.
3. Make sure your tutorial has the same front matter items as other tutorial items.
5. Add a reference to your tutorial filename in `_data/tutorials.yml`. This allows your tutorial to appear in the Tutorials sidebar.
6. Follow the regular git workflow to submit the pull request.
When you submit your pull request, the Jekyll documentation team will review your contribution and either merge it or suggest edits.

View File

@@ -1,605 +0,0 @@
---
layout: tutorials
permalink: /tutorials/navigation/
title: Navigation
---
If your Jekyll site has a lot of pages, you might want to create navigation for the pages. Instead of hard-coding navigation links, you can programmatically retrieve a list of pages to build the navigation for your site.
Although there's already information about [interacting with data files]({% link _docs/datafiles.md %}) in other Jekyll docs, this tutorial dives into building more robust navigation for your site.
There are two primary ways of retrieving pages on a Jekyll site:
* **Retrieve pages listed in a YAML data source**. Store the page data in a YAML (or JSON or CSV) file in the `_data` folder, loop through the YAML properties, and insert the values into your theme.
* **Retrieve pages by looping through the page front matter**. Look through the front matter of your pages to identify certain properties, return those pages, and insert the pages' front matter values into your theme.
The examples that follow start with a basic navigation scenario and add more sophisticated elements to demonstrate different ways of returning the pages. In every scenario, you'll see 3 elements:
* YAML
* Liquid
* Result
The YAML file in the `_data` directory is called `samplelist.yml`.
The scenarios are as follows:
* TOC
{:toc}
## Scenario 1: Basic List
You want to return a basic list of pages.
**YAML**
```yaml
docs_list_title: ACME Documentation
docs:
- title: Introduction
url: introduction.html
- title: Configuration
url: configuration.html
- title: Deployment
url: deployment.html
```
**Liquid**
```liquid
{% raw %}<h2>{{ site.data.samplelist.docs_list_title }}</h2>
<ul>
{% for item in site.data.samplelist.docs %}
<li><a href="{{ item.url }}" alt="{{ item.title }}">{{ item.title }}</a></li>
{% endfor %}
</ul>{% endraw %}
```
**Result**
<div class="highlight result">
<h2>ACME Documentation</h2>
<ul>
<li><a href="#" alt="Introduction">Introduction</a></li>
<li><a href="#" alt="Configuration">Configuration</a></li>
<li><a href="#" alt="Deployment">Deployment</a></li>
</ul>
</div>
{: .note .info }
For the results in these fictitious samples, `#` is manually substituted for the actual link value to avoid 404 errors.)
When you use a `for` loop, you choose how you want to refer to the items you're looping through. The variable you choose (in this case, `item`) becomes how you access the properties of each item in the list. Dot notation is used to get a property of the item (for example, `item.url`).
The YAML content has two main types of formats that are relevant here:
* mapping
* list
`docs_list_title: ACME Documentation` is a mapping. You access the value with `site.data.samplelist.docs_list_title`.
`docs:` is a list. The list begins each item with a hyphen. Unlike with mappings, you usually don't access list properties directly as you do with mappings. If you want to access a specific item in the list, you must identify the position in the list you want, following typical array notation. For example, `site.data.samplelist.docs[0]` would access the first item in the list. However, this is rarely done.
With lists, you usually use `for` loops to cycle through the list of items and do something with each item. With navigation menus, you usually insert each list item into `li` tags based on the navigation structure you're using in your HTML theme.
Each hyphen (`-`) indicates another item in the list. This example just has two properties with each list item: `title` and `url`. You can include as many properties as you want for each item. The order of properties at each position in the list doesn't matter.
## Scenario 2: Sorted list
Suppose you wanted to sort the list by the `title`. To do this, convert the reference to the `docs` collection to a variable, and then apply Liquid's `sort` filter to the variable:
**Liquid**
{% raw %}
```liquid
{% assign doclist = site.data.samplelist.docs | sort: 'title' %}
<ol>
{% for item in doclist %}
<li><a href="{{ item.url }}" alt="{{ item.title }}">{{ item.title }}</a></li>
{% endfor %}
</ol>
```
{% endraw %}
**Result**
<div class="highlight result">
<ol>
<li><a href="#" alt="Configuration">Configuration</a></li>
<li><a href="#" alt="Deployment">Deployment</a></li>
<li><a href="#" alt="Introduction">Introduction</a></li>
</ol>
</div>
The items now appear in alphabetical order. The `sort` property in the Liquid filter applies to the `title`, which is an actual property in the list. If `title` weren't a property, we would need to sort by another property.
See the [Liquid array filter](https://help.shopify.com/themes/liquid/filters/array-filters) for more filter options. Note that you can't simply use this syntax:
{% raw %}
```liquid
{% for item in site.data.samplelist.docs | sort: "title" %}{% endfor %}
```
{% endraw %}
You have to convert `site.data.samplelist.docs` to a variable first using either `assign` or `capture` tags.
## Scenario 3: Two-level navigation list
Suppose you want a more robust list that incorporates multiple sections of heading titles and subitems. To do this, add an additional level to each list item to store this information:
**YAML**
```yaml
toc:
- title: Group 1
subfolderitems:
- page: Thing 1
url: /thing1.html
- page: Thing 2
url: /thing2.html
- page: Thing 3
url: /thing3.html
- title: Group 2
subfolderitems:
- page: Piece 1
url: /piece1.html
- page: Piece 2
url: /piece2.html
- page: Piece 3
url: /piece3.html
- title: Group 3
subfolderitems:
- page: Widget 1
url: /widget1.html
- page: Widget 2
url: /widget2.html
- page: Widget 3
url: /widget3.html
```
**Liquid**
{% raw %}
```liquid
{% for item in site.data.samplelist.toc %}
<h3>{{ item.title }}</h3>
<ul>
{% for entry in item.subfolderitems %}
<li><a href="{{ entry.url }}">{{ entry.page }}</a></li>
{% endfor %}
</ul>
{% endfor %}
```
{% endraw %}
**Result**
<div class="highlight result">
<h3>Group 1</h3>
<ul>
<li><a href="#">Thing 1</a></li>
<li><a href="#">Thing 2</a></li>
<li><a href="#">Thing 3</a></li>
</ul>
<h3>Group 2</h3>
<ul>
<li><a href="#">Piece 1</a></li>
<li><a href="#">Piece 2</a></li>
<li><a href="#">Piece 3</a></li>
</ul>
<h3>Group 3</h3>
<ul>
<li><a href="#">Widget 1</a></li>
<li><a href="#">Widget 2</a></li>
<li><a href="#">Widget 3</a></li>
</ul>
</div>
In this example, `Group 1` is the first list item. Within that list item, its subpages are included as a property that itself contains a list (`subfolderitems`).
The Liquid code looks through the first level with `for item in site.data.samplelist.toc`, and then looks through the second-level property with `for entry in item.subfolderitems`. Just as `item` is an arbitrary name for the items we're looping through, so is `entry`.
## Scenario 4: Three-level navigation list
Building on the previous section, let's add one more level of depth (`subsubfolderitems`) to the list. The formatting will get more complex here, but the principles are the same.
**YAML**
```yaml
toc2:
- title: Group 1
subfolderitems:
- page: Thing 1
url: /thing1.html
- page: Thing 2
url: /thing2.html
subsubfolderitems:
- page: Subthing 1
url: /subthing1.html
- page: Subthing 2
url: /subthing2.html
- page: Thing 3
url: /thing3.html
- title: Group 2
subfolderitems:
- page: Piece 1
url: /piece1.html
- page: Piece 2
url: /piece2.html
- page: Piece 3
url: /piece3.html
subsubfolderitems:
- page: Subpiece 1
url: /subpiece1.html
- page: Subpiece2
url: /subpiece2.html
- title: Group 3
subfolderitems:
- page: Widget 1
url: /widget1.html
subsubfolderitems:
- page: Subwidget 1
url: /subwidget1.html
- page: Subwidget 2
url: /subwidget2.html
- page: Widget 2
url: /widget2.html
- page: Widget 3
url: /widget3.html
```
**Liquid**
{% raw %}
```liquid
<div>
{% if site.data.samplelist.toc2[0] %}
{% for item in site.data.samplelist.toc2 %}
<h3>{{ item.title }}</h3>
{% if item.subfolderitems[0] %}
<ul>
{% for entry in item.subfolderitems %}
<li><a href="{{ entry.url }}">{{ entry.page }}</a>
{% if entry.subsubfolderitems[0] %}
<ul>
{% for subentry in entry.subsubfolderitems %}
<li><a href="{{ subentry.url }}">{{ subentry.page }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
</div>
```
{% endraw %}
**Result**
<div class="highlight result">
<div>
<h3>Group 1</h3>
<ul>
<li><a href="#">Thing 1</a></li>
<li><a href="#">Thing 2</a></li>
<ul>
<li><a href="#">Subthing 1</a></li>
<li><a href="#">Subthing 2</a></li>
</ul>
<li><a href="#">Thing 3</a></li>
</ul>
<h3>Group 2</h3>
<ul>
<li><a href="#">Piece 1</a></li>
<li><a href="#">Piece 2</a></li>
<li><a href="#">Piece 3</a></li>
<ul>
<li><a href="#">Subpiece 1</a></li>
<li><a href="#">Subpiece2</a></li>
</ul>
</ul>
<h3>Group 3</h3>
<ul>
<li><a href="#">Widget 1</a></li>
<ul>
<li><a href="#">Subwidget 1</a></li>
<li><a href="#">Subwidget 2</a></li>
</ul>
<li><a href="#">Widget 2</a></li>
<li><a href="#">Widget 3</a></li>
</ul>
</div>
</div>
In this example, `if site.data.samplelist.toc2[0]` is used to ensure that the YAML level actually contains items. If there isn't anything at the `[0]` position, we can skip looking in this level.
<div class="note">
<h5>ProTip: Line up <code>for</code> loops and <code>if</code> statements</h5>
<p>To keep the code clear, line up the beginning and ending Liquid tags, such as the <code>for</code> loops and <code>if</code> statements. This way you know when the open tags have been closed. If the code will appear in a Markdown page, keep the opening and closing HTML tags flush against the left edge so that the Markdown filter won't treat the content as a code sample. If necessary, you can wrap the entire code sample in a <code>div</code> tag to ensure the code has HTML tags that bookend the code.</p>
</div>
## Scenario 5: Using a page variable to select the YAML list
Suppose your sidebar will differ based on various documentation sets. You might have 3 different products on your site, and so you want 3 different sidebars &mdash; each unique for that product.
You can store the name of the sidebar list in your page front matter and then pass that value into the list dynamically.
**Page front matter**
```yaml
---
title: My page
sidebar: toc
---
```
**Liquid**
{% raw %}
```liquid
<ul>
{% for item in site.data.samplelist[page.sidebar] %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
```
{% endraw %}
**Result**
<div class="highlight result">
<ul>
<li><a href="#">Introduction</a></li>
<li><a href="#">Configuration</a></li>
<li><a href="#">Deployment</a></li>
</ul>
</div>
In this scenario, we want to pass values from the page's front matter into a `for` loop that contains a variable. When the assigned variable isn't a string but rather a data reference, you must use brackets (instead of curly braces) to refer to the front matter's value.
For more information, see [Expressions and Variables](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#expressions-and-variables) in Liquid's documentation. Brackets are used in places where dot notation can't be used. You can also read more details in this [Stack Overflow answer](http://stackoverflow.com/questions/4968406/javascript-property-access-dot-notation-vs-brackets/4968448#4968448).
## Scenario 6: Applying the active class for the current page
In addition to inserting items from the YAML data file into your list, you also usually want to highlight the current link if the user is viewing that page. You do this by inserting an `active` class for items that match the current page URL.
**CSS**
```css
.result li.active a {
color: lightgray;
cursor: default;
}
```
**Liquid**
{% raw %}
```liquid
{% for item in site.data.samplelist.docs %}
<li class="{% if item.url == page.url %}active{% endif %}">
<a href="{{ item.url }}">{{ item.title }}</a>
</li>
{% endfor %}
```
{% endraw %}
**Result**
<style>
.result li.active a {
color: lightgray;
cursor: default;
}
</style>
<div class="highlight result">
<ul>
<li class=""><a href="#">Introduction</a></li>
<li class=""><a href="#">Configuration</a></li>
<li class="active"><a href="#">Deployment</a></li>
</ul>
</div>
In this case, assume `Deployment` is the current page.
To make sure the `item.url` (stored in the YAML file) matches the `page.url`, it can be helpful to print the `{% raw %}{{ page.url }}{% endraw %}` to the page.
## Scenario 7: Including items conditionally
You might want to include items conditionally in your list. For example, maybe you have multiple site outputs and only want to include the sidebar item for certain outputs. You can add properties in each list item and then use those properties to conditionally include the content.
**YAML**
```yaml
docs2_list_title: ACME Documentation
docs2:
- title: Introduction
url: introduction.html
version: 1
- title: Configuration
url: configuration.html
version: 1
- title: Deployment
url: deployment.html
version: 2
```
**Liquid**
{% raw %}
```liquid
<ul>
{% for item in site.data.samplelist.docs2 %}
{% if item.version == 1 %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
```
{% endraw %}
**Result**
<div class="highlight result">
<ul>
<li><a href="#">Introduction</a></li>
<li><a href="#">Configuration</a></li>
</ul>
</div>
The `Deployment` page is excluded because its `version` is `2`.
## Scenario 8: Retrieving items based on front matter properties
If you don't want to store your navigation items in a YAML file in your `_data` folder, you can use `for` loops to look through the YAML front matter of each page or collection and get the content based on properties in the front matter.
In this scenario, suppose we have a collection called `_docs`. Collections are often better than pages because they allow you to narrow the list of what you're looping through. (Try to avoid scenarios where you loop through large numbers of items, since it will increase your build time. [Collections]({% link _docs/collections.md %}) help you narrow the scope.)
In our scenario, there are 6 docs in the `docs` collection: Sample 1, Sample 2, Topic 1, Topic 2, Widget 1, and Widget 2.
Each doc in the collection contains at least 3 properties in the front matter:
* `title`
* `category`
* `order`
The front matter for each page is as follows (consolidated here for brevity):
```yaml
---
Title: Sample 1
category: getting-started
order: 1
---
---
Title: Sample 2
category: getting-started
order: 2
---
---
Title: Topic 1
category: configuration
order: 1
---
---
Title: Topic 2
category: configuration
order: 2
---
---
Title: Widget 1
category: deployment
order: 1
---
---
Title: Widget 2
category: deployment
order: 2
---
```
Note that even though `category` is used in the doc front matter, `category` is not a built-in variable like it is with posts. In other words, you cannot look directly inside `category` with `site.docs.category`.
If you wanted to simply get all docs in the collection for a specific category, you could use a `for` loop with an `if` condition to check for a specific category:
{% raw %}
```liquid
<h3>Getting Started</h3>
<ul>
{% for doc in site.docs %}
{% if doc.category == "getting-started" %}
<li><a href="{{ doc.url }}">{{ doc.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
```
{% endraw %}
The result would be as follows:
<div class="highlight result">
<h3>Getting Started</h3>
<ul>
<li><a href="#">Sample1</a></li>
<li><a href="#">Sample2</a></li>
</ul>
</div>
This might be useful if you're setting up a knowledge base and have dozens of topics in each category, with each category displaying on its own page.
But let's say you want to sort the items by category and group them under the category name, without hard-coding the category names. To achieve this, you could use two filters:
* `group_by`
* `sort`
Here's the code for getting lists of pages grouped under their corresponding category headers:
**Liquid**
{% raw %}
```liquid
{% assign mydocs = site.docs | group_by: 'category' %}
{% for cat in mydocs %}
<h2>{{ cat.name | capitalize }}</h2>
<ul>
{% assign items = cat.items | sort: 'order' %}
{% for item in items %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
```
{% endraw %}
**Result**
<div class="highlight result">
<h2>Getting-started</h2>
<ul>
<li><a href="#">Sample2</a></li>
<li><a href="#">Sample1</a></li>
</ul>
<h2>Configuration</h2>
<ul>
<li><a href="#">Topic2</a></li>
<li><a href="#">Topic1</a></li>
</ul>
<h2>Deployment</h2>
<ul>
<li><a href="#">Widget2</a></li>
<li><a href="#">Widget1</a></li>
</ul>
</div>
Let's walk through the code. First, we assign a variable (`mydocs`) to the collection content (`site.docs`).
The `group_by` filter groups the collection content by `category`. More specifically, the `group_by` filter converts `mydocs` into an array with `name`, `items`, and `size` properties, somewhat like this:
```yaml
[
{"name": "getting-started", "items": [Sample 1, Sample 2],"size": 2},
{"name": "configuration", "items": [Topic 1, Topic 2], "size": 2},
{"name": "deployment", "items": [Widget 1, Widget 2, "size": 2}
]
```
Using `for cat in mydocs`, we look through each item in the `mydocs` array and print the category `name`.
After getting the category name, we assign the variable `items` for the docs and use the `sort` filter to arrange the docs by their `order` property. The dot notation `cat.items` is used because we're accessing the content in the `items` array. The `sort` filter orders the items by their numbers in ascending order.
The `for item in items` loop looks through each `item` and gets the `title` and `url` to form the list item link.
For more details on the `group_by` filter, see [Jekyll's Templates documentation](https://jekyllrb.com/docs/templates/) as well as [this Siteleaf tutorial](https://www.siteleaf.com/blog/advanced-liquid-group-by/). For more details on the `sort` filter, see [sort](https://shopify.github.io/liquid/filters/sort/) in Liquid's documentation.
Whether you use properties in your doc's front matter to retrieve your pages or a YAML data file, in both cases you can programmatically build a more robust navigation for your site.

View File

@@ -1,159 +0,0 @@
---
layout: tutorials
permalink: /tutorials/orderofinterpretation/
title: Order of interpretation
---
Jekyll's main job is to convert your raw text files into a static website. It does this by rendering Liquid, Markdown, and other transforms as it generates the static HTML output.
In this conversion process, it's important to understand Jekyll's order of interpretation. By "order of interpretation," we mean what gets rendered, in what order, and what rules get applied in converting content.
If an element isn't converting, you can troubleshoot the problem by analyzing the order of interpretation.
## Order of interpretations
Jekyll converts your site in the following order:
1. **Site variables**. Jekyll looks across your files and populates [site variables]({% link _docs/variables.md %}), such as `site`, `page`, `post`, and collection objects. (From these objects, Jekyll determines the values for permalinks, tags, categories, and other details.)
2. **Liquid**. Jekyll processes any [Liquid](https://github.com/Shopify/liquid) formatting in pages that contain [front matter]({% link _docs/frontmatter.md %}). You can identify Liquid as follows:
* **Liquid tags** start with `{% raw %}{%{% endraw %}` and end with a `{% raw %}%}{% endraw %}`. For example: `{% raw %}{% highlight %}{% endraw %}` or `{% raw %}{% seo %}{% endraw %}`. Tags can define blocks or be inline. Block-defining tags will also come with a corresponding end tag &mdash; for example, `{% raw %}{% endhighlight %}{% endraw %}`.
* **Liquid variables** start and end with double curly braces. For example: `{% raw %}{{ site.myvariable }}{% endraw %}` or `{% raw %}{{ content }}{% endraw %}`.
* **Liquid filters** start with a pipe character (`|`) and can only be used within **Liquid variables** after the variable string. For example: the `relative_url` filter in `{% raw %}{{ "css/main.css" | relative_url }}{% endraw %}`.
3. **Markdown**. Jekyll converts Markdown to HTML using the Markdown filter specified in your config file. Files must have a Markdown file extension and front matter in order for Jekyll to convert them.
4. **Layout**. Jekyll pushes content into the layouts specified by the page's front matter (or as specified in the config file). The content from each page gets pushed into the `{% raw %}{{ content }}{% endraw %}` tags within the layouts.
5. **Files**. Jekyll writes the generated content into files in the [directory structure]({% link _docs/structure.md %}) in `_site`. Pages, posts, and collections get structured based on their [permalink]({% link _docs/permalinks.md %}) setting. Directories that begin with `_` (such as `_includes` and `_data`) are usually hidden in the output.
## Scenarios where incorrect configurations create problems
For the most part, you don't have to think about the order of interpretation when building your Jekyll site. These details only become important to know when something isn't rendering.
The following scenarios highlight potential problems you might encounter. These problems come from misunderstanding the order of interpretation and can be easily fixed.
### Variable on page not rendered because variable is assigned in layout
In your layout file (`_layouts/default.html`), suppose you have a variable assigned:
{% raw %}
```liquid
{% assign myvar = "joe" %}
```
{% endraw %}
On a page that uses the layout, you reference that variable:
{% raw %}
```liquid
{{ myvar }}
```
{% endraw %}
The variable won't render because the page's order of interpretation is to render Liquid first and later process the Layout. When the Liquid rendering happens, the variable assignment isn't available.
To make the code work, you could put the variable assignment into the page's front matter.
### Markdown in include file not processed
Suppose you have a Markdown file at `_includes/mycontent.md`. In the Markdown file, you have some Markdown formatting:
```markdown
This is a list:
* first item
* second item
```
You include the file into an HTML file as follows:
{% raw %}
```liquid
{% include mycontent.md %}
```
{% endraw %}
The Markdown is not processed because first the Liquid (`include` tag) gets processed, inserting `mycontent.md` into the HTML file. *Then* the Markdown would get processed.
But because the content is included into an *HTML* page, the Markdown isn't rendered. The Markdown filter processes content only in Markdown files.
To make the code work, use HTML formatting in includes that are inserted into HTML files.
Note that `highlight` tags don't require Markdown to process. Suppose your include contains the following:
{% raw %}
```liquid
{% highlight javascript %}
console.log('alert');
{% endhighlight %}
```
{% endraw %}
The `highlight` tag *is* Liquid. (Liquid passes the content to Rouge or Pygments for syntax highlighting.) As a result, this code will actually convert to HTML with syntax highlighting. Jekyll does not need the Markdown filter to process `highlight` tags.
### Liquid mixed with JavaScript isn't rendered
Suppose you try to mix Liquid's `assign` tag with JavaScript, like this:
{% raw %}
```javascript
<button onclick="someFunction()">Click me</button>
<p id="intro"></p>
<script>
{% assign someContent = "This is some content" %}
function someFunction() {
document.getElementById("intro").innerHTML = someContent;
}
</script>
```
{% endraw %}
This won't work because the `assign` tag is only available during the Liquid rendering phase of the site. In this JavaScript example, the script executes when a user clicks a button ("Click me") on the HTML page. At that time, the Liquid logic is no longer available, so the `assign` tag wouldn't return anything.
However, you can use Jekyll's site variables or Liquid to *populate* a script that is executed at a later time. For example, suppose you have the following property in your front matter: `someContent: "This is some content"`. You could do this:
{% raw %}
```js
<button onclick="someFunction()">Click me</button>
<p id="intro"></p>
<script>
function someFunction() {
document.getElementById("intro").innerHTML = "{{ page.someContent }}";
}
</script>
```
{% endraw %}
When Jekyll builds the site, this `someContent` property populates the script's values, converting `{% raw %}{{ page.someContent }}{% endraw %}` to `"This is some content"`.
The key to remember is that Liquid renders when Jekyll builds your site. Liquid is not available at run-time in the browser when a user executes an event.
## Note about using Liquid in YAML
There's one more detail to remember: Liquid does not render when embedded in YAML files or front matter. (This isn't related to order of interpretation, but it's worth mentioning because it's a common question about element rendering.)
For example, suppose you have a `highlight` tag in your `_data/mydata.yml` file:
{% raw %}
```liquid
myvalue: >
{% highlight javascript %}
console.log('alert');
{% endhighlight %}
```
{% endraw %}
On a page, you try to insert the value:
{% raw %}
```liquid
{{ site.data.mydata.myvalue }}
```
{% endraw %}
This would render only as a string rather than a code sample with syntax highlighting. To make the code render, consider using an include instead.

View File

@@ -1,106 +0,0 @@
---
layout: tutorials
permalink: /tutorials/using-jekyll-with-bundler/
title: Using Jekyll with Bundler
---
> Bundler provides a consistent environment for Ruby projects by tracking and
> installing the exact gems and versions that are needed.
[Bundler](https://bundler.io) can be a great tool to use with Jekyll. Because it
tracks dependencies on a per-project basis, it is particularly useful if you
need to run different versions of Jekyll in different projects, or if you don't
want to install Jekyll at the system or user level. This tutorial will show you
how to create a new Jekyll project using Bundler and without installing Jekyll
outside the project.
## Before You Begin
To complete this tutorial, you'll need to have
[Ruby](https://www.ruby-lang.org/en/) and [Bundler](https://bundler.io/)
installed. You can find the installation instructions on their websites.
## Initialize Bundler
The first thing to do is create a new directory for your project and run
`bundle init`. This creates a new Bundler project (by creating an empty
Gemfile).
```sh
mkdir my-jekyll-website
cd my-jekyll-website
bundle init
```
## Configure Bundler
This step is optional, but encouraged. We're going to configure Bundler to install
gems in the `./vendor/bundle/` project subdirectory. This allows us to install
our dependencies in an isolated environment, ensuring they don't conflict with
other gems on your system. If you skip this step, Bundler will install your
dependencies globally on your system.
```sh
bundle install --path vendor/bundle
```
<div class="note info">
<h5>Bundler Config is Persistent</h5>
<p>
This step is only required once per project. Bundler saves your config in
<code>./.bundle/config</code>, so future gems will be installed to the same
location.
</p>
</div>
## Add Jekyll
Now, we're going to use Bundler to add Jekyll as a dependency of our new
project. This command will add the Jekyll gem to our Gemfile and install it to
the `./vendor/bundle/` folder.
```sh
bundle add jekyll
```
## Create A Jekyll Scaffold
Now that Jekyll is installed, we can use it to create the scaffolding for our
site. We need the `--force` parameter because our folder isn't empty - it
already has some Bundler files in it. We run the `bundle install` separately
because Jekyll gets confused if the Gemfile already exists.
```sh
bundle exec jekyll new --force --skip-bundle .
bundle install
```
## Serve the Site
Your new website is ready! You can serve the website with
`bundle exec jekyll serve` and visit it at
[http://127.0.0.1:4000](http://127.0.0.1:4000). From here, you're ready to
continue developing the site on your own. All of the normal Jekyll commands are
available to you, but you should prefix them with `bundle exec` so that Bundler
runs the version of Jekyll that is installed in your project folder.
## Commit to Source Control
If you're storing your new site in version control, you'll want to ignore the
`./vendor/` and `./.bundle/` folders since they contain user- or
platform-specific information. New users will be able to install the correct
dependencies based on `Gemfile` and `Gemfile.lock`, which should both be checked
in. You can use this `.gitignore` to get started, if you want.
**.gitignore**
```
# Ignore folders generated by Bundler
vendor
.bundle
# Ignore folders generated by Jekyll
.sass-cache
_site
```

View File

@@ -1,35 +0,0 @@
---
layout: tutorials
permalink: /tutorials/video-walkthroughs/
title: Video Walkthroughs
---
[Giraffe Academy](https://www.youtube.com/c/GiraffeAcademy) has a series of videos that will walk you through the basics of using Jekyll. In this series you'll learn everything from installing Jekyll on your computer and setting up your first site, to using more complex features like variables, layouts and conditionals.
<div class="videoWrapper" >
<iframe src="https://www.youtube.com/embed/T1itpPvFWHI?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
## List of Lessons
1. [Introduction to Jekyll (see above)](https://www.youtube.com/watch?v=T1itpPvFWHI&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=1)
2. [Mac Installation](https://www.youtube.com/watch?v=WhrU9m82Wm8&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=2)
3. [Windows Installation](https://www.youtube.com/watch?v=LfP7Y9Ja6Qc&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=3)
4. [Creating a Site](https://www.youtube.com/watch?v=pxua_1vyFck&index=4&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
5. [Front Matter](https://www.youtube.com/watch?v=ZtEbGztktvc&index=5&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
6. [Writing Posts](https://www.youtube.com/watch?v=gsYqPL9EFwQ&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=6)
7. [Working With Drafts](https://www.youtube.com/watch?v=X8jXkW3k2Jg&index=7&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
8. [Creating Pages](https://www.youtube.com/watch?v=1na-IWfv08M&index=8&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
9. [Permalinks](https://www.youtube.com/watch?v=938jDG_YPdc&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=9)
10. [Front Matter Defaults](https://www.youtube.com/watch?v=CLCaJJ1zUHU&index=10&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
11. [Themes](https://www.youtube.com/watch?v=NoRS2D-cyko&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=11)
12. [Layouts](https://www.youtube.com/watch?v=bDQsGdCWv4I&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=12)
13. [Variables](https://www.youtube.com/watch?v=nLJBF2KiOZw&index=13&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
14. [Includes](https://www.youtube.com/watch?v=HfcJeRby2a8&index=14&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
15. [Looping Through Posts](https://www.youtube.com/watch?v=6N1X5XffuUA&index=15&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
16. [Conditionals](https://www.youtube.com/watch?v=iNZBEki_x6o&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=16)
17. [Data Files](https://www.youtube.com/watch?v=M6b0KmLB-pM&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=17)
18. [Static Files](https://www.youtube.com/watch?v=knWjmVlVpso&index=18&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB)
19. [Hosting on Github Pages](https://www.youtube.com/watch?v=fqFjuX4VZmU&list=PLLAZ4kZ9dFpOPV5C5Ay0pHaa0RJFhcmcB&index=19)

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