gollum-site 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +24 -1
- data/bin/gollum-site +8 -0
- data/lib/gollum-site/site.rb +8 -4
- data/lib/gollum-site/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -3,7 +3,7 @@ gollum-site -- A static site generator for Gollum
|
|
3
3
|
|
4
4
|
## Description
|
5
5
|
|
6
|
-
Generates a static site from a Gollum Wiki.
|
6
|
+
Generates a static site from a [Gollum](http://github.com/github/gollum) Wiki.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -11,6 +11,20 @@ The easiest way to install gollum-site is with RubyGems:
|
|
11
11
|
|
12
12
|
$ [sudo] gem install gollum-site
|
13
13
|
|
14
|
+
## Supported formats
|
15
|
+
|
16
|
+
Gollum supports several formats for wiki text. In order to generate the various
|
17
|
+
supported formats certain dependencies must be met:
|
18
|
+
|
19
|
+
* [ASCIIDoc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc`
|
20
|
+
* [Creole](http://wikicreole.org/) -- `gem install creole`
|
21
|
+
* [Markdown](http://daringfireball.net/projects/markdown/) -- `gem install rdiscount`
|
22
|
+
* [Org](http://orgmode.org/) -- `gem install org-ruby`
|
23
|
+
* [Pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML` comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
|
24
|
+
* [RDoc](http://rdoc.sourceforge.net/)
|
25
|
+
* [ReStructuredText](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
|
26
|
+
* [Textile](http://www.textism.com/tools/textile/) -- `gem install RedCloth`
|
27
|
+
|
14
28
|
## Usage
|
15
29
|
|
16
30
|
Static sites can be generated using the executable provided:
|
@@ -53,6 +67,15 @@ the "--no_default_layout" option:
|
|
53
67
|
|
54
68
|
$ gollum-site --no_default_layout generate
|
55
69
|
|
70
|
+
## Import
|
71
|
+
|
72
|
+
The gollum-site executable provides the ability to import the default layout to
|
73
|
+
the current wiki. The import command will copy the required "_Layout.html", css
|
74
|
+
and javascript to the current wiki. These files must be committed to the wiki
|
75
|
+
repository before the 'generate' command will recognize them.
|
76
|
+
|
77
|
+
$ gollum-site import
|
78
|
+
|
56
79
|
## Example
|
57
80
|
|
58
81
|
To see gollum-site in action, let's use it to generate a static site from a
|
data/bin/gollum-site
CHANGED
@@ -16,6 +16,7 @@ Basic Command Line Usage:
|
|
16
16
|
|
17
17
|
generate Generate a static site
|
18
18
|
serve Start a web server to view generated site
|
19
|
+
import Import the default layout into the current wiki
|
19
20
|
|
20
21
|
Options:
|
21
22
|
HELP
|
@@ -93,6 +94,13 @@ when 'serve'
|
|
93
94
|
|
94
95
|
trap("INT") { s.shutdown }
|
95
96
|
t.join()
|
97
|
+
when 'import'
|
98
|
+
dir = Gollum::Site.default_layout_dir()
|
99
|
+
layout = ::File.join(dir, "_Layout.html")
|
100
|
+
css = ::File.join(dir, "css")
|
101
|
+
javascript = ::File.join(dir, "javascript")
|
102
|
+
FileUtils.cp_r([layout, css, javascript], '.')
|
103
|
+
puts "The default layout has been imported. Don't forget to commit these changes."
|
96
104
|
else
|
97
105
|
puts opts
|
98
106
|
exit
|
data/lib/gollum-site/site.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
module Gollum
|
2
2
|
class Site
|
3
|
+
def self.default_layout_dir()
|
4
|
+
::File.join(::File.dirname(::File.expand_path(__FILE__)), "layout")
|
5
|
+
end
|
6
|
+
|
3
7
|
attr_reader :output_path
|
4
8
|
|
5
9
|
def initialize(wiki, options = {})
|
@@ -35,12 +39,12 @@ module Gollum
|
|
35
39
|
end
|
36
40
|
|
37
41
|
if layouts["."].nil? and @include_default_layout
|
38
|
-
dir = ::
|
39
|
-
default_layout = ::File.join(dir, "
|
42
|
+
dir = Gollum::Site.default_layout_dir()
|
43
|
+
default_layout = ::File.join(dir, "_Layout.html")
|
40
44
|
layout = ::Liquid::Template.parse(IO.read(default_layout))
|
41
45
|
layouts["."] = layout
|
42
|
-
css = ::File.join(dir, "
|
43
|
-
javascript = ::File.join(dir, "
|
46
|
+
css = ::File.join(dir, "css")
|
47
|
+
javascript = ::File.join(dir, "javascript")
|
44
48
|
FileUtils.cp_r([css, javascript], @output_path)
|
45
49
|
end
|
46
50
|
|
data/lib/gollum-site/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum-site
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Reverri
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-22 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|