adocsite 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +113 -5
- data/adocsite.gemspec +1 -1
- data/lib/adocsite/commands.rb +1 -1
- data/lib/adocsite/version.rb +1 -1
- data/tpl/adoc/layouts/compact.haml +2 -2
- data/tpl/adoc/layouts/default.haml +2 -2
- data/tpl/adoc/resources/css/{myblueraven.css → adocsite.css} +0 -0
- data/tpl/adoc/resources/js/{myblueraven.js → adocsite.js} +0 -0
- data/tpl/default/layouts/default.haml +2 -2
- data/tpl/default/resources/css/{myblueraven.css → adocsite.css} +0 -0
- data/tpl/default/resources/js/{myblueraven.js → adocsite.js} +0 -0
- metadata +154 -106
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# adocsite
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/adocsite.svg)](http://badge.fury.io/rb/adocsite)
|
4
|
+
|
5
|
+
## ADocSite in a few words
|
2
6
|
|
3
7
|
The idea behind this gem is this:
|
4
8
|
|
@@ -15,7 +19,7 @@ and generates one simple static web site out of it.
|
|
15
19
|
|
16
20
|
Now you can go, open index.html and browse through all those documents of yours and view them as web pages.
|
17
21
|
|
18
|
-
|
22
|
+
## Some more details
|
19
23
|
|
20
24
|
ADocSite is implemented in [Ruby](https://www.ruby-lang.org/en/). It expects that all files with content are
|
21
25
|
written as [asciidoc](http://www.methods.co.nz/asciidoc/) text files. These files are converted into HTML using [asciidoctor](http://asciidoctor.org/).
|
@@ -52,8 +56,6 @@ That's it.
|
|
52
56
|
|
53
57
|
Really.
|
54
58
|
|
55
|
-
[Here, let me show you...](http://myblueraven.com/adocsite).
|
56
|
-
|
57
59
|
|
58
60
|
## Installation
|
59
61
|
|
@@ -71,7 +73,113 @@ Or install it yourself as:
|
|
71
73
|
|
72
74
|
## Usage
|
73
75
|
|
74
|
-
|
76
|
+
OK! So, you can do these things with adocsite:
|
77
|
+
|
78
|
+
$ adocsite
|
79
|
+
$ adocsite build
|
80
|
+
$ adocsite dump
|
81
|
+
|
82
|
+
First two are identical: calling adocsite without parameters is same as asking it to do build.
|
83
|
+
|
84
|
+
### adocsite dump
|
85
|
+
|
86
|
+
If you run this command you will get adocsite to dump it's templates and configurations into current folder. So, after running:
|
87
|
+
|
88
|
+
$ adocsite dump
|
89
|
+
|
90
|
+
you will end up with:
|
91
|
+
|
92
|
+
* folder **adocsite__default__templates** which will contain all HAML adocsite templates
|
93
|
+
* file **adocsite__default__config.rb** which contains adocsite default configuration
|
94
|
+
* file **adocsite__custom__config__sample.rb** with example of custom configuration for site builder
|
95
|
+
* file **adocsite__wp__config__sample.rb** with example of custom configuration for wordpress article poster (heavy beta phase, avoid it for now :o)
|
96
|
+
|
97
|
+
These can be your starting point for customizing/configuring adocsite output to your liking.
|
98
|
+
|
99
|
+
### adocsite build
|
100
|
+
|
101
|
+
Create folder to work in (let's say it's called "Documents")
|
102
|
+
|
103
|
+
$ mkdir Documents
|
104
|
+
$ cd Documents
|
105
|
+
|
106
|
+
Create folders in there to hold your stuff:
|
107
|
+
|
108
|
+
$ mkdir work
|
109
|
+
$ mkdir docs
|
110
|
+
|
111
|
+
Collect all your adoc documents into **work** and/or **docs** folder(s) you created in previous step.
|
112
|
+
|
113
|
+
Run adocsite:
|
114
|
+
|
115
|
+
$ adocsite
|
116
|
+
|
117
|
+
After build is finished there will be new folder in **Documents** called **deploy**. There you can find output of adocsite's hard work. Open deploy/index.html in your browser and check out the results.
|
118
|
+
|
119
|
+
#### customize the build
|
120
|
+
|
121
|
+
If you would like to change what can be changed in adocsite, then first run
|
122
|
+
|
123
|
+
$ adocsite dump
|
124
|
+
|
125
|
+
to get templates and default configs from adocsite.
|
126
|
+
|
127
|
+
Then you can make your own config file with custom settings (i.e. different names for folder(s) where you keep your documents, instead of default **work** and **docs**) or you can tweak existing or create new templates.
|
128
|
+
|
129
|
+
With config files you can do two things:
|
130
|
+
|
131
|
+
1. save them in the folder you use to run adocsite in (i.e. **Documents** from above example)
|
132
|
+
2. save them in your $HOME folder with names **.adocsite** and **.adocsite_wp** (notice the dot at the start)
|
133
|
+
|
134
|
+
If you choose 1. then you need to tell adocsite to use that config file by running it like this
|
135
|
+
|
136
|
+
$ adocsite build --config my_custom_config.rb
|
137
|
+
|
138
|
+
or
|
139
|
+
|
140
|
+
$ adocsite --config my_custom_config.rb
|
141
|
+
|
142
|
+
If you choose 2. then your custom configuration files will be used **always** when you run adocsite like usual:
|
143
|
+
|
144
|
+
$ adocsite
|
145
|
+
|
146
|
+
or
|
147
|
+
|
148
|
+
$ adocsite build
|
149
|
+
|
150
|
+
#### custom templates
|
151
|
+
|
152
|
+
If you choose to edit/create new HAML templates for adocsite, first dump the ones adocsite uses and start there. Templates folder contains subfolders whose names are used as names of layouts. Default layout will be taken from subfolder named, yes, **default**. If you want to choose different layout run adocsite like this:
|
153
|
+
|
154
|
+
$ adocsite --layout adoc
|
155
|
+
|
156
|
+
This way adocsite will use templates from subfolder named **adoc** for building output.
|
157
|
+
|
158
|
+
If you make your own changes then
|
159
|
+
|
160
|
+
1. create templates folder (or rename one dumped by adocsite)
|
161
|
+
2. create subfolder **default**
|
162
|
+
3. put your templates in **default** subfolder
|
163
|
+
4. make/modify adocsite config file to tell it where new templates are
|
164
|
+
5. run adocsite using your custom config file
|
165
|
+
|
166
|
+
i.e. put in your config file line like this:
|
167
|
+
|
168
|
+
:TEMPLATES_FOLDER => "/home/username/Documents/tpl",
|
169
|
+
|
170
|
+
and then run adocsite like this
|
171
|
+
|
172
|
+
$ adocsite --config my_config.rb
|
173
|
+
|
174
|
+
If you have more than one template layout (i.e. more subfolders in templates folder) choose between them like this:
|
175
|
+
|
176
|
+
$ adocsite --config my_config.rb --layout blue_boxed
|
177
|
+
|
178
|
+
or
|
179
|
+
|
180
|
+
$ adocsite --config my_config.rb --layout orange
|
181
|
+
|
182
|
+
etc.
|
75
183
|
|
76
184
|
## Contributing
|
77
185
|
|
data/adocsite.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["bb@myblueraven.com"]
|
11
11
|
spec.summary = %q{Static site generator.}
|
12
12
|
spec.description = %q{Very simple static site generator for asciidoc documents.}
|
13
|
-
spec.homepage = "
|
13
|
+
spec.homepage = "https://github.com/myblueraven/adocsite#adocsite"
|
14
14
|
spec.license = "GPL v3"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/lib/adocsite/commands.rb
CHANGED
@@ -9,7 +9,7 @@ module Adocsite
|
|
9
9
|
|
10
10
|
def Commands.dump(args, options)
|
11
11
|
# default template
|
12
|
-
FileUtils.cp_r(Adocsite.config[:TEMPLATES_FOLDER], "
|
12
|
+
FileUtils.cp_r(Adocsite.config[:TEMPLATES_FOLDER], "adocsite_default_templates")
|
13
13
|
|
14
14
|
# default configuration
|
15
15
|
conf = <<-EOS
|
data/lib/adocsite/version.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
%head
|
3
3
|
%title= page_title
|
4
4
|
%script{:src => 'js/asciidoc.js'}
|
5
|
-
%script{:src => 'js/
|
6
|
-
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/
|
5
|
+
%script{:src => 'js/adocsite.js'}
|
6
|
+
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/adocsite.css'}
|
7
7
|
%body
|
8
8
|
#page
|
9
9
|
#header
|
@@ -2,8 +2,8 @@
|
|
2
2
|
%head
|
3
3
|
%title= page_title
|
4
4
|
%script{:src => 'js/asciidoc.js'}
|
5
|
-
%script{:src => 'js/
|
6
|
-
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/
|
5
|
+
%script{:src => 'js/adocsite.js'}
|
6
|
+
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/adocsite.css'}
|
7
7
|
%body
|
8
8
|
#page
|
9
9
|
#header
|
File without changes
|
File without changes
|
@@ -4,9 +4,9 @@
|
|
4
4
|
%title= page_title
|
5
5
|
%script{:src => 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'}
|
6
6
|
%script{:src => 'js/bootstrap.min.js'}
|
7
|
-
%script{:src => 'js/
|
7
|
+
%script{:src => 'js/adocsite.js'}
|
8
8
|
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/bootstrap.min.css'}
|
9
|
-
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/
|
9
|
+
%link{:rel => 'stylesheet', :media => "screen", :href => 'css/adocsite.css'}
|
10
10
|
%body
|
11
11
|
#page.container
|
12
12
|
#header.row
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,134 +1,173 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: adocsite
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Bruce Brennan
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2015-04-27 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: haml
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: asciidoctor
|
27
|
-
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
38
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
33
46
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
37
49
|
name: tilt
|
38
|
-
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
52
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
44
60
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
48
63
|
name: commander
|
49
|
-
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
66
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
55
74
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
59
77
|
name: rubypress
|
60
|
-
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
80
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
66
88
|
type: :runtime
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
70
91
|
name: nokogiri
|
71
|
-
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
94
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
77
102
|
type: :runtime
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
103
|
+
version_requirements: *id006
|
104
|
+
- !ruby/object:Gem::Dependency
|
81
105
|
name: terminal-table
|
82
|
-
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
108
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
version: "0"
|
88
116
|
type: :runtime
|
89
|
-
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
117
|
+
version_requirements: *id007
|
118
|
+
- !ruby/object:Gem::Dependency
|
92
119
|
name: mime-types
|
93
|
-
|
120
|
+
prerelease: false
|
121
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
122
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
hash: 3
|
127
|
+
segments:
|
128
|
+
- 0
|
129
|
+
version: "0"
|
99
130
|
type: :runtime
|
100
|
-
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
131
|
+
version_requirements: *id008
|
132
|
+
- !ruby/object:Gem::Dependency
|
103
133
|
name: bundler
|
104
|
-
|
134
|
+
prerelease: false
|
135
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
136
|
none: false
|
106
|
-
requirements:
|
137
|
+
requirements:
|
107
138
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
hash: 5
|
141
|
+
segments:
|
142
|
+
- 1
|
143
|
+
- 5
|
144
|
+
version: "1.5"
|
110
145
|
type: :development
|
111
|
-
|
112
|
-
|
113
|
-
- !ruby/object:Gem::Dependency
|
146
|
+
version_requirements: *id009
|
147
|
+
- !ruby/object:Gem::Dependency
|
114
148
|
name: rake
|
115
|
-
|
149
|
+
prerelease: false
|
150
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
116
151
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
hash: 3
|
156
|
+
segments:
|
157
|
+
- 0
|
158
|
+
version: "0"
|
121
159
|
type: :development
|
122
|
-
|
123
|
-
version_requirements: *79846890
|
160
|
+
version_requirements: *id010
|
124
161
|
description: Very simple static site generator for asciidoc documents.
|
125
|
-
email:
|
162
|
+
email:
|
126
163
|
- bb@myblueraven.com
|
127
|
-
executables:
|
164
|
+
executables:
|
128
165
|
- adocsite
|
129
166
|
extensions: []
|
167
|
+
|
130
168
|
extra_rdoc_files: []
|
131
|
-
|
169
|
+
|
170
|
+
files:
|
132
171
|
- .gitignore
|
133
172
|
- Gemfile
|
134
173
|
- Gemfile.lock
|
@@ -165,12 +204,12 @@ files:
|
|
165
204
|
- tpl/adoc/partials/category.haml
|
166
205
|
- tpl/adoc/partials/home.haml
|
167
206
|
- tpl/adoc/partials/page.haml
|
207
|
+
- tpl/adoc/resources/css/adocsite.css
|
168
208
|
- tpl/adoc/resources/css/asciidoctor.css
|
169
209
|
- tpl/adoc/resources/css/funky.css
|
170
210
|
- tpl/adoc/resources/css/kernel.css
|
171
|
-
- tpl/adoc/resources/
|
211
|
+
- tpl/adoc/resources/js/adocsite.js
|
172
212
|
- tpl/adoc/resources/js/asciidoc.js
|
173
|
-
- tpl/adoc/resources/js/myblueraven.js
|
174
213
|
- tpl/adoc/resources/js/sleepy.js
|
175
214
|
- tpl/default/includes/footer.haml
|
176
215
|
- tpl/default/includes/header.haml
|
@@ -182,38 +221,47 @@ files:
|
|
182
221
|
- tpl/default/partials/category.haml
|
183
222
|
- tpl/default/partials/home.haml
|
184
223
|
- tpl/default/partials/page.haml
|
224
|
+
- tpl/default/resources/css/adocsite.css
|
185
225
|
- tpl/default/resources/css/bootstrap-theme.min.css
|
186
226
|
- tpl/default/resources/css/bootstrap.min.css
|
187
|
-
- tpl/default/resources/css/myblueraven.css
|
188
227
|
- tpl/default/resources/fonts/glyphicons-halflings-regular.eot
|
189
228
|
- tpl/default/resources/fonts/glyphicons-halflings-regular.svg
|
190
229
|
- tpl/default/resources/fonts/glyphicons-halflings-regular.ttf
|
191
230
|
- tpl/default/resources/fonts/glyphicons-halflings-regular.woff
|
231
|
+
- tpl/default/resources/js/adocsite.js
|
192
232
|
- tpl/default/resources/js/bootstrap.min.js
|
193
|
-
|
194
|
-
|
195
|
-
licenses:
|
233
|
+
homepage: https://github.com/myblueraven/adocsite#adocsite
|
234
|
+
licenses:
|
196
235
|
- GPL v3
|
197
236
|
post_install_message:
|
198
237
|
rdoc_options: []
|
199
|
-
|
238
|
+
|
239
|
+
require_paths:
|
200
240
|
- lib
|
201
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
202
242
|
none: false
|
203
|
-
requirements:
|
204
|
-
- -
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
|
207
|
-
|
243
|
+
requirements:
|
244
|
+
- - ">="
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
hash: 3
|
247
|
+
segments:
|
248
|
+
- 0
|
249
|
+
version: "0"
|
250
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
251
|
none: false
|
209
|
-
requirements:
|
210
|
-
- -
|
211
|
-
- !ruby/object:Gem::Version
|
212
|
-
|
252
|
+
requirements:
|
253
|
+
- - ">="
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
hash: 3
|
256
|
+
segments:
|
257
|
+
- 0
|
258
|
+
version: "0"
|
213
259
|
requirements: []
|
260
|
+
|
214
261
|
rubyforge_project:
|
215
|
-
rubygems_version: 1.8.
|
262
|
+
rubygems_version: 1.8.15
|
216
263
|
signing_key:
|
217
264
|
specification_version: 3
|
218
265
|
summary: Static site generator.
|
219
266
|
test_files: []
|
267
|
+
|