jekyll 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jekyll might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.markdown +34 -1
- data/bin/jekyll +1 -0
- data/features/include_tag.feature +9 -0
- data/features/site_data.feature +4 -4
- data/features/support/env.rb +1 -1
- data/jekyll.gemspec +5 -2
- data/lib/jekyll.rb +2 -1
- data/lib/jekyll/commands/build.rb +1 -1
- data/lib/jekyll/convertible.rb +1 -1
- data/lib/jekyll/entry_filter.rb +35 -0
- data/lib/jekyll/generators/pagination.rb +3 -0
- data/lib/jekyll/site.rb +1 -8
- data/lib/jekyll/tags/include.rb +15 -13
- data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +21 -0
- data/site/docs/deployment-methods.md +3 -3
- data/site/docs/drafts.md +2 -3
- data/site/docs/history.md +107 -0
- data/site/docs/migrations.md +2 -248
- data/site/docs/pages.md +6 -6
- data/site/docs/plugins.md +6 -1
- data/site/docs/templates.md +9 -0
- data/test/test_entry_filter.rb +74 -0
- data/test/test_redcloth.rb +3 -3
- data/test/test_site.rb +0 -63
- data/test/test_tags.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54f2c04f2decc2f06508c9205753f6c65a62dcde
|
4
|
+
data.tar.gz: 9a5c07d788561b8a9ebdffb395961610e1f0bb84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e700a2800c20defbf5b1106a434a92445e43f959044ea232e5d90ae54914ab84c3ae8ec7985a9876343041b014e5a37cafdce87f0262acff5741a0e0dc52dd3
|
7
|
+
data.tar.gz: 93db0c83231d8a8476fd5a4bd58496d80ca204c5d13dcb714af00da9653ddb2c19708b3933104a60c64115d1fcd7aabb85890be003f7650e57293a93f909f21f
|
data/History.markdown
CHANGED
@@ -10,7 +10,40 @@
|
|
10
10
|
|
11
11
|
### Site Enhancements
|
12
12
|
|
13
|
-
##
|
13
|
+
## 1.3.1 / 2013-11/26
|
14
|
+
|
15
|
+
### Minor Enhancements
|
16
|
+
* Add a `--prefix` option to passthrough for the importers (#1669)
|
17
|
+
* Push the paginator plugin lower in the plugin priority order so
|
18
|
+
other plugins run before it (#1759)
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
* Fix the include tag when ran in a loop (#1726)
|
22
|
+
* Fix errors when using `--watch` on 1.8.7 (#1730)
|
23
|
+
* Specify where the include is called from if an included file is
|
24
|
+
missing (#1746)
|
25
|
+
|
26
|
+
### Development Fixes
|
27
|
+
* Extract `Site#filter_entries` into its own object (#1697)
|
28
|
+
* Enable Travis' bundle caching (#1734)
|
29
|
+
* Remove trailing whitespace in some files (#1736)
|
30
|
+
* Fix a duplicate test name (#1754)
|
31
|
+
|
32
|
+
### Site Enhancements
|
33
|
+
* Update link to example Rakefile to point to specific commit (#1741)
|
34
|
+
* Fix drafts docs to indicate that draft time is based on file modification
|
35
|
+
time, not `Time.now` (#1695)
|
36
|
+
* Add `jekyll-monthly-archive-plugin` and `jekyll-category-archive-plugin` to
|
37
|
+
list of third-party plugins (#1693)
|
38
|
+
* Add `jekyll-asset-path-plugin` to list of third-party plugins (#1670)
|
39
|
+
* Add `emoji-for-jekyll` to list of third-part plugins (#1708)
|
40
|
+
* Fix previous section link on plugins page to point to pagination page (#1707)
|
41
|
+
* Add `org-mode` converter plugin to third-party plugins (#1711)
|
42
|
+
* Point "Blog migrations" page to http://import.jekyllrb.com (#1732)
|
43
|
+
* Add docs for `post_url` when posts are in subdirectories (#1718)
|
44
|
+
* Update the docs to point to `example.com` (#1448)
|
45
|
+
|
46
|
+
## 1.3.0 / 2013-11-04
|
14
47
|
|
15
48
|
### Major Enhancements
|
16
49
|
* Add support for adding data as YAML files under a site's `_data`
|
data/bin/jekyll
CHANGED
@@ -143,6 +143,7 @@ command :import do |c|
|
|
143
143
|
c.option '--user STRING', 'Username to use when migrating'
|
144
144
|
c.option '--pass STRING', 'Password to use when migrating'
|
145
145
|
c.option '--host STRING', 'Host address to use when migrating'
|
146
|
+
c.option '--prefix STRING', 'Database table prefix to use when migrating'
|
146
147
|
|
147
148
|
c.action do |args, options|
|
148
149
|
begin
|
@@ -46,3 +46,12 @@ Feature: Include tags
|
|
46
46
|
When I run jekyll
|
47
47
|
Then the _site directory should exist
|
48
48
|
And I should see "a snippet that works with parameters" in "_site/index.html"
|
49
|
+
|
50
|
+
Scenario: Include a variable file in a loop
|
51
|
+
Given I have an _includes directory
|
52
|
+
And I have an "_includes/one.html" file that contains "one"
|
53
|
+
And I have an "_includes/two.html" file that contains "two"
|
54
|
+
And I have an "index.html" page with files "[one.html, two.html]" that contains "{% for file in page.files %}{% include {{file}} %} {% endfor %}"
|
55
|
+
When I run jekyll
|
56
|
+
Then the _site directory should exist
|
57
|
+
And I should see "one two" in "_site/index.html"
|
data/features/site_data.feature
CHANGED
@@ -4,10 +4,10 @@ Feature: Site data
|
|
4
4
|
In order to make the site slightly dynamic
|
5
5
|
|
6
6
|
Scenario: Use page variable in a page
|
7
|
-
Given I have an "contact.html" page with title "Contact" that contains "{{ page.title }}: email@
|
7
|
+
Given I have an "contact.html" page with title "Contact" that contains "{{ page.title }}: email@example.com"
|
8
8
|
When I run jekyll
|
9
9
|
Then the _site directory should exist
|
10
|
-
And I should see "Contact: email@
|
10
|
+
And I should see "Contact: email@example.com" in "_site/contact.html"
|
11
11
|
|
12
12
|
Scenario Outline: Use page.path variable in a page
|
13
13
|
Given I have a <dir> directory
|
@@ -95,10 +95,10 @@ Feature: Site data
|
|
95
95
|
|
96
96
|
Scenario: Use configuration date in site payload
|
97
97
|
Given I have an "index.html" page that contains "{{ site.url }}"
|
98
|
-
And I have a configuration file with "url" set to "http://
|
98
|
+
And I have a configuration file with "url" set to "http://example.com"
|
99
99
|
When I run jekyll
|
100
100
|
Then the _site directory should exist
|
101
|
-
And I should see "http://
|
101
|
+
And I should see "http://example.com" in "_site/index.html"
|
102
102
|
|
103
103
|
Scenario: Access Jekyll version via jekyll.version
|
104
104
|
Given I have an "index.html" page that contains "{{ jekyll.version }}"
|
data/features/support/env.rb
CHANGED
@@ -50,7 +50,7 @@ def seconds_agnostic_datetime(datetime = Time.now)
|
|
50
50
|
pieces = datetime.to_s.split(" ")
|
51
51
|
if pieces.size == 6 # Ruby 1.8.7
|
52
52
|
date = pieces[0..2].join(" ")
|
53
|
-
time = seconds_agnostic_time(pieces[3])
|
53
|
+
time = seconds_agnostic_time(pieces[3])
|
54
54
|
zone = pieces[4..5].join(" ")
|
55
55
|
else # Ruby 1.9.1 or greater
|
56
56
|
date, time, zone = pieces
|
data/jekyll.gemspec
CHANGED
@@ -4,9 +4,9 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'jekyll'
|
7
|
-
s.version = '1.3.
|
7
|
+
s.version = '1.3.1'
|
8
8
|
s.license = 'MIT'
|
9
|
-
s.date = '2013-11-
|
9
|
+
s.date = '2013-11-26'
|
10
10
|
s.rubyforge_project = 'jekyll'
|
11
11
|
|
12
12
|
s.summary = "A simple, blog aware, static site generator."
|
@@ -95,6 +95,7 @@ Gem::Specification.new do |s|
|
|
95
95
|
lib/jekyll/core_ext.rb
|
96
96
|
lib/jekyll/deprecator.rb
|
97
97
|
lib/jekyll/draft.rb
|
98
|
+
lib/jekyll/entry_filter.rb
|
98
99
|
lib/jekyll/errors.rb
|
99
100
|
lib/jekyll/excerpt.rb
|
100
101
|
lib/jekyll/filters.rb
|
@@ -156,6 +157,7 @@ Gem::Specification.new do |s|
|
|
156
157
|
site/_posts/2013-09-14-jekyll-1-2-1-released.markdown
|
157
158
|
site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown
|
158
159
|
site/_posts/2013-11-04-jekyll-1-3-0-released.markdown
|
160
|
+
site/_posts/2013-11-26-jekyll-1-3-1-released.markdown
|
159
161
|
site/css/gridism.css
|
160
162
|
site/css/normalize.css
|
161
163
|
site/css/pygments.css
|
@@ -273,6 +275,7 @@ Gem::Specification.new do |s|
|
|
273
275
|
test/test_configuration.rb
|
274
276
|
test/test_convertible.rb
|
275
277
|
test/test_core_ext.rb
|
278
|
+
test/test_entry_filter.rb
|
276
279
|
test/test_excerpt.rb
|
277
280
|
test/test_filters.rb
|
278
281
|
test/test_generated_site.rb
|
data/lib/jekyll.rb
CHANGED
@@ -45,6 +45,7 @@ require 'jekyll/static_file'
|
|
45
45
|
require 'jekyll/errors'
|
46
46
|
require 'jekyll/related_posts'
|
47
47
|
require 'jekyll/cleaner'
|
48
|
+
require 'jekyll/entry_filter'
|
48
49
|
|
49
50
|
# extensions
|
50
51
|
require 'jekyll/plugin'
|
@@ -61,7 +62,7 @@ require_all 'jekyll/tags'
|
|
61
62
|
SafeYAML::OPTIONS[:suppress_warnings] = true
|
62
63
|
|
63
64
|
module Jekyll
|
64
|
-
VERSION = '1.3.
|
65
|
+
VERSION = '1.3.1'
|
65
66
|
|
66
67
|
# Public: Generate a Jekyll configuration Hash by merging the default
|
67
68
|
# options with anything in _config.yml, and adding the given options on top.
|
@@ -37,7 +37,7 @@ module Jekyll
|
|
37
37
|
destination = options['destination']
|
38
38
|
|
39
39
|
begin
|
40
|
-
dest = Pathname.new(destination).relative_path_from(Pathname.new(source)).
|
40
|
+
dest = Pathname.new(destination).relative_path_from(Pathname.new(source)).to_s
|
41
41
|
ignored = Regexp.new(Regexp.escape(dest))
|
42
42
|
rescue ArgumentError
|
43
43
|
# Destination is outside the source, no need to ignore it.
|
data/lib/jekyll/convertible.rb
CHANGED
@@ -87,7 +87,7 @@ module Jekyll
|
|
87
87
|
def render_liquid(content, payload, info, path = nil)
|
88
88
|
Liquid::Template.parse(content).render!(payload, info)
|
89
89
|
rescue Tags::IncludeTagError => e
|
90
|
-
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}"
|
90
|
+
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}, included in #{path || self.path}"
|
91
91
|
raise e
|
92
92
|
rescue Exception => e
|
93
93
|
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{path || self.path}"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class EntryFilter
|
2
|
+
attr_reader :site
|
3
|
+
def initialize(site)
|
4
|
+
@site = site
|
5
|
+
end
|
6
|
+
|
7
|
+
def filter(entries)
|
8
|
+
entries.reject do |e|
|
9
|
+
unless included?(e)
|
10
|
+
special?(e) || backup?(e) || excluded?(e) || symlink?(e)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def included?(entry)
|
16
|
+
site.include.glob_include?(entry)
|
17
|
+
end
|
18
|
+
|
19
|
+
def special?(entry)
|
20
|
+
['.', '_', '#'].include?(entry[0..0])
|
21
|
+
end
|
22
|
+
|
23
|
+
def backup?(entry)
|
24
|
+
entry[-1..-1] == '~'
|
25
|
+
end
|
26
|
+
|
27
|
+
def excluded?(entry)
|
28
|
+
site.exclude.glob_include?(entry)
|
29
|
+
end
|
30
|
+
|
31
|
+
def symlink?(entry)
|
32
|
+
File.symlink?(entry) && site.safe
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
data/lib/jekyll/site.rb
CHANGED
@@ -325,14 +325,7 @@ module Jekyll
|
|
325
325
|
#
|
326
326
|
# Returns the Array of filtered entries.
|
327
327
|
def filter_entries(entries)
|
328
|
-
entries
|
329
|
-
unless self.include.glob_include?(e)
|
330
|
-
['.', '_', '#'].include?(e[0..0]) ||
|
331
|
-
e[-1..-1] == '~' ||
|
332
|
-
self.exclude.glob_include?(e) ||
|
333
|
-
(File.symlink?(e) && self.safe)
|
334
|
-
end
|
335
|
-
end
|
328
|
+
EntryFilter.new(self).filter(entries)
|
336
329
|
end
|
337
330
|
|
338
331
|
# Get the implementation class for the given Converter.
|
data/lib/jekyll/tags/include.rb
CHANGED
@@ -43,8 +43,8 @@ module Jekyll
|
|
43
43
|
params
|
44
44
|
end
|
45
45
|
|
46
|
-
def validate_file_name
|
47
|
-
if
|
46
|
+
def validate_file_name(file)
|
47
|
+
if file !~ /^[a-zA-Z0-9_\/\.-]+$/ || file =~ /\.\// || file =~ /\/\./
|
48
48
|
raise ArgumentError.new <<-eos
|
49
49
|
Invalid syntax for include tag. File contains invalid characters or sequences:
|
50
50
|
|
@@ -82,7 +82,7 @@ eos
|
|
82
82
|
def retrieve_variable(context)
|
83
83
|
if /\{\{([\w\-\.]+)\}\}/ =~ @file
|
84
84
|
raise ArgumentError.new("No variable #{$1} was found in include tag") if context[$1].nil?
|
85
|
-
|
85
|
+
context[$1]
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -90,20 +90,22 @@ eos
|
|
90
90
|
dir = File.join(context.registers[:site].source, INCLUDES_DIR)
|
91
91
|
validate_dir(dir, context.registers[:site].safe)
|
92
92
|
|
93
|
-
retrieve_variable(context)
|
94
|
-
validate_file_name
|
93
|
+
file = retrieve_variable(context) || @file
|
94
|
+
validate_file_name(file)
|
95
95
|
|
96
|
-
|
97
|
-
validate_file(
|
96
|
+
path = File.join(dir, file)
|
97
|
+
validate_file(path, context.registers[:site].safe)
|
98
98
|
|
99
|
-
|
99
|
+
begin
|
100
|
+
partial = Liquid::Template.parse(source(path, context))
|
100
101
|
|
101
|
-
|
102
|
-
|
103
|
-
|
102
|
+
context.stack do
|
103
|
+
context['include'] = parse_params(context) if @params
|
104
|
+
partial.render!(context)
|
105
|
+
end
|
106
|
+
rescue => e
|
107
|
+
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
104
108
|
end
|
105
|
-
rescue => e
|
106
|
-
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
107
109
|
end
|
108
110
|
|
109
111
|
def validate_dir(dir, safe)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
layout: news_item
|
3
|
+
title: 'Jekyll 1.3.1 Released'
|
4
|
+
date: 2013-11-26 19:52:20 -0600
|
5
|
+
author: mattr-
|
6
|
+
version: 1.3.1
|
7
|
+
categories: [release]
|
8
|
+
---
|
9
|
+
|
10
|
+
Just in time for the US holiday Thanksgiving, we're releasing version
|
11
|
+
1.3.1 of Jekyll to address some of the issues seen since the
|
12
|
+
release of 1.3.0.
|
13
|
+
|
14
|
+
In addition to a couple of other smaller bug fixes, the biggest thing
|
15
|
+
we've fixed is an issue with the `--watch` option with Ruby 1.8.7. For a
|
16
|
+
full run-down, visit our [change log](/docs/history/)!
|
17
|
+
|
18
|
+
Thanks to all the people who have contributed to this release! They are
|
19
|
+
(in alphabetical order): Abhi Yerra, Anatol Broder, Andreas Möller, Greg
|
20
|
+
Karékinian, Sam Rayner, Santeri Paavolainen, Shigeya Suzuki, Yihang Ho,
|
21
|
+
albertogg, andrewhavens, maul.esel, and thomasdao
|
@@ -37,7 +37,7 @@ this](http://web.archive.org/web/20091223025644/http://www.taknado.com/en/2009/0
|
|
37
37
|
To have a remote server handle the deploy for you every time you push changes using Git, you can create a user account which has all the public keys that are authorized to deploy in its `authorized_keys` file. With that in place, setting up the post-receive hook is done as follows:
|
38
38
|
|
39
39
|
{% highlight bash %}
|
40
|
-
laptop$ ssh deployer@
|
40
|
+
laptop$ ssh deployer@example.com
|
41
41
|
server$ mkdir myrepo.git
|
42
42
|
server$ cd myrepo.git
|
43
43
|
server$ git --bare init
|
@@ -63,7 +63,7 @@ Finally, run the following command on any users laptop that needs to be able to
|
|
63
63
|
deploy using this hook:
|
64
64
|
|
65
65
|
{% highlight bash %}
|
66
|
-
laptops$ git remote add deploy deployer@
|
66
|
+
laptops$ git remote add deploy deployer@example.com:~/myrepo.git
|
67
67
|
{% endhighlight %}
|
68
68
|
|
69
69
|
Deploying is now as easy as telling nginx or Apache to look at
|
@@ -76,7 +76,7 @@ laptops$ git push deploy master
|
|
76
76
|
### Rake
|
77
77
|
|
78
78
|
Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimweirich/rake), [HighLine](https://github.com/JEG2/highline), and
|
79
|
-
[Net::SSH](http://net-ssh.rubyforge.org/). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/
|
79
|
+
[Net::SSH](http://net-ssh.rubyforge.org/). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/cdfbc4ec5321ff8d18c3ce936e9c749dbbc4f190/Rakefile).
|
80
80
|
|
81
81
|
### rsync
|
82
82
|
|
data/site/docs/drafts.md
CHANGED
@@ -17,6 +17,5 @@ first draft:
|
|
17
17
|
{% endhighlight %}
|
18
18
|
|
19
19
|
To preview your site with drafts, simply run `jekyll serve` or `jekyll build` with
|
20
|
-
the `--drafts` switch. Each will be assigned the value of
|
21
|
-
for its date, and thus you will see
|
22
|
-
|
20
|
+
the `--drafts` switch. Each will be assigned the value modification time of the draft file
|
21
|
+
for its date, and thus you will see currently edited drafts as the latest posts.
|
data/site/docs/history.md
CHANGED
@@ -5,6 +5,113 @@ permalink: /docs/history/
|
|
5
5
|
prev_section: contributing
|
6
6
|
---
|
7
7
|
|
8
|
+
## 1.3.1 / 2013-11/26
|
9
|
+
|
10
|
+
### Minor Enhancements
|
11
|
+
- Add a `--prefix` option to passthrough for the importers ([#1669]({{ site.repository }}/issues/1669))
|
12
|
+
- Push the paginator plugin lower in the plugin priority order so
|
13
|
+
other plugins run before it ([#1759]({{ site.repository }}/issues/1759))
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
- Fix the include tag when ran in a loop ([#1726]({{ site.repository }}/issues/1726))
|
17
|
+
- Fix errors when using `--watch` on 1.8.7 ([#1730]({{ site.repository }}/issues/1730))
|
18
|
+
- Specify where the include is called from if an included file is
|
19
|
+
missing ([#1746]({{ site.repository }}/issues/1746))
|
20
|
+
|
21
|
+
### Development Fixes
|
22
|
+
- Extract `Site#filter_entries` into its own object ([#1697]({{ site.repository }}/issues/1697))
|
23
|
+
- Enable Travis' bundle caching ([#1734]({{ site.repository }}/issues/1734))
|
24
|
+
- Remove trailing whitespace in some files ([#1736]({{ site.repository }}/issues/1736))
|
25
|
+
- Fix a duplicate test name ([#1754]({{ site.repository }}/issues/1754))
|
26
|
+
|
27
|
+
### Site Enhancements
|
28
|
+
- Update link to example Rakefile to point to specific commit ([#1741]({{ site.repository }}/issues/1741))
|
29
|
+
- Fix drafts docs to indicate that draft time is based on file modification
|
30
|
+
time, not `Time.now` ([#1695]({{ site.repository }}/issues/1695))
|
31
|
+
- Add `jekyll-monthly-archive-plugin` and `jekyll-category-archive-plugin` to
|
32
|
+
list of third-party plugins ([#1693]({{ site.repository }}/issues/1693))
|
33
|
+
- Add `jekyll-asset-path-plugin` to list of third-party plugins ([#1670]({{ site.repository }}/issues/1670))
|
34
|
+
- Add `emoji-for-jekyll` to list of third-part plugins ([#1708]({{ site.repository }}/issues/1708))
|
35
|
+
- Fix previous section link on plugins page to point to pagination page ([#1707]({{ site.repository }}/issues/1707))
|
36
|
+
- Add `org-mode` converter plugin to third-party plugins ([#1711]({{ site.repository }}/issues/1711))
|
37
|
+
- Point "Blog migrations" page to http://import.jekyllrb.com ([#1732]({{ site.repository }}/issues/1732))
|
38
|
+
- Add docs for `post_url` when posts are in subdirectories ([#1718]({{ site.repository }}/issues/1718))
|
39
|
+
- Update the docs to point to `example.com` ([#1448]({{ site.repository }}/issues/1448))
|
40
|
+
|
41
|
+
## 1.3.0 / 2013-11-04
|
42
|
+
|
43
|
+
### Major Enhancements
|
44
|
+
- Add support for adding data as YAML files under a site's `_data`
|
45
|
+
directory ([#1003]({{ site.repository }}/issues/1003))
|
46
|
+
- Allow variables to be used with `include` tags ([#1495]({{ site.repository }}/issues/1495))
|
47
|
+
- Allow using gems for plugin management ([#1557]({{ site.repository }}/issues/1557))
|
48
|
+
|
49
|
+
### Minor Enhancements
|
50
|
+
- Decrease the specificity in the site template CSS ([#1574]({{ site.repository }}/issues/1574))
|
51
|
+
- Add `encoding` configuration option ([#1449]({{ site.repository }}/issues/1449))
|
52
|
+
- Provide better error handling for Jekyll's custom Liquid tags
|
53
|
+
([#1514]({{ site.repository }}/issues/1514))
|
54
|
+
- If an included file causes a Liquid error, add the path to the
|
55
|
+
include file that caused the error to the error message ([#1596]({{ site.repository }}/issues/1596))
|
56
|
+
- If a layout causes a Liquid error, change the error message so that
|
57
|
+
we know it comes from the layout ([#1601]({{ site.repository }}/issues/1601))
|
58
|
+
- Update Kramdown dependency to `~> 1.2` ([#1610]({{ site.repository }}/issues/1610))
|
59
|
+
- Update `safe_yaml` dependency to `~> 0.9.7` ([#1602]({{ site.repository }}/issues/1602))
|
60
|
+
- Allow layouts to be in subfolders like includes ([#1622]({{ site.repository }}/issues/1622))
|
61
|
+
- Switch to listen for site watching while serving ([#1589]({{ site.repository }}/issues/1589))
|
62
|
+
- Add a `json` liquid filter to be used in sites ([#1651]({{ site.repository }}/issues/1651))
|
63
|
+
- Point people to the migration docs when the `jekyll-import` gem is
|
64
|
+
missing ([#1662]({{ site.repository }}/issues/1662))
|
65
|
+
|
66
|
+
### Bug Fixes
|
67
|
+
- Fix up matching against source and destination when the two
|
68
|
+
locations are similar ([#1556]({{ site.repository }}/issues/1556))
|
69
|
+
- Fix the missing `pathname` require in certain cases ([#1255]({{ site.repository }}/issues/1255))
|
70
|
+
- Use `+` instead of `Array#concat` when building `Post` attribute list ([#1571]({{ site.repository }}/issues/1571))
|
71
|
+
- Print server address when launching a server ([#1586]({{ site.repository }}/issues/1586))
|
72
|
+
- Downgrade to Maruku `~> 0.6.0` in order to avoid changes in rendering ([#1598]({{ site.repository }}/issues/1598))
|
73
|
+
- Fix error with failing include tag when variable was file name ([#1613]({{ site.repository }}/issues/1613))
|
74
|
+
- Downcase lexers before passing them to pygments ([#1615]({{ site.repository }}/issues/1615))
|
75
|
+
- Capitalize the short verbose switch because it conflicts with the
|
76
|
+
built-in Commander switch ([#1660]({{ site.repository }}/issues/1660))
|
77
|
+
- Fix compatibility with 1.8.x ([#1665]({{ site.repository }}/issues/1665))
|
78
|
+
- Fix an error with the new file watching code due to library version
|
79
|
+
incompatibilities ([#1687]({{ site.repository }}/issues/1687))
|
80
|
+
|
81
|
+
### Development Fixes
|
82
|
+
- Add coverage reporting with Coveralls ([#1539]({{ site.repository }}/issues/1539))
|
83
|
+
- Refactor the Liquid `include` tag ([#1490]({{ site.repository }}/issues/1490))
|
84
|
+
- Update launchy dependency to `~> 2.3` ([#1608]({{ site.repository }}/issues/1608))
|
85
|
+
- Update rr dependency to `~> 1.1` ([#1604]({{ site.repository }}/issues/1604))
|
86
|
+
- Update cucumber dependency to `~> 1.3` ([#1607]({{ site.repository }}/issues/1607))
|
87
|
+
- Update coveralls dependency to `~> 0.7.0` ([#1606]({{ site.repository }}/issues/1606))
|
88
|
+
- Update rake dependency to `~> 10.1` ([#1603]({{ site.repository }}/issues/1603))
|
89
|
+
- Clean up `site.rb` comments to be more concise/uniform ([#1616]({{ site.repository }}/issues/1616))
|
90
|
+
- Use the master branch for the build badge in the readme ([#1636]({{ site.repository }}/issues/1636))
|
91
|
+
- Refactor Site#render ([#1638]({{ site.repository }}/issues/1638))
|
92
|
+
- Remove duplication in command line options ([#1637]({{ site.repository }}/issues/1637))
|
93
|
+
- Add tests for all the coderay options ([#1543]({{ site.repository }}/issues/1543))
|
94
|
+
- Improve some of the cucumber test code ([#1493]({{ site.repository }}/issues/1493))
|
95
|
+
- Improve comparisons of timestamps by ignoring the seconds ([#1582]({{ site.repository }}/issues/1582))
|
96
|
+
|
97
|
+
### Site Enhancements
|
98
|
+
- Fix params for `JekyllImport::WordPress.process` arguments ([#1554]({{ site.repository }}/issues/1554))
|
99
|
+
- Add `jekyll-suggested-tweet` to list of third-party plugins ([#1555]({{ site.repository }}/issues/1555))
|
100
|
+
- Link to Liquid's docs for tags and filters ([#1553]({{ site.repository }}/issues/1553))
|
101
|
+
- Add note about installing Xcode on the Mac in the Installation docs ([#1561]({{ site.repository }}/issues/1561))
|
102
|
+
- Simplify/generalize pagination docs ([#1577]({{ site.repository }}/issues/1577))
|
103
|
+
- Add documentation for the new data sources feature ([#1503]({{ site.repository }}/issues/1503))
|
104
|
+
- Add more information on how to create generators ([#1590]({{ site.repository }}/issues/1590), [#1592]({{ site.repository }}/issues/1592))
|
105
|
+
- Improve the instructions for mimicking GitHub Flavored Markdown
|
106
|
+
([#1614]({{ site.repository }}/issues/1614))
|
107
|
+
- Add `jekyll-import` warning note of missing dependencies ([#1626]({{ site.repository }}/issues/1626))
|
108
|
+
- Fix grammar in the Usage section ([#1635]({{ site.repository }}/issues/1635))
|
109
|
+
- Add documentation for the use of gems as plugins ([#1656]({{ site.repository }}/issues/1656))
|
110
|
+
- Document the existence of a few additional plugins ([#1405]({{ site.repository }}/issues/1405))
|
111
|
+
- Document that the `date_to_string` always returns a two digit day ([#1663]({{ site.repository }}/issues/1663))
|
112
|
+
- Fix navigation in the "Working with Drafts" page ([#1667]({{ site.repository }}/issues/1667))
|
113
|
+
- Fix an error with the data documentation ([#1691]({{ site.repository }}/issues/1691))
|
114
|
+
|
8
115
|
## 1.2.1 / 2013-09-14
|
9
116
|
|
10
117
|
### Minor Enhancements
|
data/site/docs/migrations.md
CHANGED
@@ -7,251 +7,5 @@ permalink: /docs/migrations/
|
|
7
7
|
---
|
8
8
|
|
9
9
|
If you’re switching to Jekyll from another blogging system, Jekyll’s importers
|
10
|
-
can help you with the move.
|
11
|
-
|
12
|
-
generates `.markdown` posts in the `_posts` directory based on the entries in
|
13
|
-
the foreign system.
|
14
|
-
|
15
|
-
## Preparing for migrations
|
16
|
-
|
17
|
-
Because the importers have many of their own dependencies, they are made
|
18
|
-
available via a separate gem called
|
19
|
-
[`jekyll-import`](https://github.com/jekyll/jekyll-import). To use them, all
|
20
|
-
you need to do is install the gem, and they will become available as part of
|
21
|
-
Jekyll's standard command line interface.
|
22
|
-
|
23
|
-
{% highlight bash %}
|
24
|
-
$ gem install jekyll-import --pre
|
25
|
-
{% endhighlight %}
|
26
|
-
|
27
|
-
<div class="note warning">
|
28
|
-
<h5>Jekyll-import requires you to manually install some dependencies.</h5>
|
29
|
-
<p markdown="1">If you are importing your blog from Drupal 6,7, Joomla,
|
30
|
-
Mephisto, Movable Type, Textpattern, or Typo (with mysql db), you need to install
|
31
|
-
`mysql` and `sequel` gems. If you are importing from a WordPress database, you
|
32
|
-
need to install `mysql2` and `sequel` gems, and if you are importing from Enki
|
33
|
-
or Typo (with postgresql db) you need to install `pg` and `sequel` gems.</p>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
You should now be all set to run the importers below. If you ever get stuck, you
|
37
|
-
can see help for each importer:
|
38
|
-
|
39
|
-
{% highlight bash %}
|
40
|
-
$ jekyll help import # => See list of importers
|
41
|
-
$ jekyll help import IMPORTER # => See importer specific help
|
42
|
-
{% endhighlight %}
|
43
|
-
|
44
|
-
Where IMPORTER is the name of the specific importer.
|
45
|
-
|
46
|
-
<div class="note info">
|
47
|
-
<h5>Note: Always double-check migrated content</h5>
|
48
|
-
<p>
|
49
|
-
|
50
|
-
Importers may not distinguish between published or private posts, so
|
51
|
-
you should always check that the content Jekyll generates for you appears as
|
52
|
-
you intended.
|
53
|
-
|
54
|
-
</p>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<!-- TODO all these need to be fixed -->
|
58
|
-
|
59
|
-
## WordPress
|
60
|
-
|
61
|
-
### WordPress export files
|
62
|
-
|
63
|
-
If hpricot is not already installed, you will need to run `gem install hpricot`.
|
64
|
-
Next, export your blog using the WordPress export utility. Assuming that the
|
65
|
-
exported file is saved as `wordpress.xml`, here is the command you need to run:
|
66
|
-
|
67
|
-
{% highlight bash %}
|
68
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpressdotcom";
|
69
|
-
JekyllImport::WordpressDotCom.process({ :source => "wordpress.xml" })'
|
70
|
-
{% endhighlight %}
|
71
|
-
|
72
|
-
<div class="note">
|
73
|
-
<h5>ProTip™: WordPress.com Export Tool</h5>
|
74
|
-
<p markdown="1">If you are migrating from a WordPress.com account, you can
|
75
|
-
access the export tool at the following URL:
|
76
|
-
`https://YOUR-USER-NAME.wordpress.com/wp-admin/export.php`.</p>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
### Using WordPress MySQL server connection
|
80
|
-
|
81
|
-
If you want to import using a direct connection to the WordPress MySQL server,
|
82
|
-
here's how:
|
83
|
-
|
84
|
-
{% highlight bash %}
|
85
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
86
|
-
JekyllImport::WordPress.process({:dbname => "database", :user => "user", :pass => "pass"})'
|
87
|
-
{% endhighlight %}
|
88
|
-
|
89
|
-
If you are using Webfaction and have to set up an [SSH
|
90
|
-
tunnel](http://docs.webfaction.com/user-guide/databases.html?highlight=mysql#starting-an-ssh-tunnel-with-ssh),
|
91
|
-
be sure to make the hostname (`127.0.0.1`) explicit, otherwise MySQL may block
|
92
|
-
your access based on `localhost` and `127.0.0.1` not being equivalent in its
|
93
|
-
authentication system:
|
94
|
-
|
95
|
-
{% highlight bash %}
|
96
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
97
|
-
JekyllImport::WordPress.process({:host => "127.0.0.1", :dbname => "database", :user => "user", :pass => "pass"})'
|
98
|
-
{% endhighlight %}
|
99
|
-
|
100
|
-
### Further WordPress migration alternatives
|
101
|
-
|
102
|
-
While the above methods work, they do not import much of the metadata that is
|
103
|
-
usually stored in WordPress posts and pages. If you need to export things like
|
104
|
-
pages, tags, custom fields, image attachments and so on, the following resources
|
105
|
-
might be useful to you:
|
106
|
-
|
107
|
-
- [Exitwp](https://github.com/thomasf/exitwp) is a configurable tool written in
|
108
|
-
Python for migrating one or more WordPress blogs into Jekyll (Markdown) format
|
109
|
-
while keeping as much metadata as possible. Exitwp also downloads attachments
|
110
|
-
and pages.
|
111
|
-
- [A great
|
112
|
-
article](http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/) with a
|
113
|
-
step-by-step guide for migrating a WordPress blog to Jekyll while keeping most
|
114
|
-
of the structure and metadata.
|
115
|
-
- [wpXml2Jekyll](https://github.com/theaob/wpXml2Jekyll) is an executable
|
116
|
-
windows application for creating Markdown posts from your WordPress XML file.
|
117
|
-
|
118
|
-
## Drupal
|
119
|
-
|
120
|
-
If you’re migrating from [Drupal](http://drupal.org), there are two migrators
|
121
|
-
for you, depending upon your Drupal version:
|
122
|
-
- [Drupal 6](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal6.rb)
|
123
|
-
- [Drupal 7](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal7.rb)
|
124
|
-
|
125
|
-
{% highlight bash %}
|
126
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
127
|
-
JekyllImport::Drupal6.process("dbname", "user", "pass")'
|
128
|
-
# ... or ...
|
129
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
130
|
-
JekyllImport::Drupal7.process("dbname", "user", "pass")'
|
131
|
-
{% endhighlight %}
|
132
|
-
|
133
|
-
If you are connecting to a different host or need to specify a table prefix for
|
134
|
-
your database, you may optionally add those two parameters to the end of either
|
135
|
-
Drupal migrator execution:
|
136
|
-
|
137
|
-
{% highlight bash %}
|
138
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
139
|
-
JekyllImport::Drupal6.process("dbname", "user", "pass", "host", "table_prefix")'
|
140
|
-
# ... or ...
|
141
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
142
|
-
JekyllImport::Drupal7.process("dbname", "user", "pass", "host", "table_prefix")'
|
143
|
-
{% endhighlight %}
|
144
|
-
|
145
|
-
## Movable Type
|
146
|
-
|
147
|
-
To import posts from Movable Type:
|
148
|
-
|
149
|
-
{% highlight bash %}
|
150
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mt";
|
151
|
-
JekyllImport::MT.process("database", "user", "pass")'
|
152
|
-
{% endhighlight %}
|
153
|
-
|
154
|
-
## Typo
|
155
|
-
|
156
|
-
To import posts from Typo:
|
157
|
-
|
158
|
-
{% highlight bash %}
|
159
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/typo";
|
160
|
-
JekyllImport::Typo.process("database", "user", "pass")'
|
161
|
-
{% endhighlight %}
|
162
|
-
|
163
|
-
This code has only been tested with Typo version 4+.
|
164
|
-
|
165
|
-
## TextPattern
|
166
|
-
|
167
|
-
To import posts from TextPattern:
|
168
|
-
|
169
|
-
{% highlight bash %}
|
170
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/textpattern";
|
171
|
-
JekyllImport::TextPattern.process("database_name", "username", "password", "hostname")'
|
172
|
-
{% endhighlight %}
|
173
|
-
|
174
|
-
You will need to run the above from the parent directory of your `_import`
|
175
|
-
folder. For example, if `_import` is located in `/path/source/_import`, you will
|
176
|
-
need to run this code from `/path/source`. The hostname defaults to `localhost`,
|
177
|
-
all other variables are required. You may need to adjust the code used to filter
|
178
|
-
entries. Left alone, it will attempt to pull all entries that are live or
|
179
|
-
sticky.
|
180
|
-
|
181
|
-
## Mephisto
|
182
|
-
|
183
|
-
To import posts from Mephisto:
|
184
|
-
|
185
|
-
{% highlight bash %}
|
186
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
187
|
-
JekyllImport::Mephisto.process("database", "user", "password")'
|
188
|
-
{% endhighlight %}
|
189
|
-
|
190
|
-
If your data is in Postgres, you should do this instead:
|
191
|
-
|
192
|
-
{% highlight bash %}
|
193
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
194
|
-
JekyllImport::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
|
195
|
-
{% endhighlight %}
|
196
|
-
|
197
|
-
## Blogger (Blogspot)
|
198
|
-
|
199
|
-
To import posts from Blogger, see [this post about migrating from Blogger to
|
200
|
-
Jekyll](http://blog.coolaj86.com/articles/migrate-from-blogger-to-jekyll.html). If
|
201
|
-
that doesn’t work for you, you might want to try some of the following
|
202
|
-
alternatives:
|
203
|
-
|
204
|
-
- [@kennym](https://github.com/kennym) created a [little migration
|
205
|
-
script](https://gist.github.com/1115810), because the solutions in the
|
206
|
-
previous article didn't work out for him.
|
207
|
-
- [@ngauthier](https://github.com/ngauthier) created [another
|
208
|
-
importer](https://gist.github.com/1506614) that imports comments, and does so
|
209
|
-
via blogger’s archive instead of the RSS feed.
|
210
|
-
- [@juniorz](https://github.com/juniorz) created [yet another
|
211
|
-
importer](https://gist.github.com/1564581) that works for
|
212
|
-
[Octopress](http://octopress.org). It is like [@ngauthier’s
|
213
|
-
version](https://gist.github.com/1506614) but separates drafts from posts, as
|
214
|
-
well as importing tags and permalinks.
|
215
|
-
|
216
|
-
## Posterous
|
217
|
-
|
218
|
-
To import posts from your primary Posterous blog:
|
219
|
-
|
220
|
-
{% highlight bash %}
|
221
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
222
|
-
JekyllImport::Posterous.process("my_email", "my_pass")'
|
223
|
-
{% endhighlight %}
|
224
|
-
|
225
|
-
For any other Posterous blog on your account, you will need to specify the
|
226
|
-
`blog_id` for the blog:
|
227
|
-
|
228
|
-
{% highlight bash %}
|
229
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
230
|
-
JekyllImport::Posterous.process("my_email", "my_pass", "blog_id")'
|
231
|
-
{% endhighlight %}
|
232
|
-
|
233
|
-
There is also an [alternative Posterous
|
234
|
-
migrator](https://github.com/pepijndevos/jekyll/blob/patch-1/lib/jekyll/migrators/posterous.rb)
|
235
|
-
that maintains permalinks and attempts to import images too.
|
236
|
-
|
237
|
-
## Tumblr
|
238
|
-
|
239
|
-
To import posts from Tumblr:
|
240
|
-
|
241
|
-
{% highlight bash %}
|
242
|
-
$ ruby -rubygems -e 'require "jekyll/jekyll-import/tumblr";
|
243
|
-
JekyllImport::Tumblr.process(url, format, grab_images, add_highlights, rewrite_urls)'
|
244
|
-
# url - String: your blog's URL
|
245
|
-
# format - String: the output file extension. Use "md" to have your content
|
246
|
-
# converted from HTML to Markdown. Defaults to "html".
|
247
|
-
# grab_images - Boolean: whether to download images as well. Defaults to false.
|
248
|
-
# add_highlights - Boolean: whether to wrap code blocks (indented 4 spaces) in a Liquid
|
249
|
-
"highlight" tag. Defaults to false.
|
250
|
-
# rewrite_urls - Boolean: whether to write pages that redirect from the old Tumblr paths
|
251
|
-
to the new Jekyll paths. Defaults to false.
|
252
|
-
{% endhighlight %}
|
253
|
-
|
254
|
-
## Other Systems
|
255
|
-
|
256
|
-
If you have a system for which there is currently no migrator, consider writing
|
257
|
-
one and sending us [a pull request](https://github.com/jekyll/jekyll-import).
|
10
|
+
can help you with the move. To learn more about importing your site to Jekyll,
|
11
|
+
visit our [`jekyll-import` docs site](http://import.jekyllrb.com).
|
data/site/docs/pages.md
CHANGED
@@ -53,9 +53,9 @@ and associated URLs might look like:
|
|
53
53
|
|-- _layouts/
|
54
54
|
|-- _posts/
|
55
55
|
|-- _site/
|
56
|
-
|-- about.html # => http://
|
57
|
-
|-- index.html # => http://
|
58
|
-
└── contact.html # => http://
|
56
|
+
|-- about.html # => http://example.com/about.html
|
57
|
+
|-- index.html # => http://example.com/
|
58
|
+
└── contact.html # => http://example.com/contact.html
|
59
59
|
{% endhighlight %}
|
60
60
|
|
61
61
|
### Named folders containing index HTML files
|
@@ -76,10 +76,10 @@ look like:
|
|
76
76
|
├── _posts/
|
77
77
|
├── _site/
|
78
78
|
├── about/
|
79
|
-
| └── index.html # => http://
|
79
|
+
| └── index.html # => http://example.com/about/
|
80
80
|
├── contact/
|
81
|
-
| └── index.html # => http://
|
82
|
-
└── index.html # => http://
|
81
|
+
| └── index.html # => http://example.com/contact/
|
82
|
+
└── index.html # => http://example.com/
|
83
83
|
{% endhighlight %}
|
84
84
|
|
85
85
|
This approach may not suit everyone, but for people who like clean URLs it’s
|
data/site/docs/plugins.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
layout: docs
|
3
3
|
title: Plugins
|
4
|
-
prev_section:
|
4
|
+
prev_section: pagination
|
5
5
|
next_section: extras
|
6
6
|
permalink: /docs/plugins/
|
7
7
|
---
|
@@ -419,6 +419,9 @@ You can find a few useful plugins at the following locations:
|
|
419
419
|
- [Pageless Redirect Generator by Nick Quinlan](https://github.com/nquinlan/jekyll-pageless-redirects): Generates redirects based on files in the Jekyll root, with support for htaccess style redirects.
|
420
420
|
- [Projectlist by Frederic Hemberger](https://github.com/fhemberger/jekyll-projectlist): Renders files in a directory as a single page instead of separate posts.
|
421
421
|
- [RssGenerator by Assaf Gelber](https://github.com/agelber/jekyll-rss): Automatically creates an RSS 2.0 feed from your posts.
|
422
|
+
- [Monthly archive generator by Shigeya Suzuki](https://github.com/shigeya/jekyll-monthly-archive-plugin): Generator and template which renders monthly archive like MovableType style, based on the work by Ilkka Laukkanen and others above.
|
423
|
+
- [Category archive generator by Shigeya Suzuki](https://github.com/shigeya/jekyll-category-archive-plugin): Generator and template which renders category archive like MovableType style, based on Monthly archive generator.
|
424
|
+
- [Emoji for Jekyll](https://github.com/yihangho/emoji-for-jekyll): Seamlessly enable emoji for all posts and pages.
|
422
425
|
|
423
426
|
#### Converters
|
424
427
|
|
@@ -437,6 +440,7 @@ You can find a few useful plugins at the following locations:
|
|
437
440
|
- [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandoc’s markdown extensions.
|
438
441
|
- [ReStructuredText Converter](https://github.com/xdissent/jekyll-rst): Converts ReST documents to HTML with Pygments syntax highlighting.
|
439
442
|
- [Transform Layouts](https://gist.github.com/1472645): Allows HAML layouts (you need a HAML Converter plugin for this to work).
|
443
|
+
- [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll.
|
440
444
|
|
441
445
|
#### Filters
|
442
446
|
|
@@ -455,6 +459,7 @@ You can find a few useful plugins at the following locations:
|
|
455
459
|
|
456
460
|
#### Tags
|
457
461
|
|
462
|
+
- [Asset Path Tag](https://github.com/samrayner/jekyll-asset-path-plugin) by [Sam Rayner](http://www.samrayner.com/): Allows organisation of assets into subdirectories by outputting a path for a given file relative to the current post or page.
|
458
463
|
- [Delicious Plugin by Christian Hellsten](https://github.com/christianhellsten/jekyll-plugins): Fetches and renders bookmarks from delicious.com.
|
459
464
|
- [Ultraviolet Plugin by Steve Alex](https://gist.github.com/480380): Jekyll tag for the [Ultraviolet](http://ultraviolet.rubyforge.org/) code highligher.
|
460
465
|
- [Tag Cloud Plugin by Ilkka Laukkanen](https://gist.github.com/710577): Generate a tag cloud that links to tag pages.
|
data/site/docs/templates.md
CHANGED
@@ -290,6 +290,15 @@ will generate the correct permalink URL for the post you specify.
|
|
290
290
|
{% endraw %}
|
291
291
|
{% endhighlight %}
|
292
292
|
|
293
|
+
If you organize your posts in subdirectories, you need to include subdirectory
|
294
|
+
path to the post:
|
295
|
+
|
296
|
+
{% highlight text %}
|
297
|
+
{% raw %}
|
298
|
+
{% post_url /subdir/2010-07-21-name-of-post %}
|
299
|
+
{% endraw %}
|
300
|
+
{% endhighlight %}
|
301
|
+
|
293
302
|
There is no need to include the file extension when using the `post_url` tag.
|
294
303
|
|
295
304
|
You can also use this tag to create a link to a post in Markdown as follows:
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestEntryFilter < Test::Unit::TestCase
|
4
|
+
context "Filtering entries" do
|
5
|
+
setup do
|
6
|
+
stub(Jekyll).configuration do
|
7
|
+
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
|
8
|
+
end
|
9
|
+
@site = Site.new(Jekyll.configuration)
|
10
|
+
end
|
11
|
+
|
12
|
+
should "filter entries" do
|
13
|
+
ent1 = %w[foo.markdown bar.markdown baz.markdown #baz.markdown#
|
14
|
+
.baz.markdow foo.markdown~ .htaccess _posts _pages]
|
15
|
+
|
16
|
+
entries = EntryFilter.new(@site).filter(ent1)
|
17
|
+
assert_equal %w[foo.markdown bar.markdown baz.markdown .htaccess], entries
|
18
|
+
end
|
19
|
+
|
20
|
+
should "filter entries with exclude" do
|
21
|
+
excludes = %w[README TODO]
|
22
|
+
files = %w[index.html site.css .htaccess]
|
23
|
+
|
24
|
+
@site.exclude = excludes + ["exclude*"]
|
25
|
+
assert_equal files, @site.filter_entries(excludes + files + ["excludeA"])
|
26
|
+
end
|
27
|
+
|
28
|
+
should "not filter entries within include" do
|
29
|
+
includes = %w[_index.html .htaccess include*]
|
30
|
+
files = %w[index.html _index.html .htaccess includeA]
|
31
|
+
|
32
|
+
@site.include = includes
|
33
|
+
assert_equal files, @site.filter_entries(files)
|
34
|
+
end
|
35
|
+
|
36
|
+
should "filter symlink entries when safe mode enabled" do
|
37
|
+
stub(Jekyll).configuration do
|
38
|
+
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
|
39
|
+
end
|
40
|
+
site = Site.new(Jekyll.configuration)
|
41
|
+
stub(File).symlink?('symlink.js') {true}
|
42
|
+
files = %w[symlink.js]
|
43
|
+
assert_equal [], site.filter_entries(files)
|
44
|
+
end
|
45
|
+
|
46
|
+
should "not filter symlink entries when safe mode disabled" do
|
47
|
+
stub(File).symlink?('symlink.js') {true}
|
48
|
+
files = %w[symlink.js]
|
49
|
+
assert_equal files, @site.filter_entries(files)
|
50
|
+
end
|
51
|
+
|
52
|
+
should "not include symlinks in safe mode" do
|
53
|
+
stub(Jekyll).configuration do
|
54
|
+
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
|
55
|
+
end
|
56
|
+
site = Site.new(Jekyll.configuration)
|
57
|
+
|
58
|
+
site.read_directories("symlink-test")
|
59
|
+
assert_equal [], site.pages
|
60
|
+
assert_equal [], site.static_files
|
61
|
+
end
|
62
|
+
|
63
|
+
should "include symlinks in unsafe mode" do
|
64
|
+
stub(Jekyll).configuration do
|
65
|
+
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => false})
|
66
|
+
end
|
67
|
+
site = Site.new(Jekyll.configuration)
|
68
|
+
|
69
|
+
site.read_directories("symlink-test")
|
70
|
+
assert_not_equal [], site.pages
|
71
|
+
assert_not_equal [], site.static_files
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
data/test/test_redcloth.rb
CHANGED
@@ -7,7 +7,7 @@ class TestRedCloth < Test::Unit::TestCase
|
|
7
7
|
@textile = Converters::Textile.new
|
8
8
|
end
|
9
9
|
|
10
|
-
should "preserve single line breaks in HTML output" do
|
10
|
+
should "preserve single line breaks in HTML output" do
|
11
11
|
assert_equal "<p>line1<br />\nline2</p>", @textile.convert("p. line1\nline2").strip
|
12
12
|
end
|
13
13
|
end
|
@@ -20,7 +20,7 @@ class TestRedCloth < Test::Unit::TestCase
|
|
20
20
|
@textile = Converters::Textile.new config
|
21
21
|
end
|
22
22
|
|
23
|
-
should "preserve single line breaks in HTML output" do
|
23
|
+
should "preserve single line breaks in HTML output" do
|
24
24
|
assert_equal "<p>line1<br />\nline2</p>", @textile.convert("p. line1\nline2").strip
|
25
25
|
end
|
26
26
|
end
|
@@ -35,7 +35,7 @@ class TestRedCloth < Test::Unit::TestCase
|
|
35
35
|
@textile = Converters::Textile.new config
|
36
36
|
end
|
37
37
|
|
38
|
-
should "preserve single line breaks in HTML output" do
|
38
|
+
should "preserve single line breaks in HTML output" do
|
39
39
|
assert_equal "<p>line1<br />\nline2</p>", @textile.convert("p. line1\nline2").strip
|
40
40
|
end
|
41
41
|
end
|
data/test/test_site.rb
CHANGED
@@ -179,69 +179,6 @@ class TestSite < Test::Unit::TestCase
|
|
179
179
|
assert_equal 4, @site.categories['foo'].size
|
180
180
|
end
|
181
181
|
|
182
|
-
should "filter entries" do
|
183
|
-
ent1 = %w[foo.markdown bar.markdown baz.markdown #baz.markdown#
|
184
|
-
.baz.markdow foo.markdown~]
|
185
|
-
ent2 = %w[.htaccess _posts _pages bla.bla]
|
186
|
-
|
187
|
-
assert_equal %w[foo.markdown bar.markdown baz.markdown], @site.filter_entries(ent1)
|
188
|
-
assert_equal %w[.htaccess bla.bla], @site.filter_entries(ent2)
|
189
|
-
end
|
190
|
-
|
191
|
-
should "filter entries with exclude" do
|
192
|
-
excludes = %w[README TODO]
|
193
|
-
files = %w[index.html site.css .htaccess]
|
194
|
-
|
195
|
-
@site.exclude = excludes + ["exclude*"]
|
196
|
-
assert_equal files, @site.filter_entries(excludes + files + ["excludeA"])
|
197
|
-
end
|
198
|
-
|
199
|
-
should "not filter entries within include" do
|
200
|
-
includes = %w[_index.html .htaccess include*]
|
201
|
-
files = %w[index.html _index.html .htaccess includeA]
|
202
|
-
|
203
|
-
@site.include = includes
|
204
|
-
assert_equal files, @site.filter_entries(files)
|
205
|
-
end
|
206
|
-
|
207
|
-
should "filter symlink entries when safe mode enabled" do
|
208
|
-
stub(Jekyll).configuration do
|
209
|
-
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
|
210
|
-
end
|
211
|
-
site = Site.new(Jekyll.configuration)
|
212
|
-
stub(File).symlink?('symlink.js') {true}
|
213
|
-
files = %w[symlink.js]
|
214
|
-
assert_equal [], site.filter_entries(files)
|
215
|
-
end
|
216
|
-
|
217
|
-
should "not filter symlink entries when safe mode disabled" do
|
218
|
-
stub(File).symlink?('symlink.js') {true}
|
219
|
-
files = %w[symlink.js]
|
220
|
-
assert_equal files, @site.filter_entries(files)
|
221
|
-
end
|
222
|
-
|
223
|
-
should "not include symlinks in safe mode" do
|
224
|
-
stub(Jekyll).configuration do
|
225
|
-
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
|
226
|
-
end
|
227
|
-
site = Site.new(Jekyll.configuration)
|
228
|
-
|
229
|
-
site.read_directories("symlink-test")
|
230
|
-
assert_equal [], site.pages
|
231
|
-
assert_equal [], site.static_files
|
232
|
-
end
|
233
|
-
|
234
|
-
should "include symlinks in unsafe mode" do
|
235
|
-
stub(Jekyll).configuration do
|
236
|
-
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => false})
|
237
|
-
end
|
238
|
-
site = Site.new(Jekyll.configuration)
|
239
|
-
|
240
|
-
site.read_directories("symlink-test")
|
241
|
-
assert_not_equal [], site.pages
|
242
|
-
assert_not_equal [], site.static_files
|
243
|
-
end
|
244
|
-
|
245
182
|
context 'error handling' do
|
246
183
|
should "raise if destination is included in source" do
|
247
184
|
stub(Jekyll).configuration do
|
data/test/test_tags.rb
CHANGED
@@ -226,7 +226,7 @@ CONTENT
|
|
226
226
|
assert_no_match /markdown\-html\-error/, @result
|
227
227
|
end
|
228
228
|
|
229
|
-
should "have the url to the \"
|
229
|
+
should "have the url to the \"complex\" post from 2008-11-21" do
|
230
230
|
assert_match %r{1\s/2008/11/21/complex/}, @result
|
231
231
|
assert_match %r{2\s/2008/11/21/complex/}, @result
|
232
232
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -412,6 +412,7 @@ files:
|
|
412
412
|
- lib/jekyll/core_ext.rb
|
413
413
|
- lib/jekyll/deprecator.rb
|
414
414
|
- lib/jekyll/draft.rb
|
415
|
+
- lib/jekyll/entry_filter.rb
|
415
416
|
- lib/jekyll/errors.rb
|
416
417
|
- lib/jekyll/excerpt.rb
|
417
418
|
- lib/jekyll/filters.rb
|
@@ -473,6 +474,7 @@ files:
|
|
473
474
|
- site/_posts/2013-09-14-jekyll-1-2-1-released.markdown
|
474
475
|
- site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown
|
475
476
|
- site/_posts/2013-11-04-jekyll-1-3-0-released.markdown
|
477
|
+
- site/_posts/2013-11-26-jekyll-1-3-1-released.markdown
|
476
478
|
- site/css/gridism.css
|
477
479
|
- site/css/normalize.css
|
478
480
|
- site/css/pygments.css
|
@@ -588,6 +590,7 @@ files:
|
|
588
590
|
- test/test_configuration.rb
|
589
591
|
- test/test_convertible.rb
|
590
592
|
- test/test_core_ext.rb
|
593
|
+
- test/test_entry_filter.rb
|
591
594
|
- test/test_excerpt.rb
|
592
595
|
- test/test_filters.rb
|
593
596
|
- test/test_generated_site.rb
|
@@ -633,6 +636,7 @@ test_files:
|
|
633
636
|
- test/test_configuration.rb
|
634
637
|
- test/test_convertible.rb
|
635
638
|
- test/test_core_ext.rb
|
639
|
+
- test/test_entry_filter.rb
|
636
640
|
- test/test_excerpt.rb
|
637
641
|
- test/test_filters.rb
|
638
642
|
- test/test_generated_site.rb
|