octopress-ink 1.0.0.alpha.13 → 1.0.0.alpha.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octopress-ink.rb +2 -3
- data/lib/octopress-ink/plugins.rb +16 -10
- data/lib/octopress-ink/tags/javascript.rb +1 -1
- data/lib/octopress-ink/version.rb +1 -1
- data/test/_custom/theme/layouts/default.html +2 -2
- data/test/_plugins/theme/layouts/default.html +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08eb9060996010061c041b3f2434f22875ac59ec
|
4
|
+
data.tar.gz: d1e151131e5c0ab81d2d17d87039928e38123484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b43c4be69c724b9a62e000fb31323ba9936e0ce1baba2f5100505f03de77763bb8af2513a15c40b33b5f455e39f7a8219a50c49d6626186f18cce2c1e0271ea
|
7
|
+
data.tar.gz: dc9ddf7f51b00ffd0b7fc3592420a0db21379aad007620f5e5f690ccf85162eb295aaec66cd5bbd9c834c6ba247df41c0c6b18304f55c71e492608b8944df3ec
|
data/lib/octopress-ink.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'jekyll'
|
2
|
-
require 'pry-debugger'
|
3
2
|
require 'digest/md5'
|
4
3
|
|
5
4
|
require 'octopress-ink/generators/plugin_assets'
|
@@ -24,8 +23,8 @@ module Octopress
|
|
24
23
|
end
|
25
24
|
|
26
25
|
Liquid::Template.register_tag('embed', Octopress::Tags::EmbedTag)
|
27
|
-
Liquid::Template.register_tag('
|
28
|
-
Liquid::Template.register_tag('
|
26
|
+
Liquid::Template.register_tag('octopress_js', Octopress::Tags::JavascriptTag)
|
27
|
+
Liquid::Template.register_tag('octopress_css', Octopress::Tags::StylesheetTag)
|
29
28
|
Liquid::Template.register_tag('content_for', Octopress::Tags::ContentForBlock)
|
30
29
|
Liquid::Template.register_tag('head', Octopress::Tags::HeadBlock)
|
31
30
|
Liquid::Template.register_tag('footer', Octopress::Tags::FooterBlock)
|
@@ -100,7 +100,8 @@ module Octopress
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def self.write_combined_javascript(site)
|
103
|
-
|
103
|
+
js = combine_javascripts(site)
|
104
|
+
write_files(site, js, combined_javascript_path) unless js == ''
|
104
105
|
end
|
105
106
|
|
106
107
|
def self.combine_stylesheets(site)
|
@@ -136,15 +137,18 @@ module Octopress
|
|
136
137
|
end
|
137
138
|
|
138
139
|
def self.combine_javascripts(site)
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
140
|
+
unless @combined_javascripts
|
141
|
+
js = ''
|
142
|
+
plugins.each do |plugin|
|
143
|
+
paths = plugin.javascript_paths(site)
|
144
|
+
@javascript_fingerprint = fingerprint(paths)
|
145
|
+
paths.each do |file|
|
146
|
+
js.concat Pathname.new(file).read
|
147
|
+
end
|
145
148
|
end
|
149
|
+
@combined_javascripts = js
|
146
150
|
end
|
147
|
-
|
151
|
+
@combined_javascripts
|
148
152
|
end
|
149
153
|
|
150
154
|
def self.combined_stylesheet_tag(site)
|
@@ -155,8 +159,10 @@ module Octopress
|
|
155
159
|
tags
|
156
160
|
end
|
157
161
|
|
158
|
-
def self.combined_javascript_tag
|
159
|
-
|
162
|
+
def self.combined_javascript_tag(site)
|
163
|
+
unless combine_javascripts(site) == ''
|
164
|
+
"<script src='/#{combined_javascript_path}'></script>"
|
165
|
+
end
|
160
166
|
end
|
161
167
|
|
162
168
|
def self.stylesheet_tags
|
@@ -5,13 +5,13 @@
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
6
|
<title>{{ page.title }}</title>
|
7
7
|
<meta name="viewport" content="width=device-width">
|
8
|
-
{%
|
8
|
+
{% octopress_css %}
|
9
9
|
{% yield head %}
|
10
10
|
</head>
|
11
11
|
<body class="dang">
|
12
12
|
{{ content }}
|
13
13
|
{% wrap_yield footer %}<footer>{= yield }</footer>{% endwrap_yield %}
|
14
|
-
{%
|
14
|
+
{% octopress_js %}
|
15
15
|
{% yield scripts %}
|
16
16
|
</body>
|
17
17
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
6
|
<title>{{ page.title }}</title>
|
7
7
|
<meta name="viewport" content="width=device-width">
|
8
|
-
{%
|
8
|
+
{% octopress_css %}
|
9
9
|
{% yield head %}
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
{{ content }}
|
13
13
|
<footer>{% yield footer %}</footer>
|
14
14
|
{% yield scripts %}
|
15
|
-
{%
|
15
|
+
{% octopress_js %}
|
16
16
|
{% yield scripts %}
|
17
17
|
</body>
|
18
18
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-ink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.alpha.
|
4
|
+
version: 1.0.0.alpha.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|