bloggy 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/LICENSE +24 -0
- data/README.md +52 -0
- data/bloggy.gemspec +0 -21
- data/lib/bloggy/version.rb +1 -1
- data/lib/generators/jekyll/blog/blog_generator.rb +2 -2
- data/lib/generators/jekyll/blog/templates/config/jekyll/css/screen.css +197 -0
- data/lib/generators/jekyll/blog/templates/config/jekyll/css/syntax.css +60 -0
- metadata +8 -3
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
Copyright (c) 2012 Zach Bruhnke
|
2
|
+
Get in touch at z [at] zbruhnke dot com
|
3
|
+
<a href="http://zachbruhnke.com/about">About Zach</a>
|
4
|
+
|
5
|
+
MIT License
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
8
|
+
a copy of this software and associated documentation files (the
|
9
|
+
"Software"), to deal in the Software without restriction, including
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
13
|
+
the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be
|
16
|
+
included in all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
21
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
22
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
23
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
24
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Bloggy
|
2
|
+
|
3
|
+
Bloggy is a simple gem that helps you generate a jekyll blog within your rails application by using generator commands similar to the ones you are used to already.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'bloggy'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install bloggy
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
All config elements you are used to in your jekyll blog are still present (and tucked away nicely in your rails app)
|
22
|
+
|
23
|
+
Once you run
|
24
|
+
|
25
|
+
$ rails g jekyll:blog blog
|
26
|
+
|
27
|
+
you will find the folders you are used to for creating jekyll blog posts inside of the config/jekyll directory. There you can add add the same commands you are used to provided at the <a href="https://github.com/mojombo/jekyll/wiki/Configuration">Jekyll configuration page</a>, so now just configure to your liking. (edit the default.html inside of _layouts for your main page and the post.html and page.html files for the corresponding results).
|
28
|
+
|
29
|
+
Your posts will be served from the public/blog directory inside of your rails application. After you write a new blog post simply cd into the config/jekyll directory and then run
|
30
|
+
|
31
|
+
$ jekyll
|
32
|
+
|
33
|
+
The new static files will be generated and ready to be re-deployed and served as static assets by your server!
|
34
|
+
|
35
|
+
**I know this is not ideal and will probably make a rake task etc. for creating and generating the posts in a later version but this is an early push and should take care of most of the dirty work**
|
36
|
+
|
37
|
+
**Make sure to note that if you run the generator more than once it will attempt to overwrite any changes you have made in the config/jekyll directory. Do not run the generator again**
|
38
|
+
|
39
|
+
Some changes are sure to come as I explore and use this on my own, but for now I feel it is a good start and a step in the right direction for quickly and easily adding a blog to your application while keeping costs low. If you have questions or would just like to get in touch you can do so by <a href="http://zachbruhnke.com/contact">contacting me here</a>. Thanks for trying out Bloggy and please feel free to fork and contribute!
|
40
|
+
|
41
|
+
|
42
|
+
This gem was originally crafted with love by <a href="http://zachbruhnke.com/">Zach Bruhnke</a> and was created to show customers on Engine Yard how they could add a simple (and SEO friendly) blog to their existing rails application in no time and save extra time and configuration steps for custom setups that save money.
|
43
|
+
|
44
|
+
Bloggy was built on top of the Jekyll framework written by <a href="http://tom.preston-werner.com/">Tom Preston-Warner</a> and uses the same config elements you're used to if you already use jekyll for blogging. The default design I included also came from Tom(clearly I am not much of a designer). Thankfully he provided them under the MIT license for us all to use. Hope you enjoy Bloggy and find it useful for your endeavors.
|
45
|
+
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
1. Fork it
|
49
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
50
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
51
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
52
|
+
5. Create new Pull Request
|
data/bloggy.gemspec
CHANGED
@@ -41,26 +41,5 @@ Gem::Specification.new do |s|
|
|
41
41
|
# specify any dependencies here; for example:
|
42
42
|
# s.add_development_dependency "rspec"
|
43
43
|
# s.add_runtime_dependency "rest-client"
|
44
|
-
|
45
|
-
# = MANIFEST =
|
46
|
-
s.files = %w[
|
47
|
-
Gemfile
|
48
|
-
Rakefile
|
49
|
-
bloggy.gemspec
|
50
|
-
lib/generators/jekyll/blog/USAGE
|
51
|
-
lib/generators/jekyll/blog/blog_generator.rb
|
52
|
-
lib/generators/jekyll/blog/templates/config/jekyll/_config.yml.tt
|
53
|
-
lib/generators/jekyll/blog/templates/config/jekyll/_layouts/default.html.tt
|
54
|
-
lib/generators/jekyll/blog/templates/config/jekyll/_layouts/page.html.tt
|
55
|
-
lib/generators/jekyll/blog/templates/config/jekyll/_layouts/post.html.tt
|
56
|
-
lib/generators/jekyll/blog/templates/config/jekyll/_posts/2012-04-25-a-test-post.markdown.tt
|
57
|
-
lib/generators/jekyll/blog/templates/config/jekyll/atom.xml.tt
|
58
|
-
lib/generators/jekyll/blog/templates/config/jekyll/index.html.tt
|
59
|
-
lib/bloggy.rb
|
60
|
-
lib/bloggy/version.rb
|
61
|
-
test/helper.rb
|
62
|
-
test/test_generate_blog.rb
|
63
|
-
]
|
64
|
-
# = MANIFEST =
|
65
44
|
|
66
45
|
end
|
data/lib/bloggy/version.rb
CHANGED
@@ -9,8 +9,8 @@ class Jekyll::BlogGenerator < Rails::Generators::NamedBase
|
|
9
9
|
copy_file 'config/jekyll/_layouts/page.html.tt', 'config/jekyll/_layouts/page.html'
|
10
10
|
copy_file 'config/jekyll/_layouts/post.html.tt', 'config/jekyll/_layouts/post.html'
|
11
11
|
copy_file 'config/jekyll/_posts/2012-04-25-a-test-post.markdown.tt', 'config/jekyll/_posts/2012-04-25-a-test-post.markdown'
|
12
|
-
copy_file 'config/jekyll/css/screen.css
|
13
|
-
copy_file 'config/jekyll/css/syntax.css
|
12
|
+
copy_file 'config/jekyll/css/screen.css', 'config/jekyll/css/screen.css'
|
13
|
+
copy_file 'config/jekyll/css/syntax.css', 'config/jekyll/css/syntax.css'
|
14
14
|
end
|
15
15
|
|
16
16
|
def create_blog source = 'config/jekyll', destination = 'public/blog'
|
@@ -0,0 +1,197 @@
|
|
1
|
+
/*****************************************************************************/
|
2
|
+
/*
|
3
|
+
/* Common
|
4
|
+
/*
|
5
|
+
/*****************************************************************************/
|
6
|
+
|
7
|
+
/* Global Reset */
|
8
|
+
|
9
|
+
* {
|
10
|
+
margin: 0;
|
11
|
+
padding: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
html, body {
|
15
|
+
height: 100%;
|
16
|
+
}
|
17
|
+
|
18
|
+
body {
|
19
|
+
background-color: white;
|
20
|
+
font: 13.34px helvetica, arial, clean, sans-serif;
|
21
|
+
*font-size: small;
|
22
|
+
text-align: center;
|
23
|
+
}
|
24
|
+
|
25
|
+
h1, h2, h3, h4, h5, h6 {
|
26
|
+
font-size: 100%;
|
27
|
+
}
|
28
|
+
|
29
|
+
h1 {
|
30
|
+
margin-bottom: 1em;
|
31
|
+
}
|
32
|
+
|
33
|
+
p {
|
34
|
+
margin: 1em 0;
|
35
|
+
}
|
36
|
+
|
37
|
+
a {
|
38
|
+
color: #00a;
|
39
|
+
}
|
40
|
+
|
41
|
+
a:hover {
|
42
|
+
color: black;
|
43
|
+
}
|
44
|
+
|
45
|
+
a:visited {
|
46
|
+
color: #a0a;
|
47
|
+
}
|
48
|
+
|
49
|
+
table {
|
50
|
+
font-size: inherit;
|
51
|
+
font: 100%;
|
52
|
+
}
|
53
|
+
|
54
|
+
/*****************************************************************************/
|
55
|
+
/*
|
56
|
+
/* Home
|
57
|
+
/*
|
58
|
+
/*****************************************************************************/
|
59
|
+
|
60
|
+
ul.posts {
|
61
|
+
list-style-type: none;
|
62
|
+
margin-bottom: 2em;
|
63
|
+
}
|
64
|
+
|
65
|
+
ul.posts li {
|
66
|
+
line-height: 1.75em;
|
67
|
+
}
|
68
|
+
|
69
|
+
ul.posts span {
|
70
|
+
color: #aaa;
|
71
|
+
font-family: Monaco, "Courier New", monospace;
|
72
|
+
font-size: 80%;
|
73
|
+
}
|
74
|
+
|
75
|
+
/*****************************************************************************/
|
76
|
+
/*
|
77
|
+
/* Site
|
78
|
+
/*
|
79
|
+
/*****************************************************************************/
|
80
|
+
|
81
|
+
.site {
|
82
|
+
font-size: 110%;
|
83
|
+
text-align: justify;
|
84
|
+
width: 40em;
|
85
|
+
margin: 3em auto 2em auto;
|
86
|
+
line-height: 1.5em;
|
87
|
+
}
|
88
|
+
|
89
|
+
.title {
|
90
|
+
color: #a00;
|
91
|
+
font-weight: bold;
|
92
|
+
margin-bottom: 2em;
|
93
|
+
}
|
94
|
+
|
95
|
+
.site .title a {
|
96
|
+
color: #a00;
|
97
|
+
text-decoration: none;
|
98
|
+
}
|
99
|
+
|
100
|
+
.site .title a:hover {
|
101
|
+
color: black;
|
102
|
+
}
|
103
|
+
|
104
|
+
.site .title a.extra {
|
105
|
+
color: #aaa;
|
106
|
+
text-decoration: none;
|
107
|
+
margin-left: 1em;
|
108
|
+
}
|
109
|
+
|
110
|
+
.site .title a.extra:hover {
|
111
|
+
color: black;
|
112
|
+
}
|
113
|
+
|
114
|
+
.site .meta {
|
115
|
+
color: #aaa;
|
116
|
+
}
|
117
|
+
|
118
|
+
.site .footer {
|
119
|
+
font-size: 80%;
|
120
|
+
color: #666;
|
121
|
+
border-top: 4px solid #eee;
|
122
|
+
margin-top: 2em;
|
123
|
+
overflow: hidden;
|
124
|
+
}
|
125
|
+
|
126
|
+
.site .footer .contact {
|
127
|
+
float: left;
|
128
|
+
margin-right: 3em;
|
129
|
+
}
|
130
|
+
|
131
|
+
.site .footer .contact a {
|
132
|
+
color: #8085C1;
|
133
|
+
}
|
134
|
+
|
135
|
+
.site .footer .rss {
|
136
|
+
margin-top: 1.1em;
|
137
|
+
margin-right: -.2em;
|
138
|
+
float: right;
|
139
|
+
}
|
140
|
+
|
141
|
+
.site .footer .rss img {
|
142
|
+
border: 0;
|
143
|
+
}
|
144
|
+
|
145
|
+
/*****************************************************************************/
|
146
|
+
/*
|
147
|
+
/* Posts
|
148
|
+
/*
|
149
|
+
/*****************************************************************************/
|
150
|
+
|
151
|
+
#post {
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
/* standard */
|
156
|
+
|
157
|
+
#post pre {
|
158
|
+
border: 1px solid #ddd;
|
159
|
+
background-color: #eef;
|
160
|
+
padding: 0 .4em;
|
161
|
+
}
|
162
|
+
|
163
|
+
#post ul,
|
164
|
+
#post ol {
|
165
|
+
margin-left: 1.35em;
|
166
|
+
}
|
167
|
+
|
168
|
+
#post code {
|
169
|
+
border: 1px solid #ddd;
|
170
|
+
background-color: #eef;
|
171
|
+
font-size: 85%;
|
172
|
+
padding: 0 .2em;
|
173
|
+
}
|
174
|
+
|
175
|
+
#post pre code {
|
176
|
+
border: none;
|
177
|
+
}
|
178
|
+
|
179
|
+
/* terminal */
|
180
|
+
|
181
|
+
#post pre.terminal {
|
182
|
+
border: 1px solid black;
|
183
|
+
background-color: #333;
|
184
|
+
color: white;
|
185
|
+
}
|
186
|
+
|
187
|
+
#post pre.terminal code {
|
188
|
+
background-color: #333;
|
189
|
+
}
|
190
|
+
|
191
|
+
#related {
|
192
|
+
margin-top: 2em;
|
193
|
+
}
|
194
|
+
|
195
|
+
#related h2 {
|
196
|
+
margin-bottom: 1em;
|
197
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
.highlight { background: #ffffff; }
|
2
|
+
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
3
|
+
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
4
|
+
.highlight .k { font-weight: bold } /* Keyword */
|
5
|
+
.highlight .o { font-weight: bold } /* Operator */
|
6
|
+
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
7
|
+
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
8
|
+
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
9
|
+
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
10
|
+
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
11
|
+
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
12
|
+
.highlight .ge { font-style: italic } /* Generic.Emph */
|
13
|
+
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
14
|
+
.highlight .gh { color: #999999 } /* Generic.Heading */
|
15
|
+
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
16
|
+
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
17
|
+
.highlight .go { color: #888888 } /* Generic.Output */
|
18
|
+
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
19
|
+
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
20
|
+
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
21
|
+
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
22
|
+
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
23
|
+
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
24
|
+
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
25
|
+
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
26
|
+
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
27
|
+
.highlight .m { color: #009999 } /* Literal.Number */
|
28
|
+
.highlight .s { color: #d14 } /* Literal.String */
|
29
|
+
.highlight .na { color: #008080 } /* Name.Attribute */
|
30
|
+
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
31
|
+
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
32
|
+
.highlight .no { color: #008080 } /* Name.Constant */
|
33
|
+
.highlight .ni { color: #800080 } /* Name.Entity */
|
34
|
+
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
35
|
+
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
36
|
+
.highlight .nn { color: #555555 } /* Name.Namespace */
|
37
|
+
.highlight .nt { color: #000080 } /* Name.Tag */
|
38
|
+
.highlight .nv { color: #008080 } /* Name.Variable */
|
39
|
+
.highlight .ow { font-weight: bold } /* Operator.Word */
|
40
|
+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
41
|
+
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
42
|
+
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
43
|
+
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
44
|
+
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
45
|
+
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
46
|
+
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
47
|
+
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
48
|
+
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
49
|
+
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
50
|
+
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
51
|
+
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
52
|
+
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
53
|
+
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
54
|
+
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
55
|
+
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
56
|
+
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
57
|
+
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
58
|
+
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
59
|
+
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
60
|
+
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bloggy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -226,9 +226,14 @@ executables: []
|
|
226
226
|
extensions: []
|
227
227
|
extra_rdoc_files: []
|
228
228
|
files:
|
229
|
+
- .gitignore
|
229
230
|
- Gemfile
|
231
|
+
- LICENSE
|
232
|
+
- README.md
|
230
233
|
- Rakefile
|
231
234
|
- bloggy.gemspec
|
235
|
+
- lib/bloggy.rb
|
236
|
+
- lib/bloggy/version.rb
|
232
237
|
- lib/generators/jekyll/blog/USAGE
|
233
238
|
- lib/generators/jekyll/blog/blog_generator.rb
|
234
239
|
- lib/generators/jekyll/blog/templates/config/jekyll/_config.yml.tt
|
@@ -237,9 +242,9 @@ files:
|
|
237
242
|
- lib/generators/jekyll/blog/templates/config/jekyll/_layouts/post.html.tt
|
238
243
|
- lib/generators/jekyll/blog/templates/config/jekyll/_posts/2012-04-25-a-test-post.markdown.tt
|
239
244
|
- lib/generators/jekyll/blog/templates/config/jekyll/atom.xml.tt
|
245
|
+
- lib/generators/jekyll/blog/templates/config/jekyll/css/screen.css
|
246
|
+
- lib/generators/jekyll/blog/templates/config/jekyll/css/syntax.css
|
240
247
|
- lib/generators/jekyll/blog/templates/config/jekyll/index.html.tt
|
241
|
-
- lib/bloggy.rb
|
242
|
-
- lib/bloggy/version.rb
|
243
248
|
- test/helper.rb
|
244
249
|
- test/test_generate_blog.rb
|
245
250
|
homepage: http://github.com/zbruhnke/bloggy
|