octopress-docs 0.0.10 → 0.0.11

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: b7d9c16f5a6ec8fa4a578e5d748d012a6f9a0d8e
4
- data.tar.gz: 926e1271abaf66985a4b1ff241e8fc324409eff5
3
+ metadata.gz: d2d77ce69cd6c6ac00ffd9b9ef1b1a87e4071eac
4
+ data.tar.gz: 4d6c8674409e2d9db2ca07fc78ccd8bf4a2d2100
5
5
  SHA512:
6
- metadata.gz: 7a2235e5295576bd5f95562cd90504409fff3f8588f8413b12a8a2423c2ab04f3bbbd994e8487e50d40f0129200020bfd534bc0ac3335395fe3714c900160b75
7
- data.tar.gz: 6b2a03703eef7a4ce73629dc57ccd6cead78a00533b7d25853eafccfcc7185772839632f5453b43041f6668614d47550e701e61d14afc22310093a5d5e6ca955
6
+ metadata.gz: a27d449f2c1696034227cfe9a26d81c3bea41bb815eeb462673243fc465e333d33eea18309dd0c8502604aa9e9cbb0a04261f7bcf2ccc479c1219ec4679d612e
7
+ data.tar.gz: c57fc6fcba30d24618579837719284dca3b0fbf8577a70c4d6b1904aa08454707d6c401c05edc0d4bb420359cfbbad339536c691fbc1a626905641fe514aa49b
@@ -27,7 +27,7 @@ module Octopress
27
27
  require "octopress-docs/hooks"
28
28
  require "octopress-docs/liquid_filters"
29
29
 
30
- Octopress::Docs.docs_mode = true
30
+ ENV['OCTOPRESS_DOCS'] = true
31
31
  options = init_octopress_docs(options)
32
32
  options["port"] ||= '4444'
33
33
  options["serving"] = true
@@ -37,10 +37,6 @@ module Octopress
37
37
  end
38
38
 
39
39
  def self.init_octopress_docs(options)
40
- Octopress.config({
41
- 'config-file' => File.join(site_dir, '_octopress.yml'),
42
- 'override' => { 'docs_mode' => true }
43
- })
44
40
  require_plugins
45
41
  options['source'] = site_dir
46
42
  options['destination'] = File.join(site_dir, '_site')
@@ -19,9 +19,7 @@ module Octopress
19
19
  # Add doc page to Jekyll pages
20
20
  #
21
21
  def add
22
- if Octopress.config['docs_mode']
23
- Octopress.site.pages << page
24
- end
22
+ Octopress.site.pages << page
25
23
  end
26
24
 
27
25
  def disabled?
@@ -2,19 +2,19 @@ module Octopress
2
2
  module Docs
3
3
  class DocsSiteHook < Octopress::Hooks::Site
4
4
  def post_read(site)
5
- if Octopress::Docs.docs_mode && Octopress.site.nil?
5
+ if ENV['OCTOPRESS_DOCS'] && Octopress.site.nil?
6
6
  Octopress.site = site
7
7
  end
8
8
  end
9
9
 
10
10
  def pre_render(site)
11
- if Octopress::Docs.docs_mode
11
+ if ENV['OCTOPRESS_DOCS']
12
12
  site.pages.concat Octopress::Docs.pages
13
13
  end
14
14
  end
15
15
 
16
16
  def merge_payload(payload, site)
17
- if Octopress::Docs.docs_mode
17
+ if ENV['OCTOPRESS_DOCS']
18
18
  Octopress::Docs.pages_info
19
19
  end
20
20
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Docs
3
- VERSION = "0.0.10"
3
+ VERSION = "0.0.11"
4
4
  end
5
5
  end
@@ -1,14 +1,9 @@
1
1
  require "octopress"
2
2
  require "jekyll"
3
- require "octopress-escape-code"
4
- require "octopress-hooks"
5
3
  require "find"
6
4
 
7
5
  require "octopress-docs/version"
8
6
  require "octopress-docs/command"
9
- require "octopress-docs/page"
10
- require "octopress-docs/doc"
11
- require "octopress-docs/hooks"
12
7
 
13
8
  module Octopress
14
9
  unless defined? Octopress.site
@@ -24,7 +19,6 @@ module Octopress
24
19
  module Docs
25
20
  attr_reader :docs
26
21
  @docs = {}
27
- @docs_mode = false
28
22
 
29
23
  autoload :Doc, 'octopress-docs/doc'
30
24
 
@@ -32,14 +26,6 @@ module Octopress
32
26
  File.expand_path(File.join(File.dirname(__FILE__), '../', dir))
33
27
  end
34
28
 
35
- def self.docs_mode
36
- @docs_mode
37
- end
38
-
39
- def self.docs_mode=(mode)
40
- @docs_mode = mode
41
- end
42
-
43
29
  # Get all doc pages
44
30
  #
45
31
  def self.pages
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
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-12-09 00:00:00.000000000 Z
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll