blogdown 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +23 -23
- data/.travis.yml +5 -0
- data/1.PNG +0 -0
- data/2.PNG +0 -0
- data/Gemfile +3 -3
- data/LICENSE.txt +22 -22
- data/README.md +53 -54
- data/Rakefile +13 -2
- data/blogdown.gemspec +33 -31
- data/lib/blogdown.rb +13 -13
- data/lib/blogdown/app.rb +7 -27
- data/lib/blogdown/cli.rb +0 -13
- data/lib/blogdown/file_pipeline.rb +5 -3
- data/lib/blogdown/publisher.rb +22 -21
- data/lib/blogdown/version.rb +1 -1
- data/lib/public/css/blogdown.css +131 -0
- data/lib/public/css/bootstrap-theme.css +347 -0
- data/lib/public/css/bootstrap-theme.css.map +1 -0
- data/lib/public/css/bootstrap-theme.min.css +7 -0
- data/lib/public/css/bootstrap.css +5785 -0
- data/lib/public/css/bootstrap.css.map +1 -0
- data/lib/public/css/bootstrap.min.css +7 -0
- data/lib/public/css/prettify.css +30 -0
- data/lib/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/public/fonts/glyphicons-halflings-regular.svg +229 -0
- data/lib/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/public/js/blogdown.js +8 -0
- data/lib/public/js/bootstrap.js +1951 -0
- data/lib/public/js/bootstrap.min.js +6 -0
- data/lib/public/js/jquery.js +9154 -0
- data/lib/views/index.erb +29 -0
- data/lib/views/layout.erb +36 -0
- data/spec/blogdown/blogdown_spec.rb +3 -14
- data/spec/fixtures/hello.md +1 -0
- data/spec/spec_helper.rb +7 -0
- metadata +42 -40
- data/features/server.feature +0 -8
- data/features/step_definitions/blogdown_steps.rb +0 -15
- data/features/support/env.rb +0 -2
- data/lib/public/images/body-bg.png +0 -0
- data/lib/public/images/highlight-bg.jpg +0 -0
- data/lib/public/images/hr.png +0 -0
- data/lib/public/images/octocat-icon.png +0 -0
- data/lib/public/images/tar-gz-icon.png +0 -0
- data/lib/public/images/zip-icon.png +0 -0
- data/lib/public/javascripts/main.js +0 -0
- data/lib/public/stylesheets/print.css +0 -226
- data/lib/public/stylesheets/pygment_trac.css +0 -69
- data/lib/public/stylesheets/stylesheet.css +0 -371
- data/lib/views/base.erb +0 -42
- data/lib/views/home.erb +0 -18
- data/lib/views/post.erb +0 -438
- data/spec/fixtures/posts/hello.md +0 -12
data/lib/views/index.erb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<!-- The sidebar
|
3
|
+
============================================-->
|
4
|
+
<div class="col-lg-3" id="bd-sidebar">
|
5
|
+
<ul class="nav nav-list bd-sidenav">
|
6
|
+
<% wiki_files.each_key do|f| %>
|
7
|
+
<li>
|
8
|
+
<a href="#<%= f%>">
|
9
|
+
<i class="icon-chevron-right"></i>
|
10
|
+
<%= f %>
|
11
|
+
</a>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<!-- The post sections
|
18
|
+
================================================-->
|
19
|
+
<div class="col-lg-9 section">
|
20
|
+
|
21
|
+
<% wiki_files.each do|k,v| %>
|
22
|
+
<h1 id="<%= k%>"><%= k%></h1>
|
23
|
+
<%= v%>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head lang="en">
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title>dropdowns</title>
|
6
|
+
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
|
7
|
+
<link href="css/blogdown.css" rel="stylesheet" type="text/css">
|
8
|
+
<script src="js/prettify.js" type="text/javascript"></script>
|
9
|
+
|
10
|
+
<script src="js/jquery.js" type="text/javascript"></script>
|
11
|
+
<script src="js/bootstrap.js" type="text/javascript"></script>
|
12
|
+
<script src="js/blogdown.js" type="text/javascript"></script>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body data-spy="scroll" data-target="#bd-sidebar">
|
16
|
+
|
17
|
+
<div class="navbar navbar-static-top bd-navbar">
|
18
|
+
<div class="navbar-inner">
|
19
|
+
<a href="#" class="navbar-brand bd-brand">blogdown</a>
|
20
|
+
<ul class="nav nav-pills pull-right bd-nav">
|
21
|
+
<li>
|
22
|
+
<a href="#">home</a>
|
23
|
+
</li>
|
24
|
+
<li>
|
25
|
+
<a href="#">about</a>
|
26
|
+
</li>
|
27
|
+
</ul>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<!-- Main content
|
31
|
+
================================-->
|
32
|
+
<div class="container">
|
33
|
+
<%= yield %>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -1,28 +1,17 @@
|
|
1
1
|
# This is just a funny looking spec, a lot of work is needed to improve it
|
2
2
|
|
3
3
|
|
4
|
-
def clean_output
|
5
|
-
root=$root_fixture_path+'/output'
|
6
|
-
root=Pathname root
|
7
|
-
if root.exist?
|
8
|
-
root.rmtree
|
9
|
-
root.mkpath
|
10
|
-
else
|
11
|
-
root.mkpath
|
12
|
-
end
|
13
|
-
end
|
14
4
|
|
15
5
|
describe "A simple markdown blogger" do
|
16
6
|
|
17
7
|
context "Publishing" do
|
18
|
-
before(:each) do
|
19
|
-
clean_output
|
20
|
-
end
|
21
8
|
let(:publisher){ Blogdown::Publisher.new $root_fixture_path}
|
22
9
|
|
23
10
|
describe "composer" do
|
24
11
|
it{
|
25
|
-
|
12
|
+
outcome={"hello"=>'<h1>hello world</h1>'}
|
13
|
+
cmp=publisher.compose
|
14
|
+
expect(cmp.first[0]).to eq(outcome.to_a[0][0])
|
26
15
|
}
|
27
16
|
end
|
28
17
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# hello world
|
data/spec/spec_helper.rb
CHANGED
@@ -14,10 +14,17 @@
|
|
14
14
|
# users commonly want.
|
15
15
|
#
|
16
16
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
|
+
require 'coveralls'
|
18
|
+
|
19
|
+
Coveralls.wear!
|
20
|
+
|
17
21
|
$LOAD_PATH<<File.expand_path('../../../lib',__FILE__)
|
18
22
|
$root_fixture_path=File.expand_path('../fixtures',__FILE__)
|
19
23
|
|
20
24
|
require 'blogdown'
|
25
|
+
|
26
|
+
|
27
|
+
|
21
28
|
RSpec.configure do |config|
|
22
29
|
# The settings below are suggested to provide a good initial experience
|
23
30
|
# with RSpec, but feel free to customize to your heart's content.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blogdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gernest
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,47 +53,47 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: redcarpet
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: github-markdown
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: thor
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 1.4.5
|
125
|
-
description: '
|
125
|
+
description: ' An offline github wiki viewer'
|
126
126
|
email:
|
127
127
|
- geofreyernest@live.com
|
128
128
|
executables:
|
@@ -132,15 +132,15 @@ extra_rdoc_files: []
|
|
132
132
|
files:
|
133
133
|
- .gitignore
|
134
134
|
- .rspec
|
135
|
+
- .travis.yml
|
136
|
+
- 1.PNG
|
137
|
+
- 2.PNG
|
135
138
|
- Gemfile
|
136
139
|
- LICENSE.txt
|
137
140
|
- README.md
|
138
141
|
- Rakefile
|
139
142
|
- bin/blogdown
|
140
143
|
- blogdown.gemspec
|
141
|
-
- features/server.feature
|
142
|
-
- features/step_definitions/blogdown_steps.rb
|
143
|
-
- features/support/env.rb
|
144
144
|
- lib/blogdown.rb
|
145
145
|
- lib/blogdown/app.rb
|
146
146
|
- lib/blogdown/cli.rb
|
@@ -148,21 +148,26 @@ files:
|
|
148
148
|
- lib/blogdown/file_pipeline.rb
|
149
149
|
- lib/blogdown/publisher.rb
|
150
150
|
- lib/blogdown/version.rb
|
151
|
-
- lib/public/
|
152
|
-
- lib/public/
|
153
|
-
- lib/public/
|
154
|
-
- lib/public/
|
155
|
-
- lib/public/
|
156
|
-
- lib/public/
|
157
|
-
- lib/public/
|
158
|
-
- lib/public/
|
159
|
-
- lib/public/
|
160
|
-
- lib/public/
|
161
|
-
- lib/
|
162
|
-
- lib/
|
163
|
-
- lib/
|
151
|
+
- lib/public/css/blogdown.css
|
152
|
+
- lib/public/css/bootstrap-theme.css
|
153
|
+
- lib/public/css/bootstrap-theme.css.map
|
154
|
+
- lib/public/css/bootstrap-theme.min.css
|
155
|
+
- lib/public/css/bootstrap.css
|
156
|
+
- lib/public/css/bootstrap.css.map
|
157
|
+
- lib/public/css/bootstrap.min.css
|
158
|
+
- lib/public/css/prettify.css
|
159
|
+
- lib/public/fonts/glyphicons-halflings-regular.eot
|
160
|
+
- lib/public/fonts/glyphicons-halflings-regular.svg
|
161
|
+
- lib/public/fonts/glyphicons-halflings-regular.ttf
|
162
|
+
- lib/public/fonts/glyphicons-halflings-regular.woff
|
163
|
+
- lib/public/js/blogdown.js
|
164
|
+
- lib/public/js/bootstrap.js
|
165
|
+
- lib/public/js/bootstrap.min.js
|
166
|
+
- lib/public/js/jquery.js
|
167
|
+
- lib/views/index.erb
|
168
|
+
- lib/views/layout.erb
|
164
169
|
- spec/blogdown/blogdown_spec.rb
|
165
|
-
- spec/fixtures/
|
170
|
+
- spec/fixtures/hello.md
|
166
171
|
- spec/spec_helper.rb
|
167
172
|
homepage: https://github.com/gernest/blogdown
|
168
173
|
licenses:
|
@@ -187,12 +192,9 @@ rubyforge_project:
|
|
187
192
|
rubygems_version: 2.3.0
|
188
193
|
signing_key:
|
189
194
|
specification_version: 4
|
190
|
-
summary:
|
195
|
+
summary: Turning your github wiki to a nice looking offline webpage
|
191
196
|
test_files:
|
192
|
-
- features/server.feature
|
193
|
-
- features/step_definitions/blogdown_steps.rb
|
194
|
-
- features/support/env.rb
|
195
197
|
- spec/blogdown/blogdown_spec.rb
|
196
|
-
- spec/fixtures/
|
198
|
+
- spec/fixtures/hello.md
|
197
199
|
- spec/spec_helper.rb
|
198
200
|
has_rdoc:
|
data/features/server.feature
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'aruba/cucumber'
|
2
|
-
|
3
|
-
When(/^I run command "(.*?)"$/) do |cmd|
|
4
|
-
args=Array.new
|
5
|
-
args<<cmd
|
6
|
-
Blogdown::Cli::CommandLine.start args
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
When(/^I visit "(.*?)"$/) do |arg1|
|
11
|
-
end
|
12
|
-
|
13
|
-
Then(/^I should see an Index Page$/) do
|
14
|
-
pending # express the regexp above with the code you wish you had
|
15
|
-
end
|
data/features/support/env.rb
DELETED
Binary file
|
Binary file
|
data/lib/public/images/hr.png
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
@@ -1,226 +0,0 @@
|
|
1
|
-
html, body, div, span, applet, object, iframe,
|
2
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
3
|
-
a, abbr, acronym, address, big, cite, code,
|
4
|
-
del, dfn, em, img, ins, kbd, q, s, samp,
|
5
|
-
small, strike, strong, sub, sup, tt, var,
|
6
|
-
b, u, i, center,
|
7
|
-
dl, dt, dd, ol, ul, li,
|
8
|
-
fieldset, form, label, legend,
|
9
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
10
|
-
article, aside, canvas, details, embed,
|
11
|
-
figure, figcaption, footer, header, hgroup,
|
12
|
-
menu, nav, output, ruby, section, summary,
|
13
|
-
time, mark, audio, video {
|
14
|
-
margin: 0;
|
15
|
-
padding: 0;
|
16
|
-
border: 0;
|
17
|
-
font-size: 100%;
|
18
|
-
font: inherit;
|
19
|
-
vertical-align: baseline;
|
20
|
-
}
|
21
|
-
/* HTML5 display-role reset for older browsers */
|
22
|
-
article, aside, details, figcaption, figure,
|
23
|
-
footer, header, hgroup, menu, nav, section {
|
24
|
-
display: block;
|
25
|
-
}
|
26
|
-
body {
|
27
|
-
line-height: 1;
|
28
|
-
}
|
29
|
-
ol, ul {
|
30
|
-
list-style: none;
|
31
|
-
}
|
32
|
-
blockquote, q {
|
33
|
-
quotes: none;
|
34
|
-
}
|
35
|
-
blockquote:before, blockquote:after,
|
36
|
-
q:before, q:after {
|
37
|
-
content: '';
|
38
|
-
content: none;
|
39
|
-
}
|
40
|
-
table {
|
41
|
-
border-collapse: collapse;
|
42
|
-
border-spacing: 0;
|
43
|
-
}
|
44
|
-
body {
|
45
|
-
font-size: 13px;
|
46
|
-
line-height: 1.5;
|
47
|
-
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
48
|
-
color: #000;
|
49
|
-
}
|
50
|
-
|
51
|
-
a {
|
52
|
-
color: #d5000d;
|
53
|
-
font-weight: bold;
|
54
|
-
}
|
55
|
-
|
56
|
-
header {
|
57
|
-
padding-top: 35px;
|
58
|
-
padding-bottom: 10px;
|
59
|
-
}
|
60
|
-
|
61
|
-
header h1 {
|
62
|
-
font-weight: bold;
|
63
|
-
letter-spacing: -1px;
|
64
|
-
font-size: 48px;
|
65
|
-
color: #303030;
|
66
|
-
line-height: 1.2;
|
67
|
-
}
|
68
|
-
|
69
|
-
header h2 {
|
70
|
-
letter-spacing: -1px;
|
71
|
-
font-size: 24px;
|
72
|
-
color: #aaa;
|
73
|
-
font-weight: normal;
|
74
|
-
line-height: 1.3;
|
75
|
-
}
|
76
|
-
#downloads {
|
77
|
-
display: none;
|
78
|
-
}
|
79
|
-
#main_content {
|
80
|
-
padding-top: 20px;
|
81
|
-
}
|
82
|
-
|
83
|
-
code, pre {
|
84
|
-
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
85
|
-
color: #222;
|
86
|
-
margin-bottom: 30px;
|
87
|
-
font-size: 12px;
|
88
|
-
}
|
89
|
-
|
90
|
-
code {
|
91
|
-
padding: 0 3px;
|
92
|
-
}
|
93
|
-
|
94
|
-
pre {
|
95
|
-
border: solid 1px #ddd;
|
96
|
-
padding: 20px;
|
97
|
-
overflow: auto;
|
98
|
-
}
|
99
|
-
pre code {
|
100
|
-
padding: 0;
|
101
|
-
}
|
102
|
-
|
103
|
-
ul, ol, dl {
|
104
|
-
margin-bottom: 20px;
|
105
|
-
}
|
106
|
-
|
107
|
-
|
108
|
-
/* COMMON STYLES */
|
109
|
-
|
110
|
-
table {
|
111
|
-
width: 100%;
|
112
|
-
border: 1px solid #ebebeb;
|
113
|
-
}
|
114
|
-
|
115
|
-
th {
|
116
|
-
font-weight: 500;
|
117
|
-
}
|
118
|
-
|
119
|
-
td {
|
120
|
-
border: 1px solid #ebebeb;
|
121
|
-
text-align: center;
|
122
|
-
font-weight: 300;
|
123
|
-
}
|
124
|
-
|
125
|
-
form {
|
126
|
-
background: #f2f2f2;
|
127
|
-
padding: 20px;
|
128
|
-
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
/* GENERAL ELEMENT TYPE STYLES */
|
133
|
-
|
134
|
-
h1 {
|
135
|
-
font-size: 2.8em;
|
136
|
-
}
|
137
|
-
|
138
|
-
h2 {
|
139
|
-
font-size: 22px;
|
140
|
-
font-weight: bold;
|
141
|
-
color: #303030;
|
142
|
-
margin-bottom: 8px;
|
143
|
-
}
|
144
|
-
|
145
|
-
h3 {
|
146
|
-
color: #d5000d;
|
147
|
-
font-size: 18px;
|
148
|
-
font-weight: bold;
|
149
|
-
margin-bottom: 8px;
|
150
|
-
}
|
151
|
-
|
152
|
-
h4 {
|
153
|
-
font-size: 16px;
|
154
|
-
color: #303030;
|
155
|
-
font-weight: bold;
|
156
|
-
}
|
157
|
-
|
158
|
-
h5 {
|
159
|
-
font-size: 1em;
|
160
|
-
color: #303030;
|
161
|
-
}
|
162
|
-
|
163
|
-
h6 {
|
164
|
-
font-size: .8em;
|
165
|
-
color: #303030;
|
166
|
-
}
|
167
|
-
|
168
|
-
p {
|
169
|
-
font-weight: 300;
|
170
|
-
margin-bottom: 20px;
|
171
|
-
}
|
172
|
-
|
173
|
-
a {
|
174
|
-
text-decoration: none;
|
175
|
-
}
|
176
|
-
|
177
|
-
p a {
|
178
|
-
font-weight: 400;
|
179
|
-
}
|
180
|
-
|
181
|
-
blockquote {
|
182
|
-
font-size: 1.6em;
|
183
|
-
border-left: 10px solid #e9e9e9;
|
184
|
-
margin-bottom: 20px;
|
185
|
-
padding: 0 0 0 30px;
|
186
|
-
}
|
187
|
-
|
188
|
-
ul li {
|
189
|
-
list-style: disc inside;
|
190
|
-
padding-left: 20px;
|
191
|
-
}
|
192
|
-
|
193
|
-
ol li {
|
194
|
-
list-style: decimal inside;
|
195
|
-
padding-left: 3px;
|
196
|
-
}
|
197
|
-
|
198
|
-
dl dd {
|
199
|
-
font-style: italic;
|
200
|
-
font-weight: 100;
|
201
|
-
}
|
202
|
-
|
203
|
-
footer {
|
204
|
-
margin-top: 40px;
|
205
|
-
padding-top: 20px;
|
206
|
-
padding-bottom: 30px;
|
207
|
-
font-size: 13px;
|
208
|
-
color: #aaa;
|
209
|
-
}
|
210
|
-
|
211
|
-
footer a {
|
212
|
-
color: #666;
|
213
|
-
}
|
214
|
-
|
215
|
-
/* MISC */
|
216
|
-
.clearfix:after {
|
217
|
-
clear: both;
|
218
|
-
content: '.';
|
219
|
-
display: block;
|
220
|
-
visibility: hidden;
|
221
|
-
height: 0;
|
222
|
-
}
|
223
|
-
|
224
|
-
.clearfix {display: inline-block;}
|
225
|
-
* html .clearfix {height: 1%;}
|
226
|
-
.clearfix {display: block;}
|