Merge branch 'master' into themes

This commit is contained in:
Ben Balter 2016-03-05 13:04:15 -05:00
commit 8bfb9e51f3
38 changed files with 210 additions and 138 deletions

View File

@ -1,5 +1,4 @@
Contribute
==========
# Contributing
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
@ -56,7 +55,7 @@ Workflow
Here's the most direct way to get your work merged into the project:
* Fork the project.
* [Fork](https://github.com/jekyll/jekyll/fork) the project.
* Clone down your fork ( `git clone git@github.com:[username]/jekyll.git` ).
* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ).
* Hack away, add tests. Not necessarily in that order.

View File

@ -9,7 +9,6 @@ rvm:
- &ruby1 2.3.0
- &ruby2 2.2.4
- &ruby3 2.1.8
- &ruby4 2.0.0-p648
- &jruby jruby-9.0.4.0
- &rhead ruby-head

View File

@ -1,4 +1,4 @@
# Contributor Code of Conduct
# 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

View File

@ -55,7 +55,7 @@ end
group :jekyll_optional_dependencies do
gem "toml", "~> 0.1.0"
gem "coderay", "~> 1.1.0"
gem "jekyll-docs", path: '../docs' if Dir.exist?('../docs')
gem "jekyll-docs", :path => '../docs' if Dir.exist?('../docs') && ENV['JEKYLL_VERSION']
gem "jekyll-gist", "~> 1.0"
gem "jekyll-feed", "~> 0.1.3"
gem "jekyll-coffeescript", "~> 1.0"
@ -80,6 +80,7 @@ group :site do
if ENV["PROOF"]
gem "html-proofer", "~> 2.0"
end
gem "jemoji"
gem "jekyll-sitemap"
gem "jekyll-seo-tag", "~> 1.1"

View File

@ -1,8 +1,35 @@
## HEAD
### Minor Enhancements
* Stop testing with Ruby 2.0.x, which is EOL'd. (#4381)
* 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)
### Bug Fixes
* Site Template: Added a default lang attribute (#4633)
* Site template: Escape title and description where it is used in HTML (#4606)
* Document#date: drafts which have no date should use source file mtime (#4611)
* Filters#time: clone an input Time so as to be non-destructive (#4590)
* Doctor: fix issue where `--config` wasn't a recognized flag (#4598)
* Ensures related_posts are only set for a post (#4620)
### Development Fixes
* Add project maintainer profile links (#4591)
* Fix state leakage in Kramdown test (#4618)
* Unify method for copying special files from repo to site (#4601)
### Site Enhancements
* Add jekyll-seo-tag, jekyll-avatar, and jekyll-sitemap to the site (#4553)
* Add Google search query to /docs/help/ (#4589)
* Upgrading, documentation (#4597)
* Add 'view source' entry (#4602)
* Add jekyll-video-embed to list of third-party plugins. (#4621)
* Adding Aerobatic to list of deployment options (#4630)
## 3.1.2 / 2016-02-19

View File

@ -1,4 +1,4 @@
# [Jekyll](http://jekyllrb.com/)
# [Jekyll](https://jekyllrb.com/)
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
[![Build Status](https://travis-ci.org/jekyll/jekyll.svg?branch=master)][travis]
@ -14,7 +14,7 @@
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
[travis]: https://travis-ci.org/jekyll/jekyll
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](https://pages.github.com), which you can use to host sites right from your GitHub repositories.
## Philosophy
@ -22,14 +22,14 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
## Having trouble with OS X El Capitan?
See: http://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
See: https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
## Getting Started
* [Install](http://jekyllrb.com/docs/installation/) the gem
* Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/)
* [Install](https://jekyllrb.com/docs/installation/) the gem
* Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
## Code of Conduct
@ -41,17 +41,17 @@ 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 a maintainer (@parkr, @envygeeks, or @mattr-) know
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
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
* Learn how the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) works
* Put information on your site with [Variables](http://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](http://jekyllrb.com/docs/permalinks/) your posts are generated with
* Use the built-in [Liquid Extensions](http://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](http://jekyllrb.com/docs/plugins/) to generate content specific to your site
* Learn how the [YAML Front Matter](https://jekyllrb.com/docs/frontmatter/) works
* Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
* 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
## License

View File

@ -87,6 +87,30 @@ def converted_history(markdown)
normalize_bullets(markdown)))))
end
def siteify_file(file, front_matter = {})
abort "You seem to have misplaced your #{file} file. I can haz?" unless File.exists?(file)
title = File.read(file).match(/\A# (.*)$/)[1]
slug = File.basename(file, ".markdown").downcase
front_matter = front_matter.merge({
"title" => title,
"layout" => "docs",
"permalink" => "/docs/#{slug}/",
"note" => "This file is autogenerated. Edit /#{file} instead."
})
contents = "#{front_matter.to_yaml}---\n\n#{content_for(file)}"
File.write("site/_docs/#{slug}.md", contents)
end
def content_for(file)
contents = File.read(file)
case file
when "History.markdown"
converted_history(contents)
else
contents.gsub!(/\A# .*\n\n?/, "")
end
end
#############################################################################
#
# Standard tasks

View File

@ -10,7 +10,6 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p>Signs are nice</p>\n<p><code class=\"highlighter-rouge\">Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Page without title.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
And the "_site/methods/configuration.html" file should not exist
Scenario: Rendered collection
@ -77,8 +76,8 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Then the _site directory should exist
And I should see "Collections: _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Collections specified as an hash
Given I have an "index.html" page that contains "Collections: {% for method in site.methods %}{{ method.relative_path }} {% endfor %}"
@ -90,8 +89,8 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Then the _site directory should exist
And I should see "Collections: _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: All the documents
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
@ -103,11 +102,11 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "All documents: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Then the _site directory should exist
And I should see "All documents: _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Documents have an output attribute, which is the converted HTML
Given I have an "index.html" page that contains "First document's output: {{ site.documents.first.output }}"
Given I have an "index.html" page that contains "Second document's output: {{ site.documents[1].output }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
@ -116,8 +115,8 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "First document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
Then the _site directory should exist
And I should see "Second document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
Scenario: Filter documents by where
Given I have an "index.html" page that contains "{% assign items = site.methods | where: 'whatever','foo.bar' %}Item count: {{ items.size }}"
@ -133,7 +132,7 @@ Feature: Collections
And I should see "Item count: 2" in "_site/index.html"
Scenario: Sort by title
Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}1. of {{ items.size }}: {{ items.first.output }}"
Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}2. of {{ items.size }}: {{ items[1].output }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
@ -143,10 +142,10 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "1. of 7: <p>Page without title.</p>" in "_site/index.html"
And I should see "2. of 8: <p>Page without title.</p>" in "_site/index.html"
Scenario: Sort by relative_path
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{% for method in methods %}{{ method.title }}, {% endfor %}"
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{{ methods | map:"title" | join: ", " }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
@ -156,7 +155,7 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Site#generate, YAML with Dots," in "_site/index.html"
And I should see "Collections: Collection#entries, Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Site#generate," in "_site/index.html"
Scenario: Rendered collection with date/dateless filename
Given I have an "index.html" page that contains "Collections: {% for method in site.thanksgiving %}{{ method.title }} {% endfor %}"

View File

@ -186,3 +186,20 @@ Feature: Create sites
Then I should get a zero exit status
And the _site directory should exist
And the "_site/2020/12/31/entry1.html" file should exist
Scenario: Basic site with layouts, posts and related posts
Given I have a _layouts directory
And I have a page layout that contains "Page {{ page.title }}: {{ content }}"
And I have a post layout that contains "Post {{ page.title }}: {{ content }}Related posts: {{ site.related_posts | size }}"
And I have an "index.html" page with layout "page" that contains "Site contains {{ site.pages.size }} pages and {{ site.posts.size }} posts; Related posts: {{ site.related_posts | size }}"
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2009-03-27 | post | content for entry1. |
| entry2 | 2009-04-27 | post | content for entry2. |
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Page : Site contains 1 pages and 2 posts; Related posts: 0" in "_site/index.html"
And I should see "Post entry1: <p>content for entry1.</p>\nRelated posts: 1" in "_site/2009/03/27/entry1.html"
And I should see "Post entry2: <p>content for entry2.</p>\nRelated posts: 1" in "_site/2009/04/27/entry2.html"

View File

@ -78,7 +78,7 @@ module Jekyll
def entries
return [] unless exists?
@entries ||=
Utils.safe_glob(collection_dir, ["**", "*.*"]).map do |entry|
Utils.safe_glob(collection_dir, ["**", "*"]).map do |entry|
entry["#{collection_dir}/"] = ''
entry
end

View File

@ -8,7 +8,7 @@ module Jekyll
c.description 'Search site and print specific deprecation warnings'
c.alias(:hyde)
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.option 'config', '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.action do |_, options|
Jekyll::Commands::Doctor.process(options)

View File

@ -68,7 +68,11 @@ module Jekyll
end
def date
data['date'] ||= site.time
data['date'] ||= (draft? ? source_file_mtime : site.time)
end
def source_file_mtime
@source_file_mtime ||= File.mtime(path)
end
# Returns whether the document is a draft. This is only the case if

View File

@ -205,7 +205,7 @@ module Jekyll
input.group_by do |item|
item_property(item, property).to_s
end.inject([]) do |memo, i|
memo << { "name" => i.first, "items" => i.last }
memo << { "name" => i.first, "items" => i.last, "size" => i.last.size }
end
else
input
@ -315,7 +315,7 @@ module Jekyll
def time(input)
case input
when Time
input
input.clone
when Date
input.to_time
when String

View File

@ -40,6 +40,8 @@ module Jekyll
if document.is_a?(Document) && document.collection.label == 'posts'
payload['site']['related_posts'] = document.related_posts
else
payload['site']['related_posts'] = nil
end
# render and transform content (this becomes the final content of the object)

View File

@ -2,12 +2,12 @@
<div class="wrapper">
<h2 class="footer-heading">{{ site.title }}</h2>
<h2 class="footer-heading">{{ site.title | escape }}</h2>
<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<ul class="contact-list">
<li>{{ site.title }}</li>
<li>{{ site.title | escape }}</li>
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
</ul>
</div>
@ -29,7 +29,7 @@
</div>
<div class="footer-col footer-col-3">
<p>{{ site.description }}</p>
<p>{{ site.description | escape }}</p>
</div>
</div>

View File

@ -4,9 +4,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description | escape }}{% endif %}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>

View File

@ -1,8 +1,8 @@
<header class="site-header">
<header class="site-header" role="banner">
<div class="wrapper">
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title | escape }}</a>
<nav class="site-nav">
<a href="#" class="menu-icon">
@ -16,7 +16,7 @@
<div class="trigger">
{% for my_page in site.pages %}
{% if my_page.title %}
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a>
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title | escape }}</a>
{% endif %}
{% endfor %}
</div>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
{% include head.html %}

View File

@ -4,7 +4,7 @@ layout: default
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<h1 class="post-title">{{ page.title | escape }}</h1>
</header>
<div class="post-content">

View File

@ -4,7 +4,7 @@ layout: default
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
</header>

View File

@ -177,13 +177,10 @@ pre {
/**
* Clearfix
*/
%clearfix {
&:after {
content: "";
display: table;
clear: both;
}
%clearfix:after {
content: "";
display: table;
clear: both;
}
@ -191,16 +188,13 @@ pre {
/**
* Icons
*/
.icon {
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
> svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
path {
fill: $grey-color;
}
path {
fill: $grey-color;
}
}

View File

@ -12,7 +12,7 @@ layout: default
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title | escape }}</a>
</h2>
</li>
{% endfor %}

View File

@ -5,7 +5,7 @@
#############################################################################
namespace :site do
task :generated_pages => [:history, :version_file, :conduct]
task :generated_pages => [:history, :version_file, :conduct, :contributing]
desc "Generate and view the site locally"
task :preview => :generated_pages do
@ -103,41 +103,21 @@ namespace :site do
desc "Create a nicely formatted history page for the jekyll site based on the repo history."
task :history do
if File.exist?("History.markdown")
history_file = File.read("History.markdown")
front_matter = {
"layout" => "docs",
"title" => "History",
"permalink" => "/docs/history/"
}
Dir.chdir('site/_docs/') do
File.open("history.md", "w") do |file|
file.write("#{front_matter.to_yaml}---\n\n")
file.write(converted_history(history_file))
end
end
else
abort "You seem to have misplaced your History.markdown file. I can haz?"
end
siteify_file('History.markdown')
end
desc "Copy the Code of Conduct"
task :conduct do
code_of_conduct = File.read("CONDUCT.markdown")
header, _, body = code_of_conduct.partition("\n\n")
front_matter = {
"layout" => "docs",
"title" => header.sub('# Contributor ', ''),
"permalink" => "/docs/conduct/",
"redirect_from" => "/conduct/index.html",
"editable" => false
}
Dir.chdir('site/_docs') do
File.open("conduct.md", "w") do |file|
file.write("#{front_matter.to_yaml}---\n\n")
file.write(body)
end
end
siteify_file('CONDUCT.markdown', front_matter)
end
desc "Copy the contributing file"
task :contributing do
siteify_file('.github/CONTRIBUTING.markdown')
end
desc "Write the site latest_version.txt file"

View File

@ -14,6 +14,7 @@ INGORE_HREFS=$(ruby -e 'puts %w{
twitter.com
nearlyfreespeech.net
eduardoboucas.com
github.com\/matrix9180
}.map{|h| "/#{h}/"}.join(",")')
SOURCE="site"
DESTINATION="_site"
@ -31,4 +32,4 @@ bundle exec jekyll build -s $SOURCE -d $DESTINATION --trace
# 3.
msg "Proofing..."
time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS
time bundle exec htmlproof ./$DESTINATION --url-ignore $INGORE_HREFS

View File

@ -1,9 +1,10 @@
---
layout: docs
title: Code of Conduct
permalink: "/docs/conduct/"
redirect_from: "/conduct/index.html"
editable: false
title: Code of Conduct
layout: docs
permalink: "/docs/conduct/"
note: This file is autogenerated. Edit /CONDUCT.markdown instead.
---
As contributors and maintainers of this project, and in the interest of

View File

@ -1,7 +1,8 @@
---
layout: docs
title: Contributing
permalink: /docs/contributing/
layout: docs
permalink: "/docs/contributing/"
note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead.
---
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
@ -27,38 +28,29 @@ following in mind:
change is to review, the more likely it will be merged.
* When submitting a pull request, please make judicious use of the pull request
body. A description of what changes were made, the motivations behind the
changes, and [any tasks completed or left to complete](http://git.io/gfm-tasks)
changes and [any tasks completed or left to complete](http://git.io/gfm-tasks)
will also speed up review time.
<div class="note warning">
<h5>Contributions will not be accepted without tests</h5>
<p>
If youre creating a small fix or patch to an existing feature, just
a simple test will do.
</p>
</div>
Test Dependencies
-----------------
To run the test suite and build the gem you'll need to install Jekyll's
dependencies. Simply run this command to get all set up:
dependencies. Simply run this command to get all setup:
<figure class="highlight"><pre><code>$ script/bootstrap</code></pre></figure>
$ script/bootstrap
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
<figure class="highlight"><pre><code>$ script/cibuild</code></pre></figure>
$ script/cibuild
If you are only updating a file in `test/`, you can use the command:
<figure class="highlight"><pre><code>$ script/test test/blah_test.rb</code></pre></figure>
$ script/test test/blah_test.rb
If you are only updating a `.feature` file, you can use the command:
<figure class="highlight"><pre><code>$ script/cucumber features/blah.feature</code></pre></figure>
$ script/cucumber features/blah.feature
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
@ -68,7 +60,7 @@ Workflow
Here's the most direct way to get your work merged into the project:
* Fork the project.
* [Fork](https://github.com/jekyll/jekyll/fork) the project.
* Clone down your fork ( `git clone git@github.com:[username]/jekyll.git` ).
* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ).
* Hack away, add tests. Not necessarily in that order.
@ -86,18 +78,19 @@ open-sourced our docs and we welcome any pull requests if you find it
lacking.
You can find the documentation for jekyllrb.com in the
[site]({{ site.repository }}/tree/master/site) directory of
[site](https://github.com/jekyll/jekyll/tree/master/site) directory of
Jekyll's repo on GitHub.com.
All documentation pull requests should be directed at `master`. Pull
requests directed at another branch will not be accepted.
The [Jekyll wiki]({{ site.repository }}/wiki) on GitHub
The [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) on GitHub
can be freely updated without a pull request as all GitHub users have access.
If you want to add your plugin to the [list of plugins](/docs/plugins/#available-plugins),
please submit a pull request modifying the [plugins page source
file]({{ site.repository }}/blob/master/site/_docs/plugins.md) by adding a
If you want to add your plugin to the
[list of plugins](http://jekyllrb.com/docs/plugins/#available-plugins),
please submit a pull request modifying the
[plugins page source file](site/_docs/plugins.md) by adding a
link to your plugin under the proper subheading depending upon its type.
Gotchas
@ -113,12 +106,5 @@ Gotchas
Finally...
----------
<div class="note">
<h5>Let us know what could be better!</h5>
<p>
Both using and hacking on Jekyll should be fun, simple, and easy, so if for
some reason you find its a pain, please <a
href="{{ site.repository }}/issues/new">create an issue</a> on
GitHub describing your experience so we can make it better.
</p>
</div>
Thanks! Hacking on Jekyll should be fun. If you find any of this hard to figure
out, let us know so we can improve our process or documentation!

View File

@ -219,3 +219,9 @@ Use [Kickster](http://kickster.nielsenramon.com/) for easy (automated) deploys t
Kickster provides a basic Jekyll project setup packed with web best practises and useful optimization tools increasing your overall project quality. Kickster ships with automated and worry-free deployment scripts for GitHub Pages.
Setting up Kickster is very easy, just install the gem and you are good to go. More documentation can here found [here](https://github.com/nielsenramon/kickster#kickster). If you do not want to use the gem or start a new project you can just copy paste the deployment scripts for [Travis CI](https://github.com/nielsenramon/kickster/tree/master/snippets/travis) or [Circle CI](https://github.com/nielsenramon/kickster#automated-deployment-with-circle-ci).
## Aerobatic
[Aerobatic](https://www.aerobatic.com) is an add-on for Bitbucket that brings GitHub Pages style functionality to Bitbucket users. It includes continuous deployment, custom domains with a wildcard SSL cert, CDN, basic auth, and staging branches all in the box.
Automating the build and deployment of a Jekyll site is just as simple as GitHub Pages - push your changes to your repo (excluding the `_site` directory) and within seconds a build will be triggered and your built site deployed to our highly- available, globally distributed hosting service. The build process will even install and execute custom Ruby plugins. See our [Jekyll docs](https://www.aerobatic.com/docs/static-generators#jekyll) for more details.

View File

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

View File

@ -1,7 +1,8 @@
---
layout: docs
title: History
layout: docs
permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 3.1.2 / 2016-02-19

View File

@ -845,6 +845,7 @@ LESS.js files during generation.
- [Jekyll-Youtube](https://github.com/dommmel/jekyll-youtube) A Liquid tag that embeds Youtube videos. The default emded markup is responsive but you can also specify your own by using an include/partial.
- [Jekyll Flickr Plugin](https://github.com/lawmurray/indii-jekyll-flickr) by [Lawrence Murray](http://www.indii.org): Embeds Flickr photosets (albums) as a gallery of thumbnails, with lightbox links to larger images.
- [jekyll-figure](https://github.com/paulrobertlloyd/jekyll-figure): A liquid tag for Jekyll that generates `<figure>` elements.
- [Jekyll Video Embed](https://github.com/eug/jekyll-video-embed): It provides several tags to easily embed videos (e.g. Youtube, Vimeo, UStream and Ted Talks)
#### Collections

View File

@ -14,7 +14,7 @@ Jekylls growing use is producing a wide variety of tutorials, frameworks, ext
- [Blogging with Git, Emacs and Jekyll](http://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
### Integrations
- [Use FormKeep as a backend for forms (contact forms, hiring forms, etc.)](https://formkeep.com/guides/how-to-make-a-contact-form-in-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll)
- [Use Simple Form to add a simple contact form](http://getsimpleform.com/)
@ -24,7 +24,7 @@ Jekylls growing use is producing a wide variety of tutorials, frameworks, ext
### Other commentary
- [My Jekyll Fork, by Mike West](http://mikewest.org/2009/11/my-jekyll-fork)
- [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 its core. Here, Ill point out some highlights of my fork in the hopes that they see usage beyond this site.”

View File

@ -5,12 +5,20 @@ title: Getting Help
Need help with Jekyll? Try these resources.
### [Upgrading Documentation](/docs/upgrading/)
### [Upgrading](/docs/upgrading/)
Did you recently upgrade from Jekyll 1 to 2 or from Jekyll 2 to 3?
Known breaking changes are listed in the upgrading docs.
### [Google](https://google.com)
### [Documentation](/docs/home/)
Our guide to Jekyll covering installation, writing, customization, deployment, and more.
### [View source](https://github.com/jekyll/jekyll/wiki/sites)
Learn from the source of others' Jekyll-powered sites.
### [Google](https://www.google.com/?q=jekyll)
Add **jekyll** to almost any query, and you'll find just what you need.

View File

@ -0,0 +1,5 @@
---
title: "Collection#entries"
---
I have no file extension but I should still be a part of the collection.

View File

@ -126,6 +126,7 @@ class TestCollections < JekyllUnitTest
assert_includes %w[
_methods/configuration.md
_methods/sanitized_path.md
_methods/collection/entries
_methods/site/generate.md
_methods/site/initialize.md
_methods/um_hi.md

View File

@ -12,7 +12,7 @@ class TestDocument < JekyllUnitTest
"collections" => ["methods"]
})
@site.process
@document = @site.collections["methods"].docs.first
@document = @site.collections["methods"].docs.detect {|d| d.relative_path == "_methods/configuration.md" }
end
should "exist" do
@ -49,7 +49,7 @@ class TestDocument < JekyllUnitTest
setup do
@site = fixture_site({"collections" => ["methods"]})
@site.process
@document = @site.collections["methods"].docs.last
@document = @site.collections["methods"].docs.detect {|d| d.relative_path == "_methods/yaml_with_dots.md" }
end
should "know its data" do

View File

@ -103,6 +103,13 @@ class TestFilters < JekyllUnitTest
should "format a time according to RFC-822" do
assert_equal "Wed, 27 Mar 2013 11:22:33 +0000", @filter.date_to_rfc822(@sample_time)
end
should "not modify a time in-place when using filters" do
t = Time.new(2004, 9, 15, 0, 2, 37, "+01:00")
assert_equal 3600, t.utc_offset
@filter.date_to_string(t)
assert_equal 3600, t.utc_offset
end
end
context "with Date object" do
@ -289,6 +296,14 @@ class TestFilters < JekyllUnitTest
end
end
end
should "include the size of each grouping" do
grouping = @filter.group_by(@filter.site.pages, "layout")
grouping.each do |g|
p g
assert_equal g["items"].size, g["size"], "The size property for '#{g["name"]}' doesn't match the size of the Array."
end
end
end
context "where filter" do

View File

@ -14,6 +14,7 @@ class TestKramdown < JekyllUnitTest
'auto_ids' => false,
'footnote_nr' => 1,
'syntax_highlighter' => 'rouge',
'syntax_highlighter_opts' => {
'bold_every' => 8, 'css' => :class
}