octopress-ink 1.0.0.alpha.14 → 1.0.0.alpha.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/CHANGELOG.md +0 -0
- data/README.md +3 -0
- data/lib/octopress-ink/assets/asset.rb +26 -10
- data/lib/octopress-ink/assets/{template.rb → include.rb} +1 -1
- data/lib/octopress-ink/assets/sass.rb +16 -3
- data/lib/octopress-ink/assets.rb +1 -1
- data/lib/octopress-ink/plugin.rb +9 -9
- data/lib/octopress-ink/plugins/sass.rb +2 -0
- data/lib/octopress-ink/plugins.rb +48 -24
- data/lib/octopress-ink/tags/include.rb +32 -0
- data/lib/octopress-ink/tags/javascript.rb +1 -5
- data/lib/octopress-ink/tags/stylesheet.rb +1 -5
- data/lib/octopress-ink/tags/yield.rb +5 -1
- data/lib/octopress-ink/tags.rb +1 -1
- data/lib/octopress-ink/version.rb +1 -1
- data/lib/octopress-ink.rb +4 -2
- data/test/_config.yml +12 -5
- data/test/expected/index.html +41 -0
- data/test/expected/javascripts/d41d8cd98f00b204e9800998ecf8427e.js +2 -0
- data/test/expected/layout_tests/local.html +3 -0
- data/test/expected/layout_tests/plugin_layout.html +3 -0
- data/test/expected/layout_tests/theme.html +13 -0
- data/test/expected/layout_tests/theme_override.html +14 -0
- data/test/expected/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css +1 -0
- data/test/expected/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css +1 -0
- data/test/expected/tag_tests/content_for.html +13 -0
- data/test/expected/tag_tests/footer.html +13 -0
- data/test/expected/tag_tests/head.html +13 -0
- data/test/expected/tag_tests/include.html +2 -0
- data/test/expected/tag_tests/include_plugin.html +1 -0
- data/test/expected/tag_tests/include_theme.html +2 -0
- data/test/expected/tag_tests/include_theme_override.html +1 -0
- data/test/expected/tag_tests/scripts.html +13 -0
- data/test/{_plugins → expected}/theme/files/test.html +0 -0
- data/test/site/index.html +41 -0
- data/test/site/javascripts/d41d8cd98f00b204e9800998ecf8427e.js +2 -0
- data/test/site/layout_tests/local.html +3 -0
- data/test/site/layout_tests/plugin_layout.html +3 -0
- data/test/site/layout_tests/theme.html +13 -0
- data/test/site/layout_tests/theme_override.html +14 -0
- data/test/site/stylesheets/all-f769b23f68363155b7ab58ba178c0f53.css +1 -0
- data/test/site/stylesheets/print-8f4e66fc8350adcb4482cebe140f212d.css +1 -0
- data/test/site/tag_tests/content_for.html +13 -0
- data/test/site/tag_tests/footer.html +13 -0
- data/test/site/tag_tests/head.html +13 -0
- data/test/site/tag_tests/include.html +2 -0
- data/test/site/tag_tests/include_plugin.html +1 -0
- data/test/site/tag_tests/include_theme.html +2 -0
- data/test/site/tag_tests/include_theme_override.html +1 -0
- data/test/site/tag_tests/scripts.html +13 -0
- data/test/site/theme/files/test.html +1 -0
- data/test/{.gitignore → source/.gitignore} +0 -0
- data/test/source/_custom/theme/includes/bar.html +2 -0
- data/test/source/_custom/theme/layouts/test.html +4 -0
- data/test/source/_custom/theme/stylesheets/_baz.sass +1 -0
- data/test/{_custom → source/_custom}/theme/stylesheets/site.css +0 -0
- data/test/source/_includes/foo.html +1 -0
- data/test/source/_layouts/default.html +12 -0
- data/test/source/_layouts/local.html +2 -0
- data/test/source/_plugins/awesome-sauce/includes/some-include.html +1 -0
- data/test/source/_plugins/awesome-sauce/layouts/test-layout.html +2 -0
- data/test/{_plugins → source/_plugins}/bundler.rb +9 -5
- data/test/source/_plugins/theme/files/test.html +1 -0
- data/test/source/_plugins/theme/includes/bar.html +2 -0
- data/test/source/_plugins/theme/includes/foo.html +1 -0
- data/test/{_plugins → source/_plugins}/theme/javascripts/bar.js +0 -0
- data/test/{_plugins → source/_plugins}/theme/javascripts/foo.js +0 -0
- data/test/{_plugins → source/_plugins}/theme/layouts/default.html +1 -7
- data/test/{_plugins → source/_plugins}/theme/layouts/test.html +1 -1
- data/test/{_plugins → source/_plugins}/theme/stylesheets/_baz.scss +0 -0
- data/test/{_custom → source/_plugins}/theme/stylesheets/bar.scss +0 -0
- data/test/{_plugins → source/_plugins}/theme/stylesheets/foo.css +0 -0
- data/test/{_plugins → source/_plugins}/theme/stylesheets/print.css +0 -0
- data/test/{_plugins → source/_plugins}/theme/stylesheets/site.css +0 -0
- data/test/source/index.md +20 -0
- data/test/source/layout_tests/local.html +4 -0
- data/test/source/layout_tests/plugin_layout.html +4 -0
- data/test/source/layout_tests/theme.html +4 -0
- data/test/source/layout_tests/theme_override.html +4 -0
- data/test/{stylesheets → source/stylesheets}/_foo.scss +0 -0
- data/test/{stylesheets → source/stylesheets}/site.sass +0 -0
- data/test/source/tag_tests/content_for.html +6 -0
- data/test/source/tag_tests/footer.html +6 -0
- data/test/source/tag_tests/head.html +10 -0
- data/test/source/tag_tests/include.html +3 -0
- data/test/source/tag_tests/include_plugin.html +3 -0
- data/test/source/tag_tests/include_theme.html +4 -0
- data/test/source/tag_tests/include_theme_override.html +3 -0
- data/test/source/tag_tests/scripts.html +6 -0
- data/test/test.rb +42 -0
- metadata +152 -44
- data/lib/octopress-ink/tags/embed.rb +0 -28
- data/test/_custom/theme/layouts/default.html +0 -17
- data/test/_custom/theme/stylesheets/_bazz.scss +0 -1
- data/test/_plugins/theme/embeds/foo.html +0 -1
- data/test/_plugins/theme/stylesheets/bar.scss +0 -4
- data/test/index.md +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90fb70585fe1d4f7edbbaa1b3d2e3669b3014450
|
4
|
+
data.tar.gz: dda5c5f03ffc61784957309400887f79c8c7596a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d7e8812d7b06fa34355e92602bb3d57885012228132875f4877cf1e19b69ef7499dbe9fb84a55a1a026b714c5561b30bbd6de40df01a4342aaa8155ada7fee0
|
7
|
+
data.tar.gz: e4e7be648642fac3335e419dbdd45388b680b0a8fe87b2aceb29b9435d4cab13720235c7372634b7f1530c3e24762f193fa61f6cf87fc32b6e5eb54c877f4c99
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
File without changes
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
Use Ink to help you build themes and plugins for Jekyll.
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/octopress-ink.png)](http://badge.fury.io/rb/octopress-ink)
|
6
|
+
[![Build Status](https://travis-ci.org/octopress/ink.png?branch=master)](https://travis-ci.org/octopress/ink)
|
7
|
+
|
5
8
|
### Features
|
6
9
|
- Installing Ink plugins is easy.
|
7
10
|
- Users won't need to install or managae plugin assets.
|
@@ -17,16 +17,18 @@ module Octopress
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def path(site)
|
20
|
-
|
20
|
+
unless @found_file
|
21
|
+
files = []
|
22
|
+
files << user_path(site)
|
23
|
+
files << plugin_path unless @plugin_type == 'local_plugin'
|
24
|
+
files = files.flatten.reject { |f| !exists? f }
|
21
25
|
|
22
|
-
|
23
|
-
|
26
|
+
unless files.size
|
27
|
+
raise IOError.new "Could not find #{File.basename(@file)} at #{file}"
|
28
|
+
end
|
29
|
+
@found_file = Pathname.new files[0]
|
24
30
|
end
|
25
|
-
|
26
|
-
unless exists? file
|
27
|
-
raise IOError.new "Could not find #{File.basename(file)} at #{file}"
|
28
|
-
end
|
29
|
-
Pathname.new file
|
31
|
+
@found_file
|
30
32
|
end
|
31
33
|
|
32
34
|
def file(file, site)
|
@@ -54,14 +56,28 @@ module Octopress
|
|
54
56
|
File.join site.source, Plugins.custom_dir(site), @dir
|
55
57
|
end
|
56
58
|
|
59
|
+
def local_plugin_path(site)
|
60
|
+
File.join site.source, @dir, @file
|
61
|
+
end
|
62
|
+
|
63
|
+
def user_override_path(site)
|
64
|
+
File.join user_dir(site), @file
|
65
|
+
end
|
66
|
+
|
57
67
|
def user_path(site)
|
58
68
|
if @plugin_type == 'local_plugin'
|
59
|
-
|
69
|
+
local_plugin_path(site)
|
60
70
|
else
|
61
|
-
|
71
|
+
user_override_path(site)
|
62
72
|
end
|
63
73
|
end
|
64
74
|
|
75
|
+
def alt_syntax_file
|
76
|
+
ext = File.extname(@file)
|
77
|
+
alt_ext = ext == 'scss' ? 'sass' : 'scss'
|
78
|
+
@file.sub(/\.#{ext}/, ".#{alt_ext}")
|
79
|
+
end
|
80
|
+
|
65
81
|
def exists?(file)
|
66
82
|
@exists[file] ||= File.exists?(file)
|
67
83
|
@exists[file]
|
@@ -19,8 +19,9 @@ module Octopress
|
|
19
19
|
"<link href='/#{File.join(@dir, @file)}' media='#{@media}' rel='stylesheet' type='text/css'>"
|
20
20
|
end
|
21
21
|
|
22
|
+
# TODO: choose user path before local path.
|
22
23
|
def user_load_path(site)
|
23
|
-
File.join
|
24
|
+
File.join(site.source, Plugins.custom_dir(site), @dir, File.dirname(@file)).sub /\/\.$/, ''
|
24
25
|
end
|
25
26
|
|
26
27
|
def theme_load_path
|
@@ -48,13 +49,25 @@ module Octopress
|
|
48
49
|
# If the plugin isn't a local plugin, add source paths to allow overrieds on @imports.
|
49
50
|
#
|
50
51
|
options[:load_paths] = [user_load_path(site), theme_load_path]
|
51
|
-
@compiled = Plugins.
|
52
|
+
@compiled = Plugins.compile_sass(path(site).read, options)
|
52
53
|
end
|
53
54
|
end
|
54
|
-
|
55
55
|
@compiled
|
56
56
|
end
|
57
57
|
|
58
|
+
def user_override_path(site)
|
59
|
+
# Allow Sass overrides to use either syntax
|
60
|
+
if @file =~ /s[ac]ss$/
|
61
|
+
[File.join(user_dir(site), @file), File.join(user_dir(site), alt_syntax_file)]
|
62
|
+
else
|
63
|
+
File.join user_dir(site), @file
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def destination
|
68
|
+
File.join(@dir, @file.sub(/s.ss/, 'css'))
|
69
|
+
end
|
70
|
+
|
58
71
|
def copy(site)
|
59
72
|
site.static_files << StaticFileContent.new(compile(site), destination)
|
60
73
|
end
|
data/lib/octopress-ink/assets.rb
CHANGED
@@ -4,7 +4,7 @@ module Octopress
|
|
4
4
|
autoload :Javascript, 'octopress-ink/assets/javascript'
|
5
5
|
autoload :Stylesheet, 'octopress-ink/assets/stylesheet'
|
6
6
|
autoload :Sass, 'octopress-ink/assets/sass'
|
7
|
-
autoload :
|
7
|
+
autoload :Include, 'octopress-ink/assets/include'
|
8
8
|
autoload :Layout, 'octopress-ink/assets/layout'
|
9
9
|
end
|
10
10
|
end
|
data/lib/octopress-ink/plugin.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
module Octopress
|
2
2
|
class Plugin
|
3
3
|
attr_accessor :name, :type, :asset_override, :assets_path,
|
4
|
-
:layouts_dir, :stylesheets_dir, :javascripts_dir, :files_dir, :
|
5
|
-
:layouts, :
|
4
|
+
:layouts_dir, :stylesheets_dir, :javascripts_dir, :files_dir, :includes_dir, :images_dir,
|
5
|
+
:layouts, :includes, :stylesheets, :javascripts, :images, :sass, :fonts, :files
|
6
6
|
|
7
7
|
def initialize(name, type)
|
8
8
|
@layouts_dir = 'layouts'
|
9
9
|
@files_dir = 'files'
|
10
10
|
@fonts_dir = 'fonts'
|
11
11
|
@images_dir = 'images'
|
12
|
-
@
|
12
|
+
@includes_dir = 'includes'
|
13
13
|
@javascripts_dir = 'javascripts'
|
14
14
|
@stylesheets_dir = 'stylesheets'
|
15
15
|
@name = name
|
16
16
|
@type = type
|
17
17
|
@layouts = []
|
18
|
-
@
|
18
|
+
@includes = []
|
19
19
|
@stylesheets = []
|
20
20
|
@javascripts = []
|
21
21
|
@images = []
|
@@ -24,7 +24,7 @@ module Octopress
|
|
24
24
|
@files = []
|
25
25
|
add_assets
|
26
26
|
add_layouts
|
27
|
-
|
27
|
+
add_includes
|
28
28
|
end
|
29
29
|
|
30
30
|
def add_assets
|
@@ -69,8 +69,8 @@ module Octopress
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
73
|
-
@
|
72
|
+
def add_includes
|
73
|
+
@includes = Assets::Include.new(self, @includes_dir)
|
74
74
|
end
|
75
75
|
|
76
76
|
def add_image(file)
|
@@ -137,8 +137,8 @@ module Octopress
|
|
137
137
|
files.dup.map { |f| f.tag }
|
138
138
|
end
|
139
139
|
|
140
|
-
def
|
141
|
-
@
|
140
|
+
def include(file, site)
|
141
|
+
@includes.file(file, site)
|
142
142
|
end
|
143
143
|
end
|
144
144
|
end
|
@@ -21,8 +21,8 @@ module Octopress
|
|
21
21
|
[@theme].concat(@plugins).concat(@local_plugins).compact
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.
|
25
|
-
plugin(name).
|
24
|
+
def self.include(name, file, site)
|
25
|
+
plugin(name).include(file, site)
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.register_plugin(plugin, name, type='plugin')
|
@@ -53,12 +53,12 @@ module Octopress
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def self.combined_stylesheet_path(media)
|
56
|
-
File.join('stylesheets', "
|
56
|
+
File.join('stylesheets', "#{media}-#{@combined_stylesheets[media][:fingerprint]}.css")
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.combined_javascript_path
|
60
60
|
print = @javascript_fingerprint || ''
|
61
|
-
File.join('javascripts', "
|
61
|
+
File.join('javascripts', "#{print}.js")
|
62
62
|
end
|
63
63
|
|
64
64
|
def self.write_files(site, source, dest)
|
@@ -165,21 +165,37 @@ module Octopress
|
|
165
165
|
end
|
166
166
|
end
|
167
167
|
|
168
|
-
def self.stylesheet_tags
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
css
|
168
|
+
def self.stylesheet_tags(site)
|
169
|
+
if concat_css(site)
|
170
|
+
combined_stylesheet_tag(site)
|
171
|
+
else
|
172
|
+
css = []
|
173
|
+
plugins.each do |plugin|
|
174
|
+
css.concat plugin.stylesheet_tags
|
175
|
+
css.concat plugin.sass_tags
|
176
|
+
end
|
177
|
+
css
|
173
178
|
end
|
174
|
-
css
|
175
179
|
end
|
176
180
|
|
177
|
-
def self.
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
+
def self.concat_css(site)
|
182
|
+
site.config['octopress'] && site.config['octopress']['concat_css'] != false
|
183
|
+
end
|
184
|
+
|
185
|
+
def self.concat_js(site)
|
186
|
+
site.config['octopress'] && site.config['octopress']['concat_js'] != false
|
187
|
+
end
|
188
|
+
|
189
|
+
def self.javascript_tags(site)
|
190
|
+
if concat_js(site)
|
191
|
+
combined_javascript_tag(site)
|
192
|
+
else
|
193
|
+
js = []
|
194
|
+
plugins.each do |plugin|
|
195
|
+
js.concat plugin.javascript_tags
|
196
|
+
end
|
197
|
+
js
|
181
198
|
end
|
182
|
-
js
|
183
199
|
end
|
184
200
|
|
185
201
|
def self.copy_javascripts(site)
|
@@ -195,26 +211,34 @@ module Octopress
|
|
195
211
|
end
|
196
212
|
end
|
197
213
|
|
214
|
+
def self.local_sass_files(site)
|
215
|
+
if site.config['octopress'] && site.config['octopress']['sass'] && site.config['octopress']['sass']['files']
|
216
|
+
sass_files = site.config['octopress']['sass']['files'] || []
|
217
|
+
else
|
218
|
+
files = Dir.glob(File.join(site.source, 'stylesheets', '**/*.s[ca]ss')).reject { |f| File.basename(f) =~ /^_/ }
|
219
|
+
sass_files = files.map { |f| f.split('stylesheets/').last}
|
220
|
+
end
|
221
|
+
sass_files
|
222
|
+
end
|
223
|
+
|
198
224
|
def self.add_static_files(site)
|
199
225
|
|
200
|
-
|
201
|
-
plugin('sass').add_files site.config['sass']['files']
|
202
|
-
end
|
226
|
+
plugin('sass').add_files(local_sass_files(site))
|
203
227
|
|
204
228
|
# Copy/Generate Stylesheets
|
205
229
|
#
|
206
|
-
if site
|
207
|
-
copy_stylesheets(site)
|
208
|
-
else
|
230
|
+
if concat_css(site)
|
209
231
|
write_combined_stylesheet(site)
|
232
|
+
else
|
233
|
+
copy_stylesheets(site)
|
210
234
|
end
|
211
235
|
|
212
236
|
# Copy/Generate Javascripts
|
213
237
|
#
|
214
|
-
if site
|
215
|
-
copy_javascripts(site)
|
216
|
-
else
|
238
|
+
if concat_js(site)
|
217
239
|
write_combined_javascript(site)
|
240
|
+
else
|
241
|
+
copy_javascripts(site)
|
218
242
|
end
|
219
243
|
|
220
244
|
# Copy other assets
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Octopress
|
2
|
+
module Tags
|
3
|
+
class IncludeTag < Liquid::Tag
|
4
|
+
PLUGIN_SYNTAX = /(.+?):(\S+)/
|
5
|
+
|
6
|
+
def initialize(tag_name, markup, tokens)
|
7
|
+
super
|
8
|
+
@markup = markup
|
9
|
+
end
|
10
|
+
|
11
|
+
def render(context)
|
12
|
+
include_tag = Jekyll::Tags::IncludeTag.new('include', @markup, [])
|
13
|
+
|
14
|
+
# If markup references a plugin e.g. plugin-name:include-file.html
|
15
|
+
if @markup.strip =~ PLUGIN_SYNTAX
|
16
|
+
@plugin = $1
|
17
|
+
@path = $2
|
18
|
+
content = Plugins.include(@plugin, @path, context.registers[:site]).read
|
19
|
+
partial = Liquid::Template.parse(content)
|
20
|
+
context.stack {
|
21
|
+
context['include'] = include_tag.parse_params(context)
|
22
|
+
partial.render!(context)
|
23
|
+
}.strip
|
24
|
+
# Otherwise, use Jekyll's default include tag
|
25
|
+
else
|
26
|
+
include_tag.render(context)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
@@ -6,11 +6,7 @@ module Octopress
|
|
6
6
|
end
|
7
7
|
def render(context)
|
8
8
|
site = context.registers[:site]
|
9
|
-
|
10
|
-
Plugins.javascript_tags
|
11
|
-
else
|
12
|
-
Plugins.combined_javascript_tag(site)
|
13
|
-
end
|
9
|
+
Plugins.javascript_tags(site)
|
14
10
|
end
|
15
11
|
end
|
16
12
|
end
|
@@ -6,11 +6,7 @@ module Octopress
|
|
6
6
|
end
|
7
7
|
def render(context)
|
8
8
|
site = context.registers[:site]
|
9
|
-
|
10
|
-
Plugins.stylesheet_tags
|
11
|
-
else
|
12
|
-
Plugins.combined_stylesheet_tag(site)
|
13
|
-
end
|
9
|
+
Plugins.stylesheet_tags(site)
|
14
10
|
end
|
15
11
|
end
|
16
12
|
end
|
@@ -9,7 +9,11 @@ module Octopress
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def render(context)
|
12
|
-
Helpers::ContentFor.render(context, @block_name)
|
12
|
+
content = Helpers::ContentFor.render(context, @block_name)
|
13
|
+
if @block_name == 'head'
|
14
|
+
content = "<meta name='generator' content='Octopress #{Octopress::Ink::VERSION}'>\n" + content
|
15
|
+
end
|
16
|
+
content
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
data/lib/octopress-ink/tags.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Octopress
|
2
2
|
module Tags
|
3
|
-
autoload :
|
3
|
+
autoload :IncludeTag, 'octopress-ink/tags/include'
|
4
4
|
autoload :JavascriptTag, 'octopress-ink/tags/javascript'
|
5
5
|
autoload :StylesheetTag, 'octopress-ink/tags/stylesheet'
|
6
6
|
autoload :ContentForBlock, 'octopress-ink/tags/content_for'
|
data/lib/octopress-ink.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'jekyll'
|
2
2
|
require 'digest/md5'
|
3
3
|
|
4
|
+
require 'octopress-ink/version'
|
4
5
|
require 'octopress-ink/generators/plugin_assets'
|
5
6
|
require 'octopress-ink/jekyll/hooks'
|
6
7
|
require 'octopress-ink/version'
|
7
8
|
require 'octopress-ink/helpers/content_for'
|
9
|
+
require 'pry-debugger'
|
8
10
|
|
9
11
|
module Octopress
|
10
12
|
CUSTOM_DIR = "_custom"
|
@@ -17,12 +19,12 @@ module Octopress
|
|
17
19
|
autoload :Tags, 'octopress-ink/tags'
|
18
20
|
autoload :SassPlugin, 'octopress-ink/plugins/sass'
|
19
21
|
|
20
|
-
def self.register_plugin(plugin, name, type)
|
22
|
+
def self.register_plugin(plugin, name, type='plugin')
|
21
23
|
Plugins.register_plugin(plugin, name, type)
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
25
|
-
Liquid::Template.register_tag('
|
27
|
+
Liquid::Template.register_tag('include', Octopress::Tags::IncludeTag)
|
26
28
|
Liquid::Template.register_tag('octopress_js', Octopress::Tags::JavascriptTag)
|
27
29
|
Liquid::Template.register_tag('octopress_css', Octopress::Tags::StylesheetTag)
|
28
30
|
Liquid::Template.register_tag('content_for', Octopress::Tags::ContentForBlock)
|
data/test/_config.yml
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
name: Your New Jekyll Site
|
2
2
|
markdown: redcarpet
|
3
3
|
pygments: true
|
4
|
+
source: source
|
5
|
+
destination: site
|
6
|
+
exclude:
|
7
|
+
- Gemfile
|
8
|
+
- Gemfile.lock
|
9
|
+
- test.rb
|
4
10
|
|
5
11
|
# Sass configurations
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
12
|
+
octopress:
|
13
|
+
sass:
|
14
|
+
#output_style: compact
|
15
|
+
#line_numbers: true
|
16
|
+
files:
|
17
|
+
- [site.sass, all]
|
11
18
|
|
12
19
|
#gem:
|
13
20
|
#- octopress-plugins
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<title>Your New Jekyll Site</title>
|
7
|
+
<meta name="viewport" content="width=device-width">
|
8
|
+
</head>
|
9
|
+
<body class=" ">
|
10
|
+
<div class='local-override'><p>Test plugin assets and overrides:</p>
|
11
|
+
|
12
|
+
<ul>
|
13
|
+
<li>layouts</li>
|
14
|
+
<li>includes</li>
|
15
|
+
<li>stylesheets</li>
|
16
|
+
<li>javascripts</li>
|
17
|
+
<li>files</li>
|
18
|
+
<li>images</li>
|
19
|
+
<li>fonts</li>
|
20
|
+
<li>sass plugin</li>
|
21
|
+
</ul>
|
22
|
+
|
23
|
+
<p>Test configurations</p>
|
24
|
+
|
25
|
+
<ul>
|
26
|
+
<li>sass compression</li>
|
27
|
+
<li>sass line numbers</li>
|
28
|
+
<li>concat_css</li>
|
29
|
+
<li>concat_js</li>
|
30
|
+
</ul>
|
31
|
+
|
32
|
+
<p>Test: markdown
|
33
|
+
<strong>Hello World!</strong></p>
|
34
|
+
|
35
|
+
<p>Test: head tag</p>
|
36
|
+
|
37
|
+
<p>Testing Include booga</p>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
</body>
|
41
|
+
</html>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<title></title>
|
7
|
+
<meta name="viewport" content="width=device-width">
|
8
|
+
</head>
|
9
|
+
<body class=" ">
|
10
|
+
Load a theme layout
|
11
|
+
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<title></title>
|
7
|
+
<meta name="viewport" content="width=device-width">
|
8
|
+
</head>
|
9
|
+
<body class=" ">
|
10
|
+
<div class='local-override'>Load a layout from the theme override
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
body{color:black}div{display:block}body{background:#fff}body{display:table}body{background:#aaa111}div{display:table}
|
@@ -0,0 +1 @@
|
|
1
|
+
.omg{display:none}
|
@@ -0,0 +1 @@
|
|
1
|
+
include from plugin
|
@@ -0,0 +1 @@
|
|
1
|
+
, I heard you like includes.
|
File without changes
|