jekyllpress 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -2
- data/lib/jekyllpress/version.rb +1 -1
- data/lib/jekyllpress.rb +31 -27
- data/spec/lib/jekyllpress_spec.rb +173 -102
- metadata +2 -30
- data/spec/test_site/.gitignore +0 -1
- data/spec/test_site/_config.yml +0 -12
- data/spec/test_site/_includes/footer.html +0 -61
- data/spec/test_site/_includes/head.html +0 -12
- data/spec/test_site/_includes/header.html +0 -28
- data/spec/test_site/_layouts/default.html +0 -19
- data/spec/test_site/_layouts/page.html +0 -14
- data/spec/test_site/_layouts/post.html +0 -15
- data/spec/test_site/_templates/new_page.markdown +0 -5
- data/spec/test_site/_templates/new_post.markdown +0 -7
- data/spec/test_site/about.md +0 -11
- data/spec/test_site/css/main.css +0 -410
- data/spec/test_site/feed.xml +0 -30
- data/spec/test_site/index.html +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd6682117892650ad63c153d63979873c1e42515
|
4
|
+
data.tar.gz: a8e78117bcdc10b196a28c96c6c0081f745d24cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcf10491338155651e916d09a0a331f64f5c920eef9c841204c6a8919ac1b7fa2130b0ab636baee54a65927ffc511f43375fe964c089586f844f8ee31b796f2e
|
7
|
+
data.tar.gz: 67d70468fd06525e2181de755b3cd1488099bec2513a606fe2e2767a6bf4bee47da94539ca96d760883c6842a040b0998c527b0e048a174f2a34eeb0eeb7e374
|
data/CHANGELOG
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
263acca (HEAD, origin/master, master) fix: use thor actions to inject redirect_from into post.
|
2
|
+
61a16b8 new: Add options to redirect to specify the permalink template and force overwriting.
|
3
|
+
dbb8b67 (tag: v0.1.0) new: Add CHANGELOG.
|
4
|
+
78c8b1c new: Add :redirect command to insert a 'redirect_from:' array in the front matter of each post in the _posts directory, to allow for blog restructuring, in service of using the jekyll-redirect-from gem.
|
5
|
+
4957944 (tag: v0.0.3) Forgot to add thor as a dependency! Doh!
|
3
6
|
a905e0e Move setup action to beginning of Usage section in README
|
4
7
|
2ba98e4 (tag: v0.0.2) version bump
|
5
8
|
2fee61c clean up tests, all running under one test_site
|
data/lib/jekyllpress/version.rb
CHANGED
data/lib/jekyllpress.rb
CHANGED
@@ -6,6 +6,9 @@ require "jekyllpress/version"
|
|
6
6
|
|
7
7
|
module Jekyllpress
|
8
8
|
|
9
|
+
SETUPERROR_MESSAGE = "It appears you have not set up a template directory yet.\nRun `#{$0} setup` to set up the templates properly."
|
10
|
+
class SetupError < RuntimeError; end
|
11
|
+
|
9
12
|
class App < Thor
|
10
13
|
include Thor::Actions
|
11
14
|
package_name 'Jekyllpress::App'
|
@@ -82,58 +85,68 @@ module Jekyllpress
|
|
82
85
|
end
|
83
86
|
|
84
87
|
desc "redirect OLD_DIR", "Add a jekyll-redirect-from entry in every post based on OLD_DIR"
|
88
|
+
method_option :permalink_template, :desc => "Format of permalink for redirect (old format)", :type => :string, :aliases => %w[-p]
|
89
|
+
method_option :force, :desc => "Force writing of redirect_from, even if there is one already", :type => :boolean, :aliases => %w[-F]
|
85
90
|
def redirect(old_dir="")
|
86
91
|
@old_dir = old_dir.to_s
|
87
92
|
@old_dir = ask("Old directory to use in redirect: ") if @old_dir.empty?
|
93
|
+
permalink_template = options.fetch("permalink_template") { Jekyll::Configuration::DEFAULTS["permalink"] }
|
94
|
+
force_redirect = options.fetch("force") { false }
|
88
95
|
processed_posts = []
|
89
|
-
with_posts do |post|
|
90
|
-
|
96
|
+
with_posts({"permalink" => permalink_template}) do |post|
|
97
|
+
# binding.pry
|
98
|
+
if post.data.has_key?("redirect_from") && !force_redirect
|
91
99
|
say "skipping #{post.name} - redirect_from detected"
|
92
100
|
next
|
93
101
|
end
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
102
|
+
|
103
|
+
time_now = Time.now
|
104
|
+
insert_text = %Q{# BEGIN: redirect added by jekyllpress on #{time_now}
|
105
|
+
redirect_from:
|
106
|
+
- #{File.join('', old_dir, post.url)}
|
107
|
+
# END: redirect added by jekyllpress on #{time_now}
|
108
|
+
}
|
109
|
+
insert_into_file(post_file_name(post), insert_text, :after => %r{\A---\n})
|
110
|
+
|
100
111
|
processed_posts << {name: post.name, file: post_file_name(post)}
|
101
112
|
end
|
113
|
+
|
114
|
+
binding.pry
|
102
115
|
[__method__, @old_dir, processed_posts]
|
103
116
|
end
|
104
117
|
|
105
118
|
private
|
106
119
|
|
107
|
-
def with_config
|
120
|
+
def with_config(options={})
|
108
121
|
raise "no block given at #{caller[1]}" unless block_given?
|
109
122
|
self.class.source_root(jekyll_config["source"])
|
110
123
|
yield jekyll_config
|
111
124
|
end
|
112
125
|
|
113
|
-
def with_posts
|
114
|
-
with_config do |config|
|
126
|
+
def with_posts(options={})
|
127
|
+
with_config(options) do |config|
|
115
128
|
site = Jekyll::Site.new(config)
|
116
129
|
site.reset
|
117
130
|
site.read
|
118
131
|
site.posts.each do |post|
|
119
132
|
yield post
|
120
133
|
end
|
134
|
+
site.reset
|
121
135
|
end
|
122
136
|
end
|
123
137
|
|
124
138
|
def check_templates
|
139
|
+
raise SetupError.new SETUPERROR_MESSAGE unless jekyll_config.has_key?("templates")
|
125
140
|
File.stat(File.join(source, template_dir))
|
126
141
|
File.stat(File.join(source, template_dir, new_page_template))
|
127
142
|
File.stat(File.join(source, template_dir, new_post_template))
|
128
143
|
rescue ::Errno::ENOENT => error
|
129
|
-
|
130
|
-
"Run `#{$0} setup` to set up the templates directory"
|
131
|
-
raise error
|
144
|
+
raise SetupError.new SETUPERROR_MESSAGE
|
132
145
|
end
|
133
146
|
|
134
|
-
def jekyll_config
|
147
|
+
def jekyll_config(options={})
|
135
148
|
@jekyll_config ||= begin
|
136
|
-
conf = Jekyll.configuration(
|
149
|
+
conf = Jekyll.configuration(options)
|
137
150
|
unless conf.has_key?("templates")
|
138
151
|
conf.merge!({
|
139
152
|
"templates" => {
|
@@ -144,8 +157,9 @@ module Jekyllpress
|
|
144
157
|
})
|
145
158
|
end
|
146
159
|
end
|
147
|
-
|
160
|
+
# @jekyll_config ||= Jekyll.configuration(options)
|
148
161
|
end
|
162
|
+
|
149
163
|
def new_ext
|
150
164
|
jekyll_config["markdown_ext"].split(',').first
|
151
165
|
end
|
@@ -190,16 +204,6 @@ module Jekyllpress
|
|
190
204
|
File.join(post.site.source, post.path)
|
191
205
|
end
|
192
206
|
|
193
|
-
def rewrite_post(post)
|
194
|
-
file = post_file_name(post)
|
195
|
-
# backup current file
|
196
|
-
FileUtils.copy_file(file, "#{file}.bak")
|
197
|
-
File.open(file, 'w') do |f|
|
198
|
-
f.puts post.data.to_yaml
|
199
|
-
f.puts "---"
|
200
|
-
f.write post.content
|
201
|
-
end
|
202
|
-
end
|
203
207
|
end
|
204
208
|
|
205
209
|
end
|
@@ -1,144 +1,215 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
TEST_SITE = 'test_site'
|
4
|
+
|
5
|
+
def kill_jekyll
|
6
|
+
# This is a weird little discombobulation.
|
7
|
+
# I'm not altogether sure why I have to do this, but apparently
|
8
|
+
# the way thor, rspec, and jekyll all meld, something goes haywire.
|
9
|
+
$".delete_if{|x| x.match(%r[(/gems/jekyll-.+/lib/jekyll)])}
|
10
|
+
# run `load 'jekyllpress.rb'` in each test setup where you have a
|
11
|
+
# jekyll test directory to work with
|
12
|
+
end
|
5
13
|
|
6
|
-
|
7
|
-
$".delete_if{|x| x.match(jekyll_match)} ; load 'jekyllpress.rb' # Have to load this *after* we're in the working directory
|
8
|
-
# STDERR.puts Jekyll::Configuration::DEFAULTS["source"]
|
14
|
+
describe "my Jekyllpress Thor script" do
|
9
15
|
|
10
|
-
describe
|
16
|
+
describe ":version" do
|
17
|
+
before(:all) do
|
18
|
+
kill_jekyll
|
19
|
+
load 'jekyllpress.rb'
|
20
|
+
end
|
11
21
|
|
12
|
-
|
13
|
-
|
14
|
-
|
22
|
+
it {expect(Jekyllpress::App.start(%w[version])).to include(Jekyllpress::VERSION)}
|
23
|
+
it {expect(Jekyllpress::App.start(%w[-V])).to include(Jekyllpress::VERSION)}
|
24
|
+
it {expect(Jekyllpress::App.start(%w[--version])).to include(Jekyllpress::VERSION)}
|
25
|
+
end
|
26
|
+
|
27
|
+
describe ":new_post" do
|
28
|
+
before(:all) do
|
29
|
+
kill_jekyll
|
30
|
+
Dir.chdir("spec") do |spec_dir|
|
31
|
+
FileUtils.rm_rf TEST_SITE
|
32
|
+
`jekyll new #{TEST_SITE}`
|
33
|
+
Dir.chdir(TEST_SITE) do |test_site|
|
34
|
+
load 'jekyllpress.rb'
|
35
|
+
Jekyllpress::App.start(%w[setup])
|
36
|
+
@action, @title, @filename, @categories, @tags = Jekyllpress::App.start(%w[new_post A\ New\ Post -c one two three -t able baker charlie])
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
after(:all) do
|
42
|
+
Dir.chdir("spec") do |spec_dir|
|
43
|
+
FileUtils.rm_rf TEST_SITE
|
44
|
+
end
|
45
|
+
end
|
15
46
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
47
|
+
it {expect(@action).to eq :new_post}
|
48
|
+
it {expect(@title).to eq "A New Post"}
|
49
|
+
it {expect(@categories).to eq %w[one two three]}
|
50
|
+
it {expect(@tags).to eq %w[able baker charlie]}
|
51
|
+
it {expect(@filename).to be_a String}
|
52
|
+
it {expect(@filename).not_to be_empty}
|
53
|
+
it {expect(@filename).to include("/_posts/#{Time.now.strftime("%Y-%m-%d")}-a-new-post.markdown")}
|
54
|
+
end
|
21
55
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
@templates = Pathname.new('_templates')
|
31
|
-
@templates.rmtree if @templates.exist?
|
56
|
+
describe ":new_page" do
|
57
|
+
before(:all) do
|
58
|
+
kill_jekyll
|
59
|
+
Dir.chdir("spec") do |spec_dir|
|
60
|
+
FileUtils.rm_rf TEST_SITE
|
61
|
+
`jekyll new #{TEST_SITE}`
|
62
|
+
Dir.chdir(TEST_SITE) do |test_site|
|
63
|
+
load 'jekyllpress.rb'
|
32
64
|
Jekyllpress::App.start(%w[setup])
|
33
|
-
@action, @title, @filename, @categories, @tags = Jekyllpress::App.start(%w[new_post A\ New\ Post -c=one two three -t=a b c])
|
34
65
|
end
|
35
66
|
end
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
67
|
+
end
|
68
|
+
|
69
|
+
after(:all) do
|
70
|
+
Dir.chdir("spec") do |spec_dir|
|
71
|
+
FileUtils.rm_rf TEST_SITE
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
it "should report an error if location is an absolute path" do
|
77
|
+
expect{Jekyllpress::App.start(%w[new_page bogus --location /pages])}.to raise_error(RuntimeError, "location can not be an absolute path: /pages")
|
78
|
+
end
|
79
|
+
|
80
|
+
context "create a new page" do
|
81
|
+
before(:all) do
|
82
|
+
@action, @title, @filename, @location = Jekyllpress::App.start(%w[new_page A\ New\ Page -l=pages])
|
83
|
+
end
|
84
|
+
|
85
|
+
after(:all) do
|
86
|
+
File.unlink(@filename)
|
87
|
+
end
|
88
|
+
|
89
|
+
it {expect(@action).to eq :new_page}
|
90
|
+
it {expect(@title).to eq "A New Page"}
|
91
|
+
it {expect(@location).to eq "pages"}
|
43
92
|
it {expect(@filename).to be_a String}
|
44
93
|
it {expect(@filename).not_to be_empty}
|
45
|
-
it {expect(@filename).to include("
|
94
|
+
it {expect(@filename).to include("/pages/a-new-page/index.markdown")}
|
46
95
|
end
|
96
|
+
end
|
47
97
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
raise "#{@pages_dir} does not exist!" unless @pages_dir.directory?
|
58
|
-
@pages_dir.children.each(&:rmtree)
|
59
|
-
@templates = Pathname.new('_templates')
|
60
|
-
@templates.rmtree if @templates.exist?
|
61
|
-
Jekyllpress::App.start(%w[setup])
|
62
|
-
@action, @title, @filename, @location = Jekyllpress::App.start(%w[new_page A\ New\ Page -l=pages])
|
63
|
-
end
|
98
|
+
describe "no templates" do
|
99
|
+
|
100
|
+
before(:all) do
|
101
|
+
kill_jekyll
|
102
|
+
Dir.chdir("spec") do |spec_dir|
|
103
|
+
FileUtils.rm_rf TEST_SITE
|
104
|
+
`jekyll new #{TEST_SITE}`
|
105
|
+
Dir.chdir(TEST_SITE) do |test_site|
|
106
|
+
load 'jekyllpress.rb'
|
64
107
|
end
|
65
|
-
it {expect(@action).to eq :new_page}
|
66
|
-
it {expect(@title).to eq "A New Page"}
|
67
|
-
it {expect(@location).to eq "pages"}
|
68
|
-
it {expect(@filename).to be_a String}
|
69
|
-
it {expect(@filename).not_to be_empty}
|
70
|
-
it {expect(@filename).to include("#{test_dir}/pages/a-new-page/index.markdown")}
|
71
108
|
end
|
72
109
|
end
|
73
110
|
|
74
|
-
|
111
|
+
after(:all) do
|
112
|
+
Dir.chdir("spec") do |spec_dir|
|
113
|
+
FileUtils.rm_rf TEST_SITE
|
114
|
+
end
|
115
|
+
end
|
75
116
|
|
117
|
+
it "should abort when no templates are found" do
|
118
|
+
expect{Jekyllpress::App.start(%w[new_page blah])}.to raise_error(Jekyllpress::SetupError)
|
119
|
+
end
|
120
|
+
|
121
|
+
context ":setup" do
|
76
122
|
before(:all) do
|
77
|
-
|
78
|
-
@templates = Pathname.new('_templates')
|
79
|
-
@templates.rmtree if @templates.exist?
|
80
|
-
end
|
123
|
+
@action, @source, @template_dir, @new_post_template, @new_page_template = Jekyllpress::App.start(%w[setup])
|
81
124
|
end
|
82
|
-
|
83
|
-
it
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
125
|
+
|
126
|
+
it { expect(@action).to eq(:setup) }
|
127
|
+
it { expect(@source).to include("spec/test_site") }
|
128
|
+
it { expect(@template_dir).to eq("_templates") }
|
129
|
+
it { expect(@new_post_template).to eq("new_post.markdown") }
|
130
|
+
it { expect(@new_page_template).to eq("new_page.markdown") }
|
131
|
+
|
132
|
+
it "templates directory created" do
|
133
|
+
Dir.chdir(File.join("spec",TEST_SITE)) do |test_dir|
|
134
|
+
expect(File.directory?(@template_dir)).to eq true
|
91
135
|
end
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
it { expect(@new_page_template).to eq("new_page.markdown") }
|
98
|
-
|
99
|
-
it "templates directory created" do
|
100
|
-
Dir.chdir(test_dir) do |test_dir|
|
101
|
-
expect(File.directory?(@template_dir)).to eq true
|
102
|
-
end
|
136
|
+
end
|
137
|
+
|
138
|
+
it "new_post_template created" do
|
139
|
+
Dir.chdir(File.join("spec",TEST_SITE)) do |test_dir|
|
140
|
+
expect(File.exist?(File.join(@template_dir, @new_post_template)))
|
103
141
|
end
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
142
|
+
end
|
143
|
+
|
144
|
+
it "new_page_template created" do
|
145
|
+
Dir.chdir(File.join("spec",TEST_SITE)) do |test_dir|
|
146
|
+
expect(File.exist?(File.join(@template_dir, @new_page_template)))
|
109
147
|
end
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
151
|
+
|
152
|
+
end
|
153
|
+
|
154
|
+
describe ":redirect" do
|
155
|
+
before do
|
156
|
+
kill_jekyll
|
157
|
+
Dir.chdir("spec") do |spec_dir|
|
158
|
+
FileUtils.rm_rf TEST_SITE
|
159
|
+
`jekyll new #{TEST_SITE}`
|
160
|
+
Dir.chdir(TEST_SITE) do |test_site|
|
161
|
+
load 'jekyllpress.rb'
|
162
|
+
File.open(File.join("_posts","2013-12-31-an-old-post.markdown"), 'w') do |post|
|
163
|
+
frontmatter = {
|
164
|
+
"title" => "An old post",
|
165
|
+
"date" => "2013-12-31 12:31",
|
166
|
+
"layout" => "post",
|
167
|
+
"redirect_from" => Array("/oldsite/2013/12/31/an-old-post/")
|
168
|
+
}
|
169
|
+
post.puts frontmatter.to_yaml
|
170
|
+
post.puts "---"
|
171
|
+
post.puts "Old horse kitty kat peanut butter engine."
|
172
|
+
post.puts "\n"
|
173
|
+
post.puts "This is a post with a redirect_from."
|
114
174
|
end
|
115
175
|
end
|
116
|
-
|
117
176
|
end
|
118
|
-
|
119
177
|
end
|
120
178
|
|
121
|
-
|
122
|
-
|
123
|
-
|
179
|
+
after do
|
180
|
+
Dir.chdir("spec") do |spec_dir|
|
181
|
+
FileUtils.rm_rf TEST_SITE
|
124
182
|
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# after(:each) do # restore backups to normal
|
186
|
+
# @posts.each do |post|
|
187
|
+
# FileUtils.mv("#{post[:file]}.bak", post[:file], force: true, verbose: true)
|
188
|
+
# end
|
189
|
+
# end
|
125
190
|
|
126
|
-
|
191
|
+
it "only one post has a redirect_from: in frontmatter" do
|
192
|
+
Dir.chdir(File.join("spec", TEST_SITE)) do |test_site|
|
193
|
+
@action, @old_dir, @posts = Jekyllpress::App.start(%w[redirect BLOG])
|
194
|
+
expect(@posts.count).to eq(1)
|
127
195
|
@posts.each do |post|
|
128
196
|
post_content = File.read post[:file]
|
129
197
|
expect(post_content).to match(%r{^redirect_from:$})
|
198
|
+
expect(post_content).to match(%r{^ - /BLOG/})
|
130
199
|
end
|
131
200
|
end
|
201
|
+
end
|
132
202
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
203
|
+
it "all posts have a redirect_from: in frontmatter" do
|
204
|
+
@action, @old_dir, @posts = Jekyllpress::App.start(%w[redirect BLOG -F])
|
205
|
+
expect(@posts.count).to eq(2)
|
206
|
+
@posts.each do |post|
|
207
|
+
post_content = File.read post[:file]
|
208
|
+
expect(post_content).to match(%r{^redirect_from:$})
|
209
|
+
expect(post_content).to match(%r{^ - /BLOG/})
|
138
210
|
end
|
139
|
-
|
140
|
-
|
141
211
|
end
|
142
212
|
|
143
213
|
end
|
214
|
+
|
144
215
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyllpress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tamara Temple
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -188,20 +188,6 @@ files:
|
|
188
188
|
- spec/jekyllpress_spec.rb
|
189
189
|
- spec/lib/jekyllpress_spec.rb
|
190
190
|
- spec/spec_helper.rb
|
191
|
-
- spec/test_site/.gitignore
|
192
|
-
- spec/test_site/_config.yml
|
193
|
-
- spec/test_site/_includes/footer.html
|
194
|
-
- spec/test_site/_includes/head.html
|
195
|
-
- spec/test_site/_includes/header.html
|
196
|
-
- spec/test_site/_layouts/default.html
|
197
|
-
- spec/test_site/_layouts/page.html
|
198
|
-
- spec/test_site/_layouts/post.html
|
199
|
-
- spec/test_site/_templates/new_page.markdown
|
200
|
-
- spec/test_site/_templates/new_post.markdown
|
201
|
-
- spec/test_site/about.md
|
202
|
-
- spec/test_site/css/main.css
|
203
|
-
- spec/test_site/feed.xml
|
204
|
-
- spec/test_site/index.html
|
205
191
|
homepage: https://github.com/tamouse/jekyllpress
|
206
192
|
licenses:
|
207
193
|
- MIT
|
@@ -230,18 +216,4 @@ test_files:
|
|
230
216
|
- spec/jekyllpress_spec.rb
|
231
217
|
- spec/lib/jekyllpress_spec.rb
|
232
218
|
- spec/spec_helper.rb
|
233
|
-
- spec/test_site/.gitignore
|
234
|
-
- spec/test_site/_config.yml
|
235
|
-
- spec/test_site/_includes/footer.html
|
236
|
-
- spec/test_site/_includes/head.html
|
237
|
-
- spec/test_site/_includes/header.html
|
238
|
-
- spec/test_site/_layouts/default.html
|
239
|
-
- spec/test_site/_layouts/page.html
|
240
|
-
- spec/test_site/_layouts/post.html
|
241
|
-
- spec/test_site/_templates/new_page.markdown
|
242
|
-
- spec/test_site/_templates/new_post.markdown
|
243
|
-
- spec/test_site/about.md
|
244
|
-
- spec/test_site/css/main.css
|
245
|
-
- spec/test_site/feed.xml
|
246
|
-
- spec/test_site/index.html
|
247
219
|
has_rdoc:
|
data/spec/test_site/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
_site
|
data/spec/test_site/_config.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# Site settings
|
2
|
-
title: Your awesome title
|
3
|
-
email: your-email@domain.com
|
4
|
-
description: "Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description."
|
5
|
-
baseurl: ""
|
6
|
-
url: "http://yourdomain.com"
|
7
|
-
twitter_username: jekyllrb
|
8
|
-
github_username: jekyll
|
9
|
-
|
10
|
-
# Build settings
|
11
|
-
markdown: kramdown
|
12
|
-
permalink: pretty
|
@@ -1,61 +0,0 @@
|
|
1
|
-
<footer class="site-footer">
|
2
|
-
|
3
|
-
<div class="wrap">
|
4
|
-
|
5
|
-
<h2 class="footer-heading">{{ site.title }}</h2>
|
6
|
-
|
7
|
-
<div class="footer-col-1 column">
|
8
|
-
<ul>
|
9
|
-
<li>{{ site.title }}</li>
|
10
|
-
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
|
11
|
-
</ul>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div class="footer-col-2 column">
|
15
|
-
<ul>
|
16
|
-
{% if site.github_username %}<li>
|
17
|
-
<a href="https://github.com/{{ site.github_username }}">
|
18
|
-
<span class="icon github">
|
19
|
-
<svg version="1.1" class="github-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
20
|
-
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
21
|
-
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C2C2C2" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761
|
22
|
-
c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32
|
23
|
-
c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472
|
24
|
-
c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037
|
25
|
-
C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65
|
26
|
-
c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261
|
27
|
-
c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082
|
28
|
-
c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129
|
29
|
-
c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
|
30
|
-
</svg>
|
31
|
-
</span>
|
32
|
-
<span class="username">{{ site.github_username }}</span>
|
33
|
-
</a>
|
34
|
-
</li>{% endif %}
|
35
|
-
{% if site.twitter_username %}<li>
|
36
|
-
<a href="https://twitter.com/{{ site.twitter_username }}">
|
37
|
-
<span class="icon twitter">
|
38
|
-
<svg version="1.1" class="twitter-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
39
|
-
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
40
|
-
<path fill="#C2C2C2" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
|
41
|
-
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27
|
42
|
-
c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767
|
43
|
-
c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206
|
44
|
-
C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271
|
45
|
-
c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469
|
46
|
-
c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
|
47
|
-
</svg>
|
48
|
-
</span>
|
49
|
-
<span class="username">{{ site.twitter_username }}</span>
|
50
|
-
</a>
|
51
|
-
</li>{% endif %}
|
52
|
-
</ul>
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<div class="footer-col-3 column">
|
56
|
-
<p class="text">{{ site.description }}</p>
|
57
|
-
</div>
|
58
|
-
|
59
|
-
</div>
|
60
|
-
|
61
|
-
</footer>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<head>
|
2
|
-
<meta charset="utf-8">
|
3
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
-
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
5
|
-
<meta name="viewport" content="width=device-width">
|
6
|
-
<meta name="description" content="{{ site.description }}">
|
7
|
-
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
8
|
-
|
9
|
-
<!-- Custom CSS -->
|
10
|
-
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
11
|
-
|
12
|
-
</head>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<header class="site-header">
|
2
|
-
|
3
|
-
<div class="wrap">
|
4
|
-
|
5
|
-
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
6
|
-
|
7
|
-
<nav class="site-nav">
|
8
|
-
<a href="#" class="menu-icon">
|
9
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
10
|
-
viewBox="0 0 18 15" enable-background="new 0 0 18 15" xml:space="preserve">
|
11
|
-
<path fill="#505050" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0
|
12
|
-
h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
|
13
|
-
<path fill="#505050" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484
|
14
|
-
h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
|
15
|
-
<path fill="#505050" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0
|
16
|
-
c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
|
17
|
-
</svg>
|
18
|
-
</a>
|
19
|
-
<div class="trigger">
|
20
|
-
{% for page in site.pages %}
|
21
|
-
{% if page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %}
|
22
|
-
{% endfor %}
|
23
|
-
</div>
|
24
|
-
</nav>
|
25
|
-
|
26
|
-
</div>
|
27
|
-
|
28
|
-
</header>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: default
|
3
|
-
---
|
4
|
-
<div class="post">
|
5
|
-
|
6
|
-
<header class="post-header">
|
7
|
-
<h1>{{ page.title }}</h1>
|
8
|
-
<p class="meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
|
9
|
-
</header>
|
10
|
-
|
11
|
-
<article class="post-content">
|
12
|
-
{{ content }}
|
13
|
-
</article>
|
14
|
-
|
15
|
-
</div>
|
data/spec/test_site/about.md
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: page
|
3
|
-
title: About
|
4
|
-
permalink: /about/
|
5
|
-
---
|
6
|
-
|
7
|
-
This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/)
|
8
|
-
|
9
|
-
You can find the source code for the Jekyll new theme at: [github.com/jglovier/jekyll-new](https://github.com/jglovier/jekyll-new)
|
10
|
-
|
11
|
-
You can find the source code for Jekyll at [github.com/jekyll/jekyll](https://github.com/jekyll/jekyll)
|
data/spec/test_site/css/main.css
DELETED
@@ -1,410 +0,0 @@
|
|
1
|
-
/* Base */
|
2
|
-
/* ----------------------------------------------------------*/
|
3
|
-
|
4
|
-
* {
|
5
|
-
margin: 0;
|
6
|
-
padding: 0;
|
7
|
-
}
|
8
|
-
|
9
|
-
html, body { height: 100%; }
|
10
|
-
|
11
|
-
body {
|
12
|
-
font-family: Helvetica, Arial, sans-serif;
|
13
|
-
font-size: 16px;
|
14
|
-
line-height: 1.5;
|
15
|
-
font-weight: 300;
|
16
|
-
background-color: #fdfdfd;
|
17
|
-
}
|
18
|
-
|
19
|
-
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 400; }
|
20
|
-
|
21
|
-
a { color: #2a7ae2; text-decoration: none; }
|
22
|
-
a:hover { color: #000; text-decoration: underline; }
|
23
|
-
a:visited { color: #205caa; }
|
24
|
-
|
25
|
-
/* Utility */
|
26
|
-
|
27
|
-
.wrap:before,
|
28
|
-
.wrap:after { content:""; display:table; }
|
29
|
-
.wrap:after { clear: both; }
|
30
|
-
.wrap {
|
31
|
-
max-width: 800px;
|
32
|
-
padding: 0 30px;
|
33
|
-
margin: 0 auto;
|
34
|
-
zoom: 1;
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
/* Layout Styles */
|
39
|
-
/* ----------------------------------------------------------*/
|
40
|
-
|
41
|
-
/* Site header */
|
42
|
-
|
43
|
-
.site-header {
|
44
|
-
border-top: 5px solid #333;
|
45
|
-
border-bottom: 1px solid #e8e8e8;
|
46
|
-
min-height: 56px;
|
47
|
-
background-color: white;
|
48
|
-
}
|
49
|
-
|
50
|
-
.site-title,
|
51
|
-
.site-title:hover,
|
52
|
-
.site-title:visited {
|
53
|
-
display: block;
|
54
|
-
color: #333;
|
55
|
-
font-size: 26px;
|
56
|
-
letter-spacing: -1px;
|
57
|
-
float: left;
|
58
|
-
line-height: 56px;
|
59
|
-
position: relative;
|
60
|
-
z-index: 1;
|
61
|
-
}
|
62
|
-
|
63
|
-
.site-nav {
|
64
|
-
float: right;
|
65
|
-
line-height: 56px;
|
66
|
-
}
|
67
|
-
|
68
|
-
.site-nav .menu-icon { display: none; }
|
69
|
-
|
70
|
-
.site-nav .page-link {
|
71
|
-
margin-left: 20px;
|
72
|
-
color: #727272;
|
73
|
-
letter-spacing: -.5px;
|
74
|
-
}
|
75
|
-
|
76
|
-
/* Site footer */
|
77
|
-
|
78
|
-
.site-footer {
|
79
|
-
border-top: 1px solid #e8e8e8;
|
80
|
-
padding: 30px 0;
|
81
|
-
}
|
82
|
-
|
83
|
-
.footer-heading {
|
84
|
-
font-size: 18px;
|
85
|
-
font-weight: 300;
|
86
|
-
letter-spacing: -.5px;
|
87
|
-
margin-bottom: 15px;
|
88
|
-
}
|
89
|
-
|
90
|
-
.site-footer .column { float: left; margin-bottom: 15px; }
|
91
|
-
|
92
|
-
.footer-col-1 {
|
93
|
-
width: 270px; /*fallback*/
|
94
|
-
width: -webkit-calc(35% - 10px);
|
95
|
-
width: -moz-calc(35% - 10px);
|
96
|
-
width: -o-calc(35% - 10px);
|
97
|
-
width: calc(35% - 10px);
|
98
|
-
margin-right: 10px
|
99
|
-
}
|
100
|
-
.footer-col-2 {
|
101
|
-
width: 175px; /*fallback*/
|
102
|
-
width: -webkit-calc(23.125% - 10px);
|
103
|
-
width: -moz-calc(23.125% - 10px);
|
104
|
-
width: -o-calc(23.125% - 10px);
|
105
|
-
width: calc(23.125% - 10px);
|
106
|
-
margin-right: 10px
|
107
|
-
}
|
108
|
-
.footer-col-3 {
|
109
|
-
width: 335px; /*fallback*/
|
110
|
-
width: -webkit-calc(41.875%);
|
111
|
-
width: -moz-calc(41.875%);
|
112
|
-
width: -o-calc(41.875%);
|
113
|
-
width: calc(41.875%);
|
114
|
-
}
|
115
|
-
|
116
|
-
.site-footer ul { list-style: none; }
|
117
|
-
|
118
|
-
.site-footer li,
|
119
|
-
.site-footer p {
|
120
|
-
font-size: 15px;
|
121
|
-
letter-spacing: -.3px;
|
122
|
-
color: #828282;
|
123
|
-
}
|
124
|
-
|
125
|
-
.github-icon-svg,
|
126
|
-
.twitter-icon-svg {
|
127
|
-
display: inline-block;
|
128
|
-
width: 16px;
|
129
|
-
height: 16px;
|
130
|
-
position: relative;
|
131
|
-
top: 3px;
|
132
|
-
}
|
133
|
-
|
134
|
-
|
135
|
-
/* Page Content styles */
|
136
|
-
/* ----------------------------------------------------------*/
|
137
|
-
|
138
|
-
.page-content {
|
139
|
-
padding: 30px 0;
|
140
|
-
background-color: #fff;
|
141
|
-
}
|
142
|
-
|
143
|
-
|
144
|
-
/* Home styles */
|
145
|
-
/* ----------------------------------------------------------*/
|
146
|
-
|
147
|
-
.home h1 { margin-bottom: 25px; }
|
148
|
-
|
149
|
-
.posts { list-style-type: none; }
|
150
|
-
|
151
|
-
.posts li { margin-bottom: 30px; }
|
152
|
-
|
153
|
-
.posts .post-link {
|
154
|
-
font-size: 24px;
|
155
|
-
letter-spacing: -1px;
|
156
|
-
line-height: 1;
|
157
|
-
}
|
158
|
-
|
159
|
-
.posts .post-date {
|
160
|
-
display: block;
|
161
|
-
font-size: 15px;
|
162
|
-
color: #818181;
|
163
|
-
}
|
164
|
-
|
165
|
-
|
166
|
-
/* Post styles */
|
167
|
-
/* ----------------------------------------------------------*/
|
168
|
-
|
169
|
-
.post-header { margin: 10px 0 30px; }
|
170
|
-
|
171
|
-
.post-header h1 {
|
172
|
-
font-size: 42px;
|
173
|
-
letter-spacing: -1.75px;
|
174
|
-
line-height: 1;
|
175
|
-
font-weight: 300;
|
176
|
-
}
|
177
|
-
|
178
|
-
.post-header .meta {
|
179
|
-
font-size: 15px;
|
180
|
-
color: #818181;
|
181
|
-
margin-top: 5px;
|
182
|
-
}
|
183
|
-
|
184
|
-
.post-content { margin: 0 0 30px; }
|
185
|
-
|
186
|
-
.post-content > * { margin: 20px 0; }
|
187
|
-
|
188
|
-
|
189
|
-
.post-content h1,
|
190
|
-
.post-content h2,
|
191
|
-
.post-content h3,
|
192
|
-
.post-content h4,
|
193
|
-
.post-content h5,
|
194
|
-
.post-content h6 {
|
195
|
-
line-height: 1;
|
196
|
-
font-weight: 300;
|
197
|
-
margin: 40px 0 20px;
|
198
|
-
}
|
199
|
-
|
200
|
-
.post-content h2 {
|
201
|
-
font-size: 32px;
|
202
|
-
letter-spacing: -1.25px;
|
203
|
-
}
|
204
|
-
|
205
|
-
.post-content h3 {
|
206
|
-
font-size: 26px;
|
207
|
-
letter-spacing: -1px;
|
208
|
-
}
|
209
|
-
|
210
|
-
.post-content h4 {
|
211
|
-
font-size: 20px;
|
212
|
-
letter-spacing: -1px;
|
213
|
-
}
|
214
|
-
|
215
|
-
.post-content blockquote {
|
216
|
-
border-left: 4px solid #e8e8e8;
|
217
|
-
padding-left: 20px;
|
218
|
-
font-size: 18px;
|
219
|
-
opacity: .6;
|
220
|
-
letter-spacing: -1px;
|
221
|
-
font-style: italic;
|
222
|
-
margin: 30px 0;
|
223
|
-
}
|
224
|
-
|
225
|
-
.post-content ul,
|
226
|
-
.post-content ol { padding-left: 20px; }
|
227
|
-
|
228
|
-
.post pre,
|
229
|
-
.post code {
|
230
|
-
border: 1px solid #d5d5e9;
|
231
|
-
background-color: #eef;
|
232
|
-
padding: 8px 12px;
|
233
|
-
-webkit-border-radius: 3px;
|
234
|
-
-moz-border-radius: 3px;
|
235
|
-
border-radius: 3px;
|
236
|
-
font-size: 15px;
|
237
|
-
overflow:scroll;
|
238
|
-
}
|
239
|
-
|
240
|
-
.post code { padding: 1px 5px; }
|
241
|
-
|
242
|
-
.post ul,
|
243
|
-
.post ol { margin-left: 1.35em; }
|
244
|
-
|
245
|
-
.post pre code {
|
246
|
-
border: 0;
|
247
|
-
padding-right: 0;
|
248
|
-
padding-left: 0;
|
249
|
-
}
|
250
|
-
|
251
|
-
/* terminal */
|
252
|
-
.post pre.terminal {
|
253
|
-
border: 1px solid #000;
|
254
|
-
background-color: #333;
|
255
|
-
color: #FFF;
|
256
|
-
-webkit-border-radius: 3px;
|
257
|
-
-moz-border-radius: 3px;
|
258
|
-
border-radius: 3px;
|
259
|
-
}
|
260
|
-
|
261
|
-
.post pre.terminal code { background-color: #333; }
|
262
|
-
|
263
|
-
/* Syntax highlighting styles */
|
264
|
-
/* ----------------------------------------------------------*/
|
265
|
-
|
266
|
-
.highlight { background: #ffffff; }
|
267
|
-
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
268
|
-
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
269
|
-
.highlight .k { font-weight: bold } /* Keyword */
|
270
|
-
.highlight .o { font-weight: bold } /* Operator */
|
271
|
-
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
272
|
-
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
273
|
-
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
274
|
-
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
275
|
-
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
276
|
-
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
277
|
-
.highlight .ge { font-style: italic } /* Generic.Emph */
|
278
|
-
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
279
|
-
.highlight .gh { color: #999999 } /* Generic.Heading */
|
280
|
-
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
281
|
-
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
282
|
-
.highlight .go { color: #888888 } /* Generic.Output */
|
283
|
-
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
284
|
-
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
285
|
-
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
286
|
-
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
287
|
-
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
288
|
-
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
289
|
-
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
290
|
-
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
291
|
-
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
292
|
-
.highlight .m { color: #009999 } /* Literal.Number */
|
293
|
-
.highlight .s { color: #d14 } /* Literal.String */
|
294
|
-
.highlight .na { color: #008080 } /* Name.Attribute */
|
295
|
-
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
296
|
-
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
297
|
-
.highlight .no { color: #008080 } /* Name.Constant */
|
298
|
-
.highlight .ni { color: #800080 } /* Name.Entity */
|
299
|
-
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
300
|
-
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
301
|
-
.highlight .nn { color: #555555 } /* Name.Namespace */
|
302
|
-
.highlight .nt { color: #000080 } /* Name.Tag */
|
303
|
-
.highlight .nv { color: #008080 } /* Name.Variable */
|
304
|
-
.highlight .ow { font-weight: bold } /* Operator.Word */
|
305
|
-
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
306
|
-
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
307
|
-
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
308
|
-
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
309
|
-
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
310
|
-
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
311
|
-
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
312
|
-
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
313
|
-
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
314
|
-
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
315
|
-
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
316
|
-
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
317
|
-
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
318
|
-
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
319
|
-
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
320
|
-
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
321
|
-
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
322
|
-
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
323
|
-
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
324
|
-
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
325
|
-
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
326
|
-
|
327
|
-
|
328
|
-
/* media queries */
|
329
|
-
/* ----------------------------------------------------------*/
|
330
|
-
|
331
|
-
|
332
|
-
@media screen and (max-width: 750px) {
|
333
|
-
|
334
|
-
.footer-col-1 { width: 50%; }
|
335
|
-
|
336
|
-
.footer-col-2 {
|
337
|
-
width: 45%; /*fallback*/
|
338
|
-
width: -webkit-calc(50% - 10px);
|
339
|
-
width: -moz-calc(50% - 10px);
|
340
|
-
width: -o-calc(50% - 10px);
|
341
|
-
width: calc(50% - 10px);
|
342
|
-
margin-right: 0;
|
343
|
-
}
|
344
|
-
|
345
|
-
.site-footer .column.footer-col-3 {
|
346
|
-
width: auto;
|
347
|
-
float: none;
|
348
|
-
clear: both;
|
349
|
-
}
|
350
|
-
|
351
|
-
}
|
352
|
-
|
353
|
-
@media screen and (max-width: 600px) {
|
354
|
-
|
355
|
-
.wrap { padding: 0 12px; }
|
356
|
-
|
357
|
-
.site-nav {
|
358
|
-
position: fixed;
|
359
|
-
z-index: 10;
|
360
|
-
top: 14px; right: 8px;
|
361
|
-
background-color: white;
|
362
|
-
-webkit-border-radius: 5px;
|
363
|
-
-moz-border-radius: 5px;
|
364
|
-
border-radius: 5px;
|
365
|
-
border: 1px solid #e8e8e8;
|
366
|
-
}
|
367
|
-
|
368
|
-
.site-nav .menu-icon {
|
369
|
-
display: block;
|
370
|
-
font-size: 24px;
|
371
|
-
color: #505050;
|
372
|
-
float: right;
|
373
|
-
width: 36px;
|
374
|
-
text-align: center;
|
375
|
-
line-height: 36px;
|
376
|
-
}
|
377
|
-
|
378
|
-
.site-nav .menu-icon svg { width: 18px; height: 16px; }
|
379
|
-
|
380
|
-
.site-nav .trigger {
|
381
|
-
clear: both;
|
382
|
-
margin-bottom: 5px;
|
383
|
-
display: none;
|
384
|
-
}
|
385
|
-
|
386
|
-
.site-nav:hover .trigger { display: block; }
|
387
|
-
|
388
|
-
.site-nav .page-link {
|
389
|
-
display: block;
|
390
|
-
text-align: right;
|
391
|
-
line-height: 1.25;
|
392
|
-
padding: 5px 10px;
|
393
|
-
margin: 0;
|
394
|
-
}
|
395
|
-
|
396
|
-
.post-header h1 { font-size: 36px; }
|
397
|
-
.post-content h2 { font-size: 28px; }
|
398
|
-
.post-content h3 { font-size: 22px; }
|
399
|
-
.post-content h4 { font-size: 18px; }
|
400
|
-
.post-content blockquote { padding-left: 10px; }
|
401
|
-
.post-content ul,
|
402
|
-
.post-content ol { padding-left: 10px; }
|
403
|
-
|
404
|
-
.site-footer .column {
|
405
|
-
float: none;
|
406
|
-
clear: both;
|
407
|
-
width: auto;
|
408
|
-
margin: 0 0 15px; }
|
409
|
-
|
410
|
-
}
|
data/spec/test_site/feed.xml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: none
|
3
|
-
---
|
4
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
5
|
-
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
6
|
-
<channel>
|
7
|
-
<title>{{ site.title | xml_escape }}</title>
|
8
|
-
<description>{{ site.description | xml_escape }}</description>
|
9
|
-
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
10
|
-
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
|
11
|
-
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
12
|
-
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
13
|
-
<generator>Jekyll v{{ jekyll.version }}</generator>
|
14
|
-
{% for post in site.posts limit:10 %}
|
15
|
-
<item>
|
16
|
-
<title>{{ post.title | xml_escape }}</title>
|
17
|
-
<description>{{ post.content | xml_escape }}</description>
|
18
|
-
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
19
|
-
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
20
|
-
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
21
|
-
{% for tag in post.tags %}
|
22
|
-
<category>{{ tag | xml_escape }}</category>
|
23
|
-
{% endfor %}
|
24
|
-
{% for cat in post.categories %}
|
25
|
-
<category>{{ cat | xml_escape }}</category>
|
26
|
-
{% endfor %}
|
27
|
-
</item>
|
28
|
-
{% endfor %}
|
29
|
-
</channel>
|
30
|
-
</rss>
|
data/spec/test_site/index.html
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: default
|
3
|
-
---
|
4
|
-
|
5
|
-
<div class="home">
|
6
|
-
|
7
|
-
<h1>Posts</h1>
|
8
|
-
|
9
|
-
<ul class="posts">
|
10
|
-
{% for post in site.posts %}
|
11
|
-
<li>
|
12
|
-
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
|
13
|
-
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
14
|
-
</li>
|
15
|
-
{% endfor %}
|
16
|
-
</ul>
|
17
|
-
|
18
|
-
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
|
19
|
-
|
20
|
-
</div>
|