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 +4 -4
- data/lib/octopress-docs/command.rb +1 -5
- data/lib/octopress-docs/doc.rb +1 -3
- data/lib/octopress-docs/hooks.rb +3 -3
- data/lib/octopress-docs/version.rb +1 -1
- data/lib/octopress-docs.rb +0 -14
- 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: d2d77ce69cd6c6ac00ffd9b9ef1b1a87e4071eac
|
4
|
+
data.tar.gz: 4d6c8674409e2d9db2ca07fc78ccd8bf4a2d2100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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')
|
data/lib/octopress-docs/doc.rb
CHANGED
data/lib/octopress-docs/hooks.rb
CHANGED
@@ -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
|
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
|
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
|
17
|
+
if ENV['OCTOPRESS_DOCS']
|
18
18
|
Octopress::Docs.pages_info
|
19
19
|
end
|
20
20
|
end
|
data/lib/octopress-docs.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2014-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|