jekyll 3.0.0.pre.beta10 → 3.0.0.pre.rc1
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/lib/jekyll.rb +1 -3
- data/lib/jekyll/cleaner.rb +3 -2
- data/lib/jekyll/collection.rb +20 -2
- data/lib/jekyll/command.rb +1 -1
- data/lib/jekyll/commands/build.rb +2 -2
- data/lib/jekyll/configuration.rb +36 -5
- data/lib/jekyll/convertible.rb +13 -10
- data/lib/jekyll/document.rb +173 -17
- data/lib/jekyll/excerpt.rb +45 -33
- data/lib/jekyll/hooks.rb +9 -7
- data/lib/jekyll/page.rb +1 -1
- data/lib/jekyll/publisher.rb +2 -2
- data/lib/jekyll/reader.rb +4 -4
- data/lib/jekyll/readers/collection_reader.rb +4 -2
- data/lib/jekyll/readers/post_reader.rb +35 -10
- data/lib/jekyll/regenerator.rb +4 -4
- data/lib/jekyll/related_posts.rb +3 -3
- data/lib/jekyll/renderer.rb +12 -2
- data/lib/jekyll/site.rb +16 -13
- data/lib/jekyll/tags/post_url.rb +4 -4
- data/lib/jekyll/utils.rb +12 -7
- data/lib/jekyll/version.rb +1 -1
- data/lib/site_template/_includes/footer.html +2 -19
- data/lib/site_template/_includes/icon-github.html +1 -0
- data/lib/site_template/_includes/icon-github.svg +1 -0
- data/lib/site_template/_includes/icon-twitter.html +1 -0
- data/lib/site_template/_includes/icon-twitter.svg +1 -0
- data/lib/site_template/_sass/_layout.scss +1 -0
- data/lib/site_template/_sass/_syntax-highlighting.scss +4 -0
- data/lib/site_template/about.md +6 -2
- data/lib/site_template/css/main.scss +1 -1
- metadata +6 -5
- data/lib/jekyll/draft.rb +0 -40
- data/lib/jekyll/post.rb +0 -334
- data/lib/jekyll/readers/draft_reader.rb +0 -37
@@ -1,37 +0,0 @@
|
|
1
|
-
module Jekyll
|
2
|
-
class DraftReader
|
3
|
-
attr_reader :site, :unfiltered_content
|
4
|
-
def initialize(site)
|
5
|
-
@site = site
|
6
|
-
@unfiltered_content = Array.new
|
7
|
-
end
|
8
|
-
|
9
|
-
# Read all the files in <source>/<dir>/_drafts and create a new Draft
|
10
|
-
# object with each one.
|
11
|
-
#
|
12
|
-
# dir - The String relative path of the directory to read.
|
13
|
-
#
|
14
|
-
# Returns nothing.
|
15
|
-
def read(dir)
|
16
|
-
@unfiltered_content = read_content(dir, '_drafts')
|
17
|
-
@unfiltered_content.select{ |draft| site.publisher.publish?(draft) }
|
18
|
-
end
|
19
|
-
|
20
|
-
# Read all the content files from <source>/<dir>/magic_dir
|
21
|
-
# and return them with the type klass.
|
22
|
-
#
|
23
|
-
# dir - The String relative path of the directory to read.
|
24
|
-
# magic_dir - The String relative directory to <dir>,
|
25
|
-
# looks for content here.
|
26
|
-
# klass - The return type of the content.
|
27
|
-
#
|
28
|
-
# Returns klass type of content files
|
29
|
-
def read_content(dir, magic_dir)
|
30
|
-
@site.reader.get_entries(dir, magic_dir).map do |entry|
|
31
|
-
Draft.new(site, site.source, dir, entry) if Draft.valid?(entry)
|
32
|
-
end.reject do |entry|
|
33
|
-
entry.nil?
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|