Compare commits

..

88 Commits

Author SHA1 Message Date
Parker Moore
08a4c02d38 Release 2.1.1 2014-07-10 09:54:44 -07:00
Parker Moore
1cbff6b771 Merge pull request #2564 from jekyll/release-2-1-1 2014-07-10 09:44:17 -07:00
Parker Moore
9df9edc4c7 Finished the Jekyll 2.1.1 release post. [ci skip] 2014-07-10 09:43:55 -07:00
Parker Moore
685cdbe124 Release Jekyll v2.1.1 2014-07-10 09:40:36 -07:00
Parker Moore
57a9deb98d Update history to reflect merge of #2576 [ci skip] 2014-07-09 23:44:26 -07:00
Parker Moore
ece22497dd Merge pull request #2576 from bhollis/maruku-update 2014-07-09 23:44:03 -07:00
Parker Moore
fb170007c8 Update history to reflect merge of #2575 [ci skip] 2014-07-09 23:43:47 -07:00
Parker Moore
36c5017300 Merge pull request #2575 from alfredxing/test-document-permalink 2014-07-09 23:43:01 -07:00
Parker Moore
e8e245e20f Fix Data Files example around iterative over files in a subfolder of _data.
Addresses @fkostadinov's comment in #2395:
https://github.com/jekyll/jekyll/pull/2395#issuecomment-48151478
2014-07-09 08:24:33 -07:00
Parker Moore
2141ea6564 Update history to reflect merge of #2578 [ci skip] 2014-07-08 23:16:58 -07:00
Parker Moore
d3959d5899 Merge pull request #2578 from juthilo/patch-1 2014-07-08 23:16:37 -07:00
Ben Hollis
cbb4b10ce6 Update Maruku dependency to allow use of the latest version.
All Maruku releases post-0.6 follow semver, so they should be backwards-compatible on minor versions. In this case, the only test that needed to change was one that was asserting buggy behavior that was fixed in 0.7.1.
2014-07-08 19:44:40 -07:00
Julian Thilo
861c81b590 Update link to Windows installation guide
I've just released a new version of Run Jekyll on Windows and it's now got its own domain!
2014-07-09 01:44:11 +02:00
Alfred Xing
28131624b8 Don't use old @url variable
Fix for #2557
2014-07-07 10:54:19 -07:00
Alfred Xing
ce1f01c494 Modify tests a bit 2014-07-07 10:49:36 -07:00
Alfred Xing
a13a4ca532 Solidify document permalink tests 2014-07-07 10:39:22 -07:00
Alfred Xing
f830120044 Add test for document permalink 2014-07-07 10:28:03 -07:00
Parker Moore
7645a72b2f Update history to reflect merge of #2572 [ci skip] 2014-07-05 13:46:14 -07:00
Parker Moore
ff8a8b8302 Merge pull request #2572 from AJ-Acevedo/master 2014-07-05 13:44:58 -07:00
AJ Acevedo
a7cc026e2c Fixed broken link to Permalinks page [ci skip]
The Permalinks link was generating a 404 error due to the link using a capital P in the link path.
2014-07-05 14:20:30 -04:00
Parker Moore
c78bf2775f Update history to reflect merge of #2567 [ci skip] 2014-07-04 03:19:41 -04:00
Parker Moore
0082bb22fb Merge pull request #2567 from austinpray/beefUpDox 2014-07-04 03:19:09 -04:00
Austin Pray
febf80cccd Merge branch 'master' of github.com:jekyll/jekyll into beefUpDox 2014-07-03 10:36:16 -05:00
Parker Moore
4d8dab6e33 Update history to reflect merge of #2563 [ci skip] 2014-07-01 20:15:54 -04:00
Parker Moore
f385fd9efd Merge pull request #2563 from jekyll/fix-read-vuln 2014-07-01 20:14:45 -04:00
Parker Moore
a66d96ce0a Use Jekyll.sanitized_path more. 2014-07-01 18:29:15 -04:00
Ben Balter
05f1fac2a7 Add feature for layouts vuln. 2014-07-01 18:29:01 -04:00
Parker Moore
03ae38a41e Merge pull request #2561 from jshawl/fix-typo
Fix typo
2014-06-30 14:12:17 -04:00
Jesse Shawl
fbb8c056d4 Fix typo 2014-06-30 13:26:22 -04:00
Parker Moore
0e68d34e1b Update history to reflect merge of #2558 [ci skip] 2014-06-29 02:52:49 -04:00
Parker Moore
a62027d5f3 Merge pull request #2558 from kleinfreund/patch-1 2014-06-29 02:52:19 -04:00
Philipp Rudloff
db38498d06 Add vertical margin to highlight
…so multiple code blocks are distinctive.
2014-06-29 08:41:59 +02:00
Parker Moore
af11f66646 Minor improvements to the rakefile. 2014-06-28 22:49:03 -04:00
Parker Moore
2a422e1d83 Add contributor list to 2.1.0 release post.
I forgot! I'm really sorry!
2014-06-28 22:48:44 -04:00
Parker Moore
f463aea399 Release 2.1.0 2014-06-28 22:27:57 -04:00
Parker Moore
f93da3cfb1 Add 3 more lines to 2.1.0 release post. 2014-06-28 21:54:56 -04:00
Parker Moore
253b10818c add #2554 to history on site 2014-06-28 21:38:17 -04:00
Parker Moore
2c0e086761 Update history to reflect merge of #2554 [ci skip] 2014-06-28 21:37:59 -04:00
Parker Moore
8882f4dd14 Merge pull request #2554 from alfredxing/fix-build-tomdoc 2014-06-28 21:37:25 -04:00
Parker Moore
2cf76cb701 Merge pull request #2553 from jekyll/release-2.1.0
Release 2.1.0
2014-06-28 21:37:01 -04:00
Alfred Xing
bb9517b73f Fill in a bit of missing TomDoc
Fill in a piece of missing doc for the `build` function in `commands/build.rb`
2014-06-28 17:48:19 -07:00
Parker Moore
f681b35b65 Booooom, 2.1.0 in history on site. 2014-06-28 17:42:53 -04:00
Parker Moore
8c5d36f0ee update history to reflect release of 2.1.0 2014-06-28 17:42:33 -04:00
Parker Moore
08d0ff0922 Bump version in gem. 2014-06-28 17:41:29 -04:00
Parker Moore
e5683b1da5 Release post for 2.1.0 2014-06-28 17:41:22 -04:00
Parker Moore
3dffa8284f Update history to reflect closing of #2520. 2014-06-28 17:20:09 -04:00
Parker Moore
e332197660 Be quiet very quickly. Fixes #2520. 2014-06-28 17:19:40 -04:00
Parker Moore
8b36b71833 Update history to reflect merge of #2552 [ci skip] 2014-06-28 16:59:08 -04:00
Parker Moore
7eb5e07e9d Merge pull request #2552 from jekyll/collections-with-dots 2014-06-28 16:58:11 -04:00
Parker Moore
0b9eb3c111 Ensure collections with dots work. 2014-06-28 16:51:44 -04:00
Parker Moore
5f7a3f2b69 Filter out directories from entries in the collection 2014-06-28 16:51:30 -04:00
Parker Moore
02676572dd Allow dots in collection labels. 2014-06-28 16:51:19 -04:00
Parker Moore
404661fc72 You need NodeJS in order to install jekyll-coffeescript. 2014-06-28 16:09:19 -04:00
Parker Moore
5c3f013325 Upgrade to jekyll-watch 1.0. 2014-06-27 17:52:54 -04:00
Parker Moore
ea4aa4f149 Update history to reflect merge of #2550 [ci skip] 2014-06-27 17:51:16 -04:00
Parker Moore
0c8fc63b33 Merge pull request #2550 from jekyll/extract-watch 2014-06-27 17:50:51 -04:00
Parker Moore
c239746363 Use bundle exec in CI guide. [ci skip]
h/t @ndarville
Ref: #2432
2014-06-27 17:10:06 -04:00
Parker Moore
12b47cc037 Spike out jekyll <cmd> --watch into a separate gem. 2014-06-27 16:41:10 -04:00
Parker Moore
2c636086bd Update history to reflect merge of #2432 [ci skip] 2014-06-27 16:40:02 -04:00
Parker Moore
6a7386e6ba Merge pull request #2432 from jekyll/docs-4-ci 2014-06-27 16:39:19 -04:00
Parker Moore
21ab9f8b9e Speak English good. h/t @gjtorikian 2014-06-27 16:35:21 -04:00
Parker Moore
eab113e4f5 html-proof ~> htmlproof 2014-06-27 15:43:37 -04:00
Parker Moore
bd4a8c1ce2 Fixes, fixes. 2014-06-27 15:32:16 -04:00
Parker Moore
e2de7ab0c7 Finish CI guide. 2014-06-27 15:25:33 -04:00
Parker Moore
a6e80b2bc1 Update history to reflect merge of #2547 [ci skip] 2014-06-27 03:56:39 -04:00
Parker Moore
3f5a55e240 Merge pull request #2547 from penibelst/docs-url 2014-06-27 03:56:23 -04:00
Parker Moore
b79be6d320 updates to CI page. [ci skip] 2014-06-27 03:53:41 -04:00
Anatol Broder
60bb78e25b Remove wrong statement 2014-06-27 09:44:39 +02:00
Parker Moore
281fb549f8 Update history to reflect merge of #2542 [ci skip] 2014-06-25 16:56:49 -04:00
Parker Moore
d16f62cb38 Ensure exclude and include arrays are arrays of strings.
Fixes #2542.
2014-06-25 16:56:27 -04:00
Parker Moore
912bd84629 A little more work. 2014-06-25 16:17:42 -04:00
Anatol Broder
d77078518d Add new page 2014-06-25 16:17:42 -04:00
Parker Moore
e310af00b4 Update history to reflect merge of #2532 [ci skip] 2014-06-25 16:14:56 -04:00
Parker Moore
cedbdf43ca Merge pull request #2532 from alexmedearis/hl_lines 2014-06-25 16:14:14 -04:00
Parker Moore
911559fe05 Update history to reflect merge of #2544 [ci skip] 2014-06-25 16:13:58 -04:00
Parker Moore
c958eae551 Merge pull request #2544 from mikecole/patch-2 2014-06-25 16:13:31 -04:00
mikecole
053ba9a9ca Provide an updated, more comprehensive link...
to Windows installation instructions.
2014-06-25 13:50:07 -05:00
Parker Moore
c5aa74f823 Update history to reflect merge of #2490 [ci skip] 2014-06-24 23:04:53 -04:00
Parker Moore
20180923cf Merge pull request #2490 from penibelst/deep-defaults 2014-06-24 23:04:38 -04:00
Parker Moore
6e104c3ed0 Ensure the post categories are unique (only one). Ref: #2527 #2531
h/t @Nicholas-Perry
https://github.com/jekyll/jekyll/issues/2527#issuecomment-47041756
2014-06-24 19:15:02 -04:00
Anatol Broder
880a503094 Add a test 2014-06-24 20:27:01 +02:00
Anatol Broder
edbc273829 Use Utils.deep_merge_hashes 2014-06-24 20:24:26 +02:00
Anatol Broder
5f807e7421 Merge deep 2014-06-24 20:20:15 +02:00
Alex Medearis
b202b508f2 handles line numbers with more than 1 digit 2014-06-18 17:48:50 -07:00
Alex Medearis
a7d20df95a unit tests 2014-06-18 17:29:07 -07:00
Alex Medearis
674b540c6f unit tests 2014-06-18 17:27:27 -07:00
Alex Medearis
8b860d3f0e Fixes highlight.rb to correctly parse list values 2014-06-18 17:08:50 -07:00
Austin Pray
a79279b1cc Beefs up variables.md
Adds site.data
Adds site.collections
Adds site.html_pages
2014-05-11 16:21:47 -05:00
36 changed files with 520 additions and 129 deletions

View File

@@ -2,6 +2,31 @@
### Major Enhancements
### Minor Enhancements
### Bug Fixes
### Development Fixes
### Site Enhancements
## 2.1.1 / 2014-07-01
### Bug Fixes
* Patch read vulnerabilities for data & confirm none for layouts (#2563)
* Update Maruku dependency to allow use of the latest version (#2576)
* Remove conditional assignment from document URL to prevent stale urls (#2575)
### Site Enhancements
* Add vertical margin to `highlight` to separate code blocks (#2558)
* Add `html_pages` to Variables docs (#2567)
* Fixed broken link to Permalinks page (#2572)
* Update link to Windows installation guide (#2578)
## 2.1.0 / 2014-06-28
### Minor Enhancements
* Bump to the latest Liquid version, 2.6.1 (#2495)
@@ -27,6 +52,8 @@
* Make `highlight` tag use `language-` prefix in CSS class (#2511)
* Lookup item property via `item#to_liquid` before `#data` or `#[]` in filters (#2493)
* Skip initial build of site on serve with flag (#2477)
* Add support for `hl_lines` in `highlight` tag (#2532)
* Spike out `--watch` flag into a separate gem (#2550)
### Bug Fixes
@@ -46,6 +73,11 @@
* Ignore *all* directories and files that merit it on auto-generation (#2459)
* Before copying file, explicitly remove the old one (#2535)
* Merge file system categories with categories from YAML. (#2531)
* Deep merge front matter defaults (#2490)
* Ensure exclude and include arrays are arrays of strings (#2542)
* Allow collections to have dots in their filenames (#2552)
* Collections shouldn't try to read in directories as files (#2552)
* Be quiet very quickly. (#2520)
### Development Fixes
@@ -53,6 +85,7 @@
* Add test for sorting UTF-8 characters (#2384)
* Use `https` for GitHub links in documentation (#2470)
* Remove coverage reporting with Coveralls (#2494)
* Fix a bit of missing TomDoc to `Jekyll::Commands::Build#build` (#2554)
### Site Enhancements
@@ -74,6 +107,9 @@
* Add link to jekyll-compress-html to list of third-party plugins (#2514)
* Add Piwigo Gallery to list of third-party plugins (#2526)
* Set `show_drafts` to `false` in default configuration listing (#2536)
* Provide an updated link for Windows installation instructions (#2544)
* Remove `url` from configuration docs (#2547)
* Documentation for Continuous Integration for your Jekyll Site (#2432)
## 2.0.3 / 2014-05-08

View File

@@ -14,7 +14,7 @@ require 'jekyll/version'
#############################################################################
def name
@name ||= Dir['*.gemspec'].first.split('.').first
@name ||= File.basename(Dir['*.gemspec'].first, ".*")
end
def version
@@ -228,6 +228,7 @@ end
#
#############################################################################
desc "Release #{name} v#{version}"
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
@@ -240,6 +241,7 @@ task :release => :build do
sh "gem push pkg/#{name}-#{version}.gem"
end
desc "Build #{name} v#{version} into pkg/"
task :build do
mkdir_p "pkg"
sh "gem build #{gemspec_file}"

View File

@@ -128,3 +128,9 @@ Feature: frontmatter defaults
When I run jekyll build
Then the _site directory should exist
And I should see "Value: Override" in "_site/slides/slide2.html"
Scenario: Deep merge frontmatter defaults
Given I have an "index.html" page with fruit "{orange: 1}" that contains "Fruits: {{ page.fruit.orange | plus: page.fruit.apple }}"
And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {fruit: {apple: 2}}}]"
When I run jekyll build
Then I should see "Fruits: 3" in "_site/index.html"

View File

@@ -45,7 +45,7 @@ Feature: Markdown
When I run jekyll build
Then the _site directory should exist
And I should see "My awesome code" in "_site/index.html"
And I should see "<pre><code>\nMy awesome code\n</code></pre>" in "_site/index.html"
And I should see "<pre><code>My awesome code</code></pre>" in "_site/index.html"
Scenario: Maruku fenced codeblocks
Given I have a configuration file with "markdown" set to "maruku"
@@ -64,4 +64,4 @@ Feature: Markdown
When I run jekyll build
Then the _site directory should exist
And I should see "My awesome string" in "_site/index.html"
And I should see "<pre class="ruby"><code class="ruby">\nputs &quot;My awesome string&quot;\n</code></pre>" in "_site/index.html"
And I should see "<pre class="ruby"><code class="ruby">puts &quot;My awesome string&quot;</code></pre>" in "_site/index.html"

View File

@@ -273,3 +273,11 @@ Feature: Site configuration
And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should exist
And I should see "this is a test" in "_site/test.txt"
Scenario: arbitrary file reads via layouts
Given I have an "index.html" page with layout "page" that contains "FOO"
And I have a "_config.yml" file that contains "layouts: '../../../../../../../../../../../../../../usr/include'"
When I run jekyll build
Then the _site directory should exist
And I should see "FOO" in "_site/index.html"
And I should not see " " in "_site/index.html"

View File

@@ -30,7 +30,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('liquid', "~> 2.6.1")
s.add_runtime_dependency('classifier', "~> 1.3")
s.add_runtime_dependency('listen', [">= 2.7.6", "< 3.0.0"])
s.add_runtime_dependency('kramdown', "~> 1.3")
s.add_runtime_dependency('pygments.rb', "~> 0.6.0")
s.add_runtime_dependency('mercenary', "~> 0.3.3")
@@ -42,6 +41,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('jekyll-gist', '~> 1.0')
s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0')
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
s.add_runtime_dependency('jekyll-watch', '~> 1.0')
s.add_development_dependency('rake', "~> 10.1")
s.add_development_dependency('rdoc', "~> 3.11")
@@ -50,7 +50,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('rr', "~> 1.1")
s.add_development_dependency('cucumber', "1.3.11")
s.add_development_dependency('RedCloth', "~> 4.2")
s.add_development_dependency('maruku', "0.7.0")
s.add_development_dependency('maruku', "~> 0.7.0")
s.add_development_dependency('rdiscount', "~> 1.6")
s.add_development_dependency('launchy', "~> 2.3")
s.add_development_dependency('simplecov', "~> 0.7")

View File

@@ -32,7 +32,6 @@ require 'toml'
# internal requires
require 'jekyll/version'
require 'jekyll/utils'
require 'jekyll/hooks'
require 'jekyll/log_adapter'
require 'jekyll/stevenson'
require 'jekyll/deprecator'

View File

@@ -52,7 +52,7 @@ module Jekyll
def filtered_entries
return Array.new unless exists?
Dir.chdir(directory) do
entry_filter.filter(entries)
entry_filter.filter(entries).reject { |f| File.directory?(f) }
end
end
@@ -105,7 +105,7 @@ module Jekyll
#
# Returns a sanitized version of the label.
def sanitize_label(label)
label.gsub(/[^a-z0-9_\-]/i, '')
label.gsub(/[^a-z0-9_\-\.]/i, '')
end
# Produce a representation of this Collection for use in Liquid.

View File

@@ -38,7 +38,7 @@ module Jekyll
# Build your Jekyll site.
#
# site - the Jekyll::Site instance to build
# options - the
# options - A Hash of options passed to the command
#
# Returns nothing.
def build(site, options)
@@ -58,38 +58,8 @@ module Jekyll
#
# Returns nothing.
def watch(site, options)
require 'listen'
listener = Listen.to(
options['source'],
:ignore => ignore_paths(options),
:force_polling => options['force_polling']
) do |modified, added, removed|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
n = modified.length + added.length + removed.length
print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "
begin
process_site(site)
puts "...done."
rescue => e
puts "...error:"
Jekyll.logger.warn "Error:", e.message
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
end
end
listener.start
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{source}'"
unless options['serving']
trap("INT") do
listener.stop
puts " Halting auto-regeneration."
exit 0
end
loop { sleep 1000 }
end
require 'jekyll-watch'
Jekyll::Commands::Watch.watch(site, options)
end
end # end of class << self

View File

@@ -40,6 +40,7 @@ module Jekyll
'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md',
'textile_ext' => 'textile',
'quiet' => false,
'port' => '4000',
'host' => '0.0.0.0',
@@ -103,6 +104,10 @@ module Jekyll
override['source'] || self['source'] || DEFAULTS['source']
end
def quiet?(override = {})
override['quiet'] || self['quiet'] || DEFAULTS['quiet']
end
def safe_load_file(filename)
case File.extname(filename)
when '.toml'
@@ -120,6 +125,9 @@ module Jekyll
#
# Returns an Array of config files
def config_files(override)
# Be quiet quickly.
Jekyll.logger.log_level = :error if quiet?(override)
# Get configuration from <source>/_config.yml or <source>/<config_file>
config_files = override.delete('config')
if config_files.to_s.empty?
@@ -234,6 +242,7 @@ module Jekyll
" as a list of comma-separated values."
config[option] = csv_to_array(config[option])
end
config[option].map!(&:to_s)
end
if config.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku")

View File

@@ -43,7 +43,7 @@ module Jekyll
# Returns nothing.
def read_yaml(base, name, opts = {})
begin
self.content = File.read(File.join(base, name),
self.content = File.read(Jekyll.sanitized_path(base, name),
merged_file_read_opts(opts))
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
self.content = $POSTMATCH

View File

@@ -127,7 +127,7 @@ module Jekyll
#
# Returns the computed URL for the document.
def url
@url ||= URL.new({
@url = URL.new({
template: url_template,
placeholders: url_placeholders,
permalink: permalink

View File

@@ -41,10 +41,10 @@ module Jekyll
old_scope = nil
matching_sets(path, type).each do |set|
if has_precedence?(old_scope, set['scope'])
defaults.merge! set['values']
defaults = Utils.deep_merge_hashes(defaults, set['values'])
old_scope = set['scope']
else
defaults = set['values'].merge(defaults)
defaults = Utils.deep_merge_hashes(set['values'], defaults)
end
end
defaults
@@ -145,4 +145,4 @@ module Jekyll
end
end
end
end
end

View File

@@ -1,62 +0,0 @@
module Jekyll
module Hooks
class HookCollection
include Enumerable
def each(&block)
if block.nil?
hook_methods
else
hook_methods.each &block
end
end
def hook_methods
@hook_methods ||= Array.new
end
def add_hook(proc)
hook_methods << proc
end
def exec(*args)
if args.empty?
hook_methods.each { |hook| hook.call }
else
hook_methods.each do |hook|
args.each { |arg| hook.call(arg) }
end
end
end
end
%w[
post_reset
pre_read
post_read
pre_generate
post_generate
pre_render
post_render
pre_cleanup
post_cleanup
pre_write
post_write
].each do |method|
declaration = <<-METH
def #{method}(method_name, *args)
cr = caller
((@hooks ||= Hash.new).fetch(method_name.to_s, HookCollection.new)).add_hook -> { cr.send(method_name.to_sym, args) }
end
def #{method}_exec(*args)
((@hooks ||= Hash.new).fetch(method_name.to_s, HookCollection.new)).exec(*args)
end
METH
puts declaration
class_eval declaration
end
end
end

View File

@@ -78,8 +78,9 @@ module Jekyll
def populate_categories
categories_from_data = Utils.pluralized_array_from_hash(data, 'category', 'categories')
self.categories = (Array(categories) + categories_from_data).map {|c| c.to_s.downcase}
categories.flatten!
self.categories = (
Array(categories) + categories_from_data
).map {|c| c.to_s.downcase}.flatten.uniq
end
def populate_tags

View File

@@ -8,8 +8,6 @@ module Jekyll
attr_accessor :converters, :generators
include Jekyll::Hooks
# Public: Initialize a new Site.
#
# config - A Hash containing site configuration details.
@@ -197,7 +195,7 @@ module Jekyll
#
# Returns nothing
def read_data(dir)
base = File.join(source, dir)
base = Jekyll.sanitized_path(source, dir)
read_data_to(base, self.data)
end
@@ -216,7 +214,7 @@ module Jekyll
end
entries.each do |entry|
path = File.join(dir, entry)
path = Jekyll.sanitized_path(dir, entry)
next if File.symlink?(path) && safe
key = sanitize_filename(File.basename(entry, '.*'))

View File

@@ -4,9 +4,11 @@ module Jekyll
include Liquid::StandardFilters
# The regular expression syntax checker. Start with the language specifier.
# Follow that by zero or more space separated options that take one of two
# forms: name or name=value
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=\w+)?)*)$/
# Follow that by zero or more space separated options that take one of three
# forms: name, name=value, or name="<quoted list>"
#
# <quoted list> is a space-separated list of numbers
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$/
def initialize(tag_name, markup, tokens)
super
@@ -14,8 +16,14 @@ module Jekyll
@lang = $1.downcase
@options = {}
if defined?($2) && $2 != ''
$2.split.each do |opt|
# Split along 3 possible forms -- key="<quoted list>", key=value, or key
$2.scan(/(?:\w="[^"]*"|\w=\w|\w)+/) do |opt|
key, value = opt.split('=')
# If a quoted list, convert to array
if value && value.include?("\"")
value.gsub!(/"/, "")
value = value.split
end
@options[key.to_sym] = value || true
end
end

View File

@@ -1,3 +1,3 @@
module Jekyll
VERSION = '2.0.3'
VERSION = '2.1.1'
end

View File

@@ -31,6 +31,7 @@
docs:
- github-pages
- deployment-methods
- continuous-integration
- title: Miscellaneous
docs:

View File

@@ -699,6 +699,7 @@ pre, code {
}
.highlight {
margin: 1em 0;
padding: 10px 0;
width: 100%;
overflow: auto;

View File

@@ -0,0 +1,31 @@
---
layout: news_item
title: 'Jekyll Turns 21! Err... I mean 2.1.0.'
date: 2014-06-28 17:26:59 -0400
author: parkr
version: 2.1.0
categories: [release]
---
Jekyll's finally [legal to drink in the States](http://en.wikipedia.org/wiki/Legal_drinking_age).
And he's done a lot of learning in the process! Here are some of the new
things to look forward to:
- Uses the latest Liquid version (2.6.1) (#2495)
- Set front-matter defaults for collections (#2419)
- Set a collection-specific URL template (#2418)
- `pygments.rb` 0.6.0! (#2504)
- `.json` files in `_data` (#2369)
- Allow subdirectories in `_data` (#2395)
- Add support for `hl_lines` in `highlight` tag (#2532)
- Post categories now merge with directory, front-matter, and defaults (#2373)
- New `--skip_initial_build` flag for `jekyll serve` (#2477)
- A bajilion bug fixes and site updates!
Let's go party!
*Check out the [full changelog](/docs/history/) for more.*
Many thanks to these 37 contributors for the 2.1.0 release:
Alberto Grespan, Alessandro Lorenzi, Alex Medearis, Alfred Xing, Anatol Broder, Ben, Ben Balter, Bud Parr, Chezou, Denilson Figueiredo de Sá, Denilson Sá, Ivan Tse, Jens Nazarenus, Jesse Shawl, Jordon Bedwell, Josh Davis, János Rusiczki, Marc Ransome, Mathieu Bruyen, Matt Rogers, Parker Moore, Pat Hawks, Paul Henry, Peter Rhoades, Philipp Rudloff, Quinn Shanahan, Renaud Martinet, Rob Murray, Rodrigo Dumont, Simon Sarris, Terry, Terry Schmidt, Tomer Cohen, XhmikosR, Yihang Ho, jaybe@jekyll, and mikecole.

View File

@@ -0,0 +1,30 @@
---
layout: news_item
title: 'Jekyll 2.1.1 Released'
date: 2014-07-01 20:16:43 -0400
author: parkr
version: 2.1.1
categories: [release]
---
This is a minor release for Jekyll 2.1.0. It fixes a couple bugs and
introduces fixes for a couple security-related issues.
It covers two security vulnerabilities:
1. One in the reading of data
2. One in the `layouts` setting
They were identified in Jekyll 1.5.1 and has been confirmed as patched
in this version and the version used by GitHub Pages. If you are in the
business of building Jekyll sites, please ensure you upgrade to 2.1.1 as
soon as possible.
For more, check out [`jekyll/jekyll#2563`](https://github.com/jekyll/jekyll/pull/2563).
Additionally, the dependency on Maruku has been loosened and a bug was
fixed with document URLs.
As always, check out the [full changelog](/docs/history/) for more info!
Happy Jekylling!

View File

@@ -56,7 +56,7 @@ For example, if you have `_my_collection/some_subdir/some_doc.md`,
it will be rendered using Liquid and the Markdown converter of your
choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
As for posts with [Permalinks](../Permalinks/), document URL can be customized by setting a `permalink` metadata to the collection:
As for posts with [Permalinks](../permalinks/), document URL can be customized by setting a `permalink` metadata to the collection:
{% highlight yaml %}
collections:

View File

@@ -434,7 +434,6 @@ server: false # deprecated
host: 0.0.0.0
port: 4000
baseurl: ""
url: http://localhost:4000
lsi: false
maruku:

View File

@@ -0,0 +1,177 @@
---
layout: docs
title: Continuous Integration
prev_section: deployment-methods
next_section: troubleshooting
permalink: /docs/continuous-integration/
---
You can easily test your website build against one or more versions of Ruby.
The following guide will show you how to set up a free build environment on
[Travis][0], with [GitHub][1] integration for pull requests. Paid
alternatives exist for private repositories.
[0]: https://travis-ci.org/
[1]: https://github.com/
## 1. Enabling Travis and GitHub
Enabling Travis builds for your GitHub repository is pretty simple:
1. Go to your profile on travis-ci.org: https://travis-ci.org/profile/username
2. Find the repository for which you're interested in enabling builds.
3. Click the slider on the right so it says "ON" and is a dark grey.
4. Optionally configure the build by clicking on the wrench icon. Further
configuration happens in you `.travis.yml` file. More details on that
below.
## 2. The Test Script
The simplest test script simply runs `jekyll build` and ensures that Jekyll
doesn't fail to build the site. It doesn't check the resulting site, but it
does ensure things are built properly.
When testing Jekyll output, there is no better tool than [html-proofer][2].
This tool checks your resulting site to ensure all links and images exist.
Utilize it either with the convenient `htmlproof` command-line executable,
or write a Ruby script which utilizes the gem.
### The HTML Proofer Executable
{% highlight bash %}
#!/usr/bin/env bash
set -e # halt script on error
bundle exec jekyll build
bundle exec htmlproof ./_site
{% endhighlight %}
Some options can be specified via command-line switches. Check out the
`html-proofer` README for more information about these switches, or run
`htmlproof --help` locally.
### The HTML Proofer Library
You can also invoke `html-proofer` in Ruby scripts (e.g. in a Rakefile):
{% highlight ruby %}
#!/usr/bin/env ruby
require 'html/proofer'
HTML::Proofer.new("./_site").run
{% endhighlight %}
Options are given as a second argument to `.new`, and are encoded in a
symbol-keyed Ruby Hash. More information about the configuration options,
check out `html-proofer`'s README file.
[2]: https://github.com/gjtorikian/html-proofer
## 3. Configuring Your Travis Builds
This file is used to configure your Travis builds. Because Jekyll is built
with Ruby and requires RubyGems to install, we use the Ruby language build
environment. Below is a sample `.travis.yml` file, and what follows that is
an explanation of each line.
{% highlight yaml %}
language: ruby
rvm:
- 2.1
script: ./script/cibuild
# branch whitelist
branches:
only:
- gh-pages # test the gh-pages branch
- /pages-(.*)/ # test every branch which starts with "pages-"
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
{% endhighlight %}
Ok, now for an explanation of each line:
{% highlight yaml %}
language: ruby
{% endhighlight %}
This line tells Travis to use a Ruby build container. It gives your script
access to Bundler, RubyGems, and and Ruby runtime.
{% highlight yaml %}
rvm:
- 2.1
{% endhighlight %}
RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This
directive tells Travis the Ruby version to use when running your test
script.
{% highlight yaml %}
script: ./script/cibuild
{% endhighlight %}
Travis allows you to run any arbitrary shell script to test your site. One
convention is to put all scripts for your project in the `script`
directory, and to call your test script `cibuild`. This line is completely
customizable. If your script won't change much, you can write your test
incantation here directly:
{% highlight yaml %}
script: jekyll build && htmlproof ./_site
{% endhighlight %}
The `script` directive can be absolutely any valid shell command.
{% highlight yaml %}
# branch whitelist
branches:
only:
- gh-pages # test the gh-pages branch
- /pages-(.*)/ # test every branch which starts with "pages-"
{% endhighlight %}
You want to ensure the Travis builds for your site are being run only on
the branch or branches which contain your site. One means of ensuring this
isolation is including a branch whitelist in your Travis configuration
file. By specifying the `gh-pages` branch, you will ensure the associated
test script (discussed above) is only executed on site branches. If you use
a pull request flow for proposing changes, you may wish to enforce a
convention for your builds such that all branches containing edits are
prefixed, exemplified above with the `/pages-(.*)/` regular expression.
The `branches` directive is completely optional.
{% highlight yaml %}
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
{% endhighlight %}
Using `html-proofer`? You'll want this environment variable. Nokogiri, used
to parse HTML files in your compiled site, comes bundled with libraries
which it must compile each time it is installed. Luckily, you can
dramatically increase the install time of Nokogiri by setting the
environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` to `true`.
## 4. Gotchas
### Exclude `vendor`
Travis bundles all gems in the `vendor` directory on its build servers,
which Jekyll will mistakenly read and explode on. To avoid this, exclude
`vendor` in your `_config.yml`:
{% highlight yaml %}
exclude: [vendor]
{% endhighlight %}
### Questions?
This entire guide is open-source. Go ahead and [edit it][3] if you have a
fix or [ask for help][4] if you run into trouble and need some help.
[3]: https://github.com/jekyll/jekyll/edit/master/site/docs/continuous-integration.md
[4]: https://github.com/jekyll/jekyll-help#how-do-i-ask-a-question

View File

@@ -94,7 +94,8 @@ The organizations can then be accessed via `site.data.orgs`, followed by the fil
{% highlight html %}
{% raw %}
<ul>
{% for org in site.data.orgs %}
{% for org_hash in site.data.orgs %}
{% assign org = org_hash[1] %}
<li>
<a href="https://github.com/{{ org.username }}">
{{ org.name }}

View File

@@ -5,6 +5,92 @@ permalink: "/docs/history/"
prev_section: contributing
---
## 2.1.0 / 2014-06-28
### Minor Enhancements
- Bump to the latest Liquid version, 2.6.1 ([#2495]({{ site.repository }}/issues/2495))
- Add support for JSON files in the `_data` directory ([#2369]({{ site.repository }}/issues/2369))
- Allow subclasses to override `EXCERPT_ATTRIBUTES_FOR_LIQUID` ([#2408]({{ site.repository }}/issues/2408))
- Add `Jekyll.env` and `jekyll.environment` (the Liquid var) ([#2417]({{ site.repository }}/issues/2417))
- Use `_config.yaml` or `_config.yml` (`.yml` takes precedence) ([#2406]({{ site.repository }}/issues/2406))
- Override collection url template ([#2418]({{ site.repository }}/issues/2418))
- Allow subdirectories in `_data` ([#2395]({{ site.repository }}/issues/2395))
- Extract Pagination Generator into gem: `jekyll-paginate` ([#2455]({{ site.repository }}/issues/2455))
- Utilize `date_to_rfc822` filter in site template ([#2437]({{ site.repository }}/issues/2437))
- Add categories, last build datetime, and generator to site template
feed ([#2438]({{ site.repository }}/issues/2438))
- Configurable, replaceable Logger-compliant logger ([#2444]({{ site.repository }}/issues/2444))
- Extract `gist` tag into a separate gem ([#2469]({{ site.repository }}/issues/2469))
- Add `collection` attribute to `Document#to_liquid` to access the
document's collection label. ([#2436]({{ site.repository }}/issues/2436))
- Upgrade listen to `2.7.6 <= x < 3.0.0` ([#2492]({{ site.repository }}/issues/2492))
- Allow configuration of different Twitter and GitHub usernames in site template ([#2485]({{ site.repository }}/issues/2485))
- Bump Pygments to v0.6.0 ([#2504]({{ site.repository }}/issues/2504))
- Front-matter defaults for documents in collections ([#2419]({{ site.repository }}/issues/2419))
- Include files with a url which ends in `/` in the `site.html_pages` list ([#2524]({{ site.repository }}/issues/2524))
- Make `highlight` tag use `language-` prefix in CSS class ([#2511]({{ site.repository }}/issues/2511))
- Lookup item property via `item#to_liquid` before `#data` or `#[]` in filters ([#2493]({{ site.repository }}/issues/2493))
- Skip initial build of site on serve with flag ([#2477]({{ site.repository }}/issues/2477))
- Add support for `hl_lines` in `highlight` tag ([#2532]({{ site.repository }}/issues/2532))
- Spike out `--watch` flag into a separate gem ([#2550]({{ site.repository }}/issues/2550))
### Bug Fixes
- Liquid `sort` filter should sort even if one of the values is `nil` ([#2345]({{ site.repository }}/issues/2345))
- Remove padding on `pre code` in the site template CSS ([#2383]({{ site.repository }}/issues/2383))
- Set `log_level` earlier to silence info level configuration output ([#2393]({{ site.repository }}/issues/2393))
- Only list pages which have `title` in site template ([#2411]({{ site.repository }}/issues/2411))
- Accept `Numeric` values for dates, not `Number` values ([#2377]({{ site.repository }}/issues/2377))
- Prevent code from overflowing container in site template ([#2429]({{ site.repository }}/issues/2429))
- Encode URLs in UTF-8 when escaping and unescaping ([#2420]({{ site.repository }}/issues/2420))
- No Layouts or Liquid for Asset Files ([#2431]({{ site.repository }}/issues/2431))
- Allow front-matter defaults to set post categories ([#2373]({{ site.repository }}/issues/2373))
- Fix command in subcommand deprecation warning ([#2457]({{ site.repository }}/issues/2457))
- Keep all parent directories of files/dirs in `keep_files` ([#2458]({{ site.repository }}/issues/2458))
- When using RedCarpet and Rouge without Rouge installed, fixed erroneous
error which stated that redcarpet was missing, not rouge. ([#2464]({{ site.repository }}/issues/2464))
- Ignore *all* directories and files that merit it on auto-generation ([#2459]({{ site.repository }}/issues/2459))
- Before copying file, explicitly remove the old one ([#2535]({{ site.repository }}/issues/2535))
- Merge file system categories with categories from YAML. ([#2531]({{ site.repository }}/issues/2531))
- Deep merge front matter defaults ([#2490]({{ site.repository }}/issues/2490))
- Ensure exclude and include arrays are arrays of strings ([#2542]({{ site.repository }}/issues/2542))
- Allow collections to have dots in their filenames ([#2552]({{ site.repository }}/issues/2552))
- Collections shouldn't try to read in directories as files ([#2552]({{ site.repository }}/issues/2552))
- Be quiet very quickly. ([#2520]({{ site.repository }}/issues/2520))
### Development Fixes
- Test Ruby 2.1.2 instead of 2.1.1 ([#2374]({{ site.repository }}/issues/2374))
- Add test for sorting UTF-8 characters ([#2384]({{ site.repository }}/issues/2384))
- Use `https` for GitHub links in documentation ([#2470]({{ site.repository }}/issues/2470))
- Remove coverage reporting with Coveralls ([#2494]({{ site.repository }}/issues/2494))
- Fix a bit of missing TomDoc to `Jekyll::Commands::Build#build` ([#2554]({{ site.repository }}/issues/2554))
### Site Enhancements
- Set `timezone` to `America/Los_Angeles` ([#2394]({{ site.repository }}/issues/2394))
- Improve JavaScript in `anchor_links.html` ([#2368]({{ site.repository }}/issues/2368))
- Remove note on Quickstart page about default markdown converter ([#2387]({{ site.repository }}/issues/2387))
- Remove broken link in extras.md to a Maruku fork ([#2401]({{ site.repository }}/issues/2401))
- Update Font Awesome to v4.1.0. ([#2410]({{ site.repository }}/issues/2410))
- Fix broken link on Installation page to Templates page ([#2421]({{ site.repository }}/issues/2421))
- Prevent table from extending parent width in permalink style table ([#2424]({{ site.repository }}/issues/2424))
- Add collections to info about pagination support ([#2389]({{ site.repository }}/issues/2389))
- Add `jekyll_github_sample` plugin to list of third-party plugins ([#2463]({{ site.repository }}/issues/2463))
- Clarify documentation around front-matter defaults and add details
about defaults for collections. ([#2439]({{ site.repository }}/issues/2439))
- Add Jekyll Project Version Tag to list of third-party plugins ([#2468]({{ site.repository }}/issues/2468))
- Use `https` for GitHub links across whole site ([#2470]({{ site.repository }}/issues/2470))
- Add StickerMule + Jekyll post ([#2476]({{ site.repository }}/issues/2476))
- Add Jekyll Asset Pipeline Reborn to list of third-party plugins ([#2479]({{ site.repository }}/issues/2479))
- Add link to jekyll-compress-html to list of third-party plugins ([#2514]({{ site.repository }}/issues/2514))
- Add Piwigo Gallery to list of third-party plugins ([#2526]({{ site.repository }}/issues/2526))
- Set `show_drafts` to `false` in default configuration listing ([#2536]({{ site.repository }}/issues/2536))
- Provide an updated link for Windows installation instructions ([#2544]({{ site.repository }}/issues/2544))
- Remove `url` from configuration docs ([#2547]({{ site.repository }}/issues/2547))
- Documentation for Continuous Integration for your Jekyll Site ([#2432]({{ site.repository }}/issues/2432))
## 2.0.3 / 2014-05-08
### Bug Fixes

View File

@@ -19,6 +19,8 @@ youll need to make sure your system has before you start.
- [Ruby](http://www.ruby-lang.org/en/downloads/)
- [RubyGems](http://rubygems.org/pages/download)
- Linux, Unix, or Mac OS X
- [NodeJS](http://nodejs.org), or another JavaScript runtime (for
CoffeeScript support).
<div class="note info">
<h5>Running Jekyll on Windows</h5>

View File

@@ -122,6 +122,30 @@ following is a reference of the available data.
</p></td>
</tr>
<tr>
<td><p><code>site.html_pages</code></p></td>
<td><p>
A list of all HTML Pages.
</p></td>
</tr>
<tr>
<td><p><code>site.collections</code></p></td>
<td><p>
A list of all the collections.
</p></td>
</tr>
<tr>
<td><p><code>site.data</code></p></td>
<td><p>
A list containing the data loaded from the YAML files located in the <code>_data</code> directory.
</p></td>
</tr>
<tr>
<td><p><code>site.documents</code></p></td>
<td><p>

View File

@@ -12,7 +12,7 @@ knowledge and lessons that have been unearthed by Windows users.
## Installation
Madhur Ahuja has written up instructions to get
Julian Thilo has written up instructions to get
[Jekyll running on Windows][windows-installation] and it seems to work for most.
## Encoding
@@ -29,7 +29,7 @@ the site generation process. It can be done with the following command:
$ chcp 65001
{% endhighlight %}
[windows-installation]: http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html
[windows-installation]: http://jekyll-windows.juthilo.com/
## Auto-regeneration

View File

@@ -0,0 +1,5 @@
---
title: Override permalink
layout: slide
permalink: /slide/3/
---

View File

@@ -0,0 +1,5 @@
---
title: v2.4.0
---
v2.4.0

View File

View File

@@ -17,15 +17,15 @@ class TestCollections < Test::Unit::TestCase
end
should "sanitize the label name" do
assert_equal @collection.label, "etcpassword"
assert_equal @collection.label, "....etcpassword"
end
should "have a sanitized relative path name" do
assert_equal @collection.relative_directory, "_etcpassword"
assert_equal @collection.relative_directory, "_....etcpassword"
end
should "have a sanitized full path" do
assert_equal @collection.directory, source_dir("_etcpassword")
assert_equal @collection.directory, source_dir("_....etcpassword")
end
end
@@ -194,4 +194,31 @@ class TestCollections < Test::Unit::TestCase
end
end
context "with dots in the filenames" do
setup do
@site = fixture_site({
"collections" => ["with.dots"],
"safe" => true
})
@site.process
@collection = @site.collections["with.dots"]
end
should "exist" do
assert_not_nil @collection
end
should "contain one document" do
assert_equal 2, @collection.docs.size
end
should "allow dots in the filename" do
assert_equal "_with.dots", @collection.relative_directory
end
should "read document in subfolders with dots" do
assert @collection.docs.any? { |d| d.path.include?("all.dots") }
end
end
end

View File

@@ -165,6 +165,28 @@ class TestDocument < Test::Unit::TestCase
end
end
context "a document in a collection with a custom permalink" do
setup do
@site = Site.new(Jekyll.configuration({
"collections" => ["slides"],
"source" => source_dir,
"destination" => dest_dir
}))
@site.process
@document = @site.collections["slides"].docs[2]
@dest_file = dest_dir("slide/3/index.html")
end
should "know its permalink" do
assert_equal "/slide/3/", @document.permalink
end
should "produce the right URL" do
assert_equal "/slide/3/", @document.url
end
end
context " a document part of a rendered collection" do
end

View File

@@ -76,6 +76,12 @@ CONTENT
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl', ["test", "{% endhighlight %}", "\n"])
assert_equal({ :cssclass => 'hl', :linenos => 'table' }, tag.instance_variable_get(:@options))
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl hl_linenos=3', ["test", "{% endhighlight %}", "\n"])
assert_equal({ :cssclass => 'hl', :linenos => 'table', :hl_linenos => '3' }, tag.instance_variable_get(:@options))
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl hl_linenos="3 5 6"', ["test", "{% endhighlight %}", "\n"])
assert_equal({ :cssclass => 'hl', :linenos => 'table', :hl_linenos => ['3', '5', '6'] }, tag.instance_variable_get(:@options))
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'Ruby ', ["test", "{% endhighlight %}", "\n"])
assert_equal "ruby", tag.instance_variable_get(:@lang), "lexers should be case insensitive"
end
@@ -414,9 +420,8 @@ CONTENT
)
end
# todo: if #112 is merged into maruku, update to remove the newlines inside code block
should "render fenced code blocks" do
assert_match %r{<pre class=\"ruby\"><code class=\"ruby\">\nputs &quot;Hello world&quot;\n</code></pre>}, @result.strip
assert_match %r{<pre class=\"ruby\"><code class=\"ruby\">puts &quot;Hello world&quot;</code></pre>}, @result.strip
end
end