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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1446285729adab14365a58b5aea84f2f15fcb89
4
- data.tar.gz: 5bd266b09bc0372e59ea380c09905df8374a748c
3
+ metadata.gz: 08eb9060996010061c041b3f2434f22875ac59ec
4
+ data.tar.gz: d1e151131e5c0ab81d2d17d87039928e38123484
5
5
  SHA512:
6
- metadata.gz: 9232dfcb6d7d169d8f9ac0d5a79851872df5403a66ec899b9b478aa62121b8d38a59cf6484fed6a2ee2fcd8be537f29b16cc9e2f39c3dbaa0544b4ae1979f9f7
7
- data.tar.gz: de714997b3f1e103f270d5a4de4a0916b8c7eeea406c93e7ccfc6ccdd18a0d53a078ff96e67680807a7e5c135152d6f27f7266cffdfd0eb86fd3cac29ab792d6
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('theme_js', Octopress::Tags::JavascriptTag)
28
- Liquid::Template.register_tag('theme_css', Octopress::Tags::StylesheetTag)
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
- write_files(site, combine_javascripts(site), combined_javascript_path)
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
- js = ''
140
- plugins.each do |plugin|
141
- paths = plugin.javascript_paths(site)
142
- @javascript_fingerprint = fingerprint(paths)
143
- paths.each do |file|
144
- js.concat Pathname.new(file).read
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
- js
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
- "<script src='/#{combined_javascript_path}'></script>"
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
@@ -9,7 +9,7 @@ module Octopress
9
9
  if site.config['octopress'] && site.config['octopress']['combine_javascripts'] != false
10
10
  Plugins.javascript_tags
11
11
  else
12
- Plugins.combined_javascript_tag
12
+ Plugins.combined_javascript_tag(site)
13
13
  end
14
14
  end
15
15
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.alpha.13"
3
+ VERSION = "1.0.0.alpha.14"
4
4
  end
5
5
  end
@@ -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
- {% theme_css %}
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
- {% theme_js %}
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
- {% theme_css %}
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
- {% theme_js %}
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.13
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-06 00:00:00.000000000 Z
11
+ date: 2014-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll