octopress-genesis-theme 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -14
- data/assets/config.yml +7 -29
- data/assets/includes/archive-post.html +3 -4
- data/assets/includes/index-post.html +6 -6
- data/assets/includes/post-nav.html +4 -4
- data/assets/includes/search/google.html +1 -1
- data/assets/includes/site-header.html +2 -2
- data/assets/layouts/base.html +1 -2
- data/assets/layouts/post.html +8 -8
- data/assets/stylesheets/_entry.scss +29 -20
- data/assets/stylesheets/_layout.scss +2 -1
- data/assets/stylesheets/_sizes.scss +1 -1
- data/assets/stylesheets/_typography.scss +1 -6
- data/assets/stylesheets/index.scss +3 -1
- data/assets/{pages/archive.html → templates/post_archive.html} +1 -6
- data/assets/templates/post_index.html +9 -0
- data/lib/{octopress-genesis → octopress-genesis-theme}/version.rb +1 -1
- data/lib/octopress-genesis-theme.rb +23 -0
- metadata +64 -75
- data/.gitignore +0 -25
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/Rakefile +0 -2
- data/assets/includes/feed/entry.xml +0 -30
- data/assets/includes/feed/head.xml +0 -9
- data/assets/pages/feed-articles.xml +0 -14
- data/assets/pages/feed-links.xml +0 -14
- data/assets/pages/feed.xml +0 -12
- data/assets/pages/index.html +0 -11
- data/demo/Gemfile +0 -5
- data/demo/_config.yml +0 -7
- data/demo/_plugins/theme/config.yml +0 -0
- data/demo/_plugins/theme/stylesheets/_colors.scss +0 -16
- data/demo/_plugins/theme/stylesheets/_entry.scss +0 -85
- data/demo/_plugins/theme/stylesheets/_header.scss +0 -51
- data/demo/_plugins/theme/stylesheets/_post-nav.scss +0 -38
- data/demo/_plugins/theme/stylesheets/_sizes.scss +0 -17
- data/demo/_plugins/theme/stylesheets/_typography.scss +0 -91
- data/demo/_plugins/theme/stylesheets/index.scss +0 -16
- data/demo/_posts/2014-08-03-dang-that-was-fast.md +0 -18
- data/demo/_posts/2014-08-03-hi-guys.markdown +0 -8
- data/demo/images/panorama.jpg +0 -0
- data/demo/page.html +0 -175
- data/lib/octopress-genesis/category-generator.rb +0 -177
- data/lib/octopress-genesis.rb +0 -27
- data/octopress-genesis.gemspec +0 -38
@@ -1,91 +0,0 @@
|
|
1
|
-
$post-title-font-stack: "Source Serif Pro", Georgia, Times, 'Times New Roman', serif;
|
2
|
-
|
3
|
-
html {
|
4
|
-
font-size: $base-font-size;
|
5
|
-
}
|
6
|
-
|
7
|
-
body {
|
8
|
-
font-family: "Source Serif Pro", Georgia, Times, 'Times New Roman', serif;
|
9
|
-
line-height: 1.65em;
|
10
|
-
}
|
11
|
-
|
12
|
-
h1,h2,h3,h4,h5,h6 {
|
13
|
-
line-height: normal;
|
14
|
-
margin: .83em 0;
|
15
|
-
}
|
16
|
-
|
17
|
-
h1 {
|
18
|
-
font-size: 2.8rem;
|
19
|
-
}
|
20
|
-
|
21
|
-
h2 {
|
22
|
-
font-size: 2em;
|
23
|
-
}
|
24
|
-
|
25
|
-
h3 {
|
26
|
-
font-size: 1.6em;
|
27
|
-
}
|
28
|
-
|
29
|
-
h4 {
|
30
|
-
font-size: 1.3em;
|
31
|
-
}
|
32
|
-
|
33
|
-
h5 {
|
34
|
-
font-size: 1.2em;
|
35
|
-
}
|
36
|
-
|
37
|
-
h6 {
|
38
|
-
font-size: 1em;
|
39
|
-
}
|
40
|
-
|
41
|
-
p, ul, ol, dl, table, figure, blockquote {
|
42
|
-
margin: { top: 1.45rem; bottom: 1.45rem; }
|
43
|
-
}
|
44
|
-
|
45
|
-
figure {
|
46
|
-
margin: {left: 0; right: 0;}
|
47
|
-
}
|
48
|
-
|
49
|
-
img {
|
50
|
-
max-width: 100%;
|
51
|
-
}
|
52
|
-
|
53
|
-
blockquote {
|
54
|
-
border-left: 5px solid $page-border;
|
55
|
-
margin-left: 0;
|
56
|
-
padding: 1px .5rem 1px 2rem;
|
57
|
-
color: $medium-text-color;
|
58
|
-
p {
|
59
|
-
margin: .8rem 0;
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
.float-right {
|
64
|
-
float: right;
|
65
|
-
margin: { top: 1.1em; left: 1.1em; bottom: 1.1em; }
|
66
|
-
}
|
67
|
-
.float-left {
|
68
|
-
float: left;
|
69
|
-
margin: { top: 1.1em; right: 1.1em; bottom: 1.1em; }
|
70
|
-
}
|
71
|
-
|
72
|
-
.align-left { text-align: left; }
|
73
|
-
.align-center { text-align: center; }
|
74
|
-
.align-left { text-align: left; }
|
75
|
-
|
76
|
-
.align-top { vertical-align: top; }
|
77
|
-
.align-middle { vertical-align: middle; }
|
78
|
-
.align-bottom { vertical-align: bottom; }
|
79
|
-
|
80
|
-
hr {
|
81
|
-
border: none;
|
82
|
-
background: none;
|
83
|
-
width: 100%;
|
84
|
-
border-bottom: 1px solid $page-border;
|
85
|
-
&.dark {
|
86
|
-
border-bottom: 1px solid $gray;
|
87
|
-
}
|
88
|
-
&.thick {
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
// Theme settings
|
2
|
-
|
3
|
-
$center-headings: {{ theme.center-headings }};
|
4
|
-
|
5
|
-
// Stylesheets
|
6
|
-
@import "colors";
|
7
|
-
@import "sizes";
|
8
|
-
@import "mixins";
|
9
|
-
@import "fonts";
|
10
|
-
@import "typography";
|
11
|
-
@import "theme";
|
12
|
-
@import "grid";
|
13
|
-
@import "layout";
|
14
|
-
@import "header";
|
15
|
-
@import "entry";
|
16
|
-
@import "post-nav";
|
@@ -1,18 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: theme:post
|
3
|
-
title: "Dang That Was Fast"
|
4
|
-
date: 2014-08-03T23:18:12-05:00
|
5
|
-
categories:
|
6
|
-
- 'test'
|
7
|
-
- 'news'
|
8
|
-
title-graphic: /images/panorama.jpg
|
9
|
-
class: light-title
|
10
|
-
subtitle: But was it? Was it really?
|
11
|
-
external-url: http://timecube.com
|
12
|
-
---
|
13
|
-
|
14
|
-
**The quick**, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack.
|
15
|
-
|
16
|
-
Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack! " my brave ghost pled.
|
17
|
-
|
18
|
-
Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy! ", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just
|
data/demo/images/panorama.jpg
DELETED
Binary file
|
data/demo/page.html
DELETED
@@ -1,175 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: theme:page
|
3
|
-
title: some awesome page
|
4
|
-
---
|
5
|
-
|
6
|
-
<!-- Sample Content to Plugin to Template -->
|
7
|
-
<h1>CSS Basic Elements</h1>
|
8
|
-
|
9
|
-
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
|
10
|
-
|
11
|
-
<hr>
|
12
|
-
|
13
|
-
<h1 id="headings">Headings</h1>
|
14
|
-
|
15
|
-
<h1>Heading 1</h1>
|
16
|
-
<h2>Heading 2</h2>
|
17
|
-
<h3>Heading 3</h3>
|
18
|
-
<h4>Heading 4</h4>
|
19
|
-
<h5>Heading 5</h5>
|
20
|
-
<h6>Heading 6</h6>
|
21
|
-
|
22
|
-
<small><a href="#wrapper">[top]</a></small>
|
23
|
-
<hr>
|
24
|
-
|
25
|
-
<figure class='image full-width'><img src="/images/panorama.jpg"></figure>
|
26
|
-
|
27
|
-
|
28
|
-
<h1 id="paragraph">Paragraph</h1>
|
29
|
-
|
30
|
-
|
31
|
-
<p><img class='float-right' width=250 height=125px src="#" alt="Some image">Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a> adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
|
32
|
-
|
33
|
-
<figure class='float-left'>
|
34
|
-
<img src="#" width=250 height=125px alt="Cat picture">
|
35
|
-
<figcaption>This is a totally awesome cat picture</figcaption>
|
36
|
-
</figure>
|
37
|
-
|
38
|
-
<p>Lorem ipsum dolor sit amet, <em>emphasis</em> consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
|
39
|
-
|
40
|
-
<small><a href="#wrapper">[top]</a></small>
|
41
|
-
<hr>
|
42
|
-
|
43
|
-
<h1 id="list_types">List Types</h1>
|
44
|
-
|
45
|
-
<h3>Definition List</h3>
|
46
|
-
<dl>
|
47
|
-
<dt>Definition List Title</dt>
|
48
|
-
<dd>This is a definition list division.</dd>
|
49
|
-
</dl>
|
50
|
-
|
51
|
-
<h3>Ordered List</h3>
|
52
|
-
<ol>
|
53
|
-
<li>List Item 1</li>
|
54
|
-
<li>List Item 2</li>
|
55
|
-
<li>List Item 3</li>
|
56
|
-
</ol>
|
57
|
-
|
58
|
-
<h3>Unordered List</h3>
|
59
|
-
<ul>
|
60
|
-
<li>List Item 1</li>
|
61
|
-
<li>List Item 2</li>
|
62
|
-
<li>List Item 3</li>
|
63
|
-
</ul>
|
64
|
-
|
65
|
-
<small><a href="#wrapper">[top]</a></small>
|
66
|
-
<hr>
|
67
|
-
|
68
|
-
<h1 id="figures">Figures</h1>
|
69
|
-
|
70
|
-
<h1 id="form_elements">Fieldsets, Legends, and Form Elements</h1>
|
71
|
-
|
72
|
-
<fieldset>
|
73
|
-
<legend>Legend</legend>
|
74
|
-
|
75
|
-
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus.</p>
|
76
|
-
|
77
|
-
<form>
|
78
|
-
<h2>Form Element</h2>
|
79
|
-
|
80
|
-
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui.</p>
|
81
|
-
|
82
|
-
<p><label for="text_field">Text Field:</label><br>
|
83
|
-
<input type="text" id="text_field"></p>
|
84
|
-
|
85
|
-
<p><label for="text_area">Text Area:</label><br>
|
86
|
-
<textarea id="text_area"></textarea></p>
|
87
|
-
|
88
|
-
<p><label for="select_element">Select Element:</label><br>
|
89
|
-
<select name="select_element">
|
90
|
-
<optgroup label="Option Group 1">
|
91
|
-
<option value="1">Option 1</option>
|
92
|
-
<option value="2">Option 2</option>
|
93
|
-
<option value="3">Option 3</option>
|
94
|
-
</optgroup>
|
95
|
-
<optgroup label="Option Group 2">
|
96
|
-
<option value="1">Option 1</option>
|
97
|
-
<option value="2">Option 2</option>
|
98
|
-
<option value="3">Option 3</option>
|
99
|
-
</optgroup>
|
100
|
-
</select></p>
|
101
|
-
|
102
|
-
<p><label for="radio_buttons">Radio Buttons:</label><br>
|
103
|
-
<input type="radio" class="radio" name="radio_button" value="radio_1"> Radio 1<br/>
|
104
|
-
<input type="radio" class="radio" name="radio_button" value="radio_2"> Radio 2<br/>
|
105
|
-
<input type="radio" class="radio" name="radio_button" value="radio_3"> Radio 3<br/>
|
106
|
-
</p>
|
107
|
-
|
108
|
-
<p><label for="checkboxes">Checkboxes:</label><br>
|
109
|
-
<input type="checkbox" class="checkbox" name="checkboxes" value="check_1"> Radio 1<br/>
|
110
|
-
<input type="checkbox" class="checkbox" name="checkboxes" value="check_2"> Radio 2<br/>
|
111
|
-
<input type="checkbox" class="checkbox" name="checkboxes" value="check_3"> Radio 3<br/>
|
112
|
-
</p>
|
113
|
-
|
114
|
-
<p><label for="password">Password:</label><br>
|
115
|
-
<input type="password" class="password" name="password">
|
116
|
-
</p>
|
117
|
-
|
118
|
-
<p><label for="file">File Input:</label><br>
|
119
|
-
<input type="file" class="file" name="file">
|
120
|
-
</p>
|
121
|
-
|
122
|
-
|
123
|
-
<p><input class="button" type="reset" value="Clear"> <input class="button" type="submit" value="Submit" />
|
124
|
-
</p>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
</form>
|
129
|
-
|
130
|
-
</fieldset>
|
131
|
-
|
132
|
-
<small><a href="#wrapper">[top]</a></small>
|
133
|
-
<hr>
|
134
|
-
|
135
|
-
<h1 id="tables">Tables</h1>
|
136
|
-
|
137
|
-
<table cellspacing="0" cellpadding="0">
|
138
|
-
<tr>
|
139
|
-
<th>Table Header 1</th><th>Table Header 2</th><th>Table Header 3</th>
|
140
|
-
</tr>
|
141
|
-
<tr>
|
142
|
-
<td>Division 1</td><td>Division 2</td><td>Division 3</td>
|
143
|
-
</tr>
|
144
|
-
<tr class="even">
|
145
|
-
<td>Division 1</td><td>Division 2</td><td>Division 3</td>
|
146
|
-
</tr>
|
147
|
-
<tr>
|
148
|
-
<td>Division 1</td><td>Division 2</td><td>Division 3</td>
|
149
|
-
</tr>
|
150
|
-
|
151
|
-
</table>
|
152
|
-
|
153
|
-
<small><a href="#wrapper">[top]</a></small>
|
154
|
-
<hr>
|
155
|
-
|
156
|
-
<h1 id="misc">Misc Stuff - abbr, acronym, pre, code, sub, sup, etc.</h1>
|
157
|
-
|
158
|
-
<p>Lorem <sup>superscript</sup> dolor <sub>subscript</sub> amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. <cite>cite</cite>. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. <acronym title="National Basketball Association">NBA</acronym> Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. <abbr title="Avenue">AVE</abbr></p>
|
159
|
-
|
160
|
-
<pre><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. <acronym title="National Basketball Association">NBA</acronym> Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. <abbr title="Avenue">AVE</abbr></p></pre>
|
161
|
-
|
162
|
-
<blockquote>
|
163
|
-
"This stylesheet is going to help so freaking much." <br>-Blockquote
|
164
|
-
</blockquote>
|
165
|
-
|
166
|
-
<figure class='quote'>
|
167
|
-
<blockquote>Never pet a burning dog.</blockquote>
|
168
|
-
<figcaption>
|
169
|
-
<span class='quote-author'>Some NPC</span>
|
170
|
-
<cite>Warcraft II</cite>
|
171
|
-
</figcaption>
|
172
|
-
</figure>
|
173
|
-
|
174
|
-
<small><a href="#wrapper">[top]</a></small>
|
175
|
-
<!-- End of Sample Content -->
|
@@ -1,177 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
#
|
3
|
-
# Jekyll category page generator.
|
4
|
-
# http://recursive-design.com/projects/jekyll-plugins/
|
5
|
-
#
|
6
|
-
# Version: 0.1.4 (201101061053)
|
7
|
-
#
|
8
|
-
# Copyright (c) 2010 Dave Perrett, http://recursive-design.com/
|
9
|
-
# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
10
|
-
#
|
11
|
-
# A generator that creates category pages for jekyll sites.
|
12
|
-
#
|
13
|
-
# Included filters :
|
14
|
-
# - category_links: Outputs the list of categories as comma-separated <a> links.
|
15
|
-
#
|
16
|
-
# Available theme/config.yml settings :
|
17
|
-
# - category:
|
18
|
-
# url: The subfolder to build category pages in (default is 'categories').
|
19
|
-
# prefix: The string used before the category name in the page title (default is 'Category').
|
20
|
-
|
21
|
-
module Jekyll
|
22
|
-
|
23
|
-
# The CategoryIndex class creates a single category page for the specified category.
|
24
|
-
class CategoryIndex < Page
|
25
|
-
|
26
|
-
# Initializes a new CategoryIndex.
|
27
|
-
#
|
28
|
-
# +base+ is the String path to the <source>.
|
29
|
-
# +category_dir+ is the String path between <source> and the category folder.
|
30
|
-
# +category+ is the category currently being processed.
|
31
|
-
def initialize(site, base, category_dir, category)
|
32
|
-
@site = site
|
33
|
-
@base = base
|
34
|
-
@dir = category_dir
|
35
|
-
@name = 'index.html'
|
36
|
-
@config = Octopress::Ink::Plugins.config['theme']['category']
|
37
|
-
self.process(@name)
|
38
|
-
|
39
|
-
layout = @site.layouts['theme:category-index']
|
40
|
-
self.content = layout.content
|
41
|
-
self.data = layout.data
|
42
|
-
self.data['category'] = category
|
43
|
-
# Set the title for this page.
|
44
|
-
self.data['title'] = "#{@config['title']}: #{category}"
|
45
|
-
# Set the meta-description for this page.
|
46
|
-
self.data['description'] = "#{@config['title']}: #{category}"
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
# The CategoryFeed class creates an Atom feed for the specified category.
|
52
|
-
class CategoryFeed < CategoryIndex
|
53
|
-
|
54
|
-
# Initializes a new CategoryFeed.
|
55
|
-
#
|
56
|
-
# +base+ is the String path to the <source>.
|
57
|
-
# +category_dir+ is the String path between <source> and the category folder.
|
58
|
-
# +category+ is the category currently being processed.
|
59
|
-
def initialize(site, base, category_dir, category)
|
60
|
-
super
|
61
|
-
@name = 'index.xml'
|
62
|
-
self.process(@name)
|
63
|
-
layout = @site.layouts['theme:category-feed']
|
64
|
-
self.content = layout.content
|
65
|
-
self.data = layout.data
|
66
|
-
self.data['category'] = category
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|
70
|
-
|
71
|
-
# The Site class is a built-in Jekyll class with access to global site config information.
|
72
|
-
class Site
|
73
|
-
|
74
|
-
# Creates an instance of CategoryIndex for each category page, renders it, and
|
75
|
-
# writes the output to a file.
|
76
|
-
#
|
77
|
-
# +category_dir+ is the String path to the category folder.
|
78
|
-
# +category+ is the category currently being processed.
|
79
|
-
def write_category_index(category_dir, category)
|
80
|
-
index = CategoryIndex.new(self, self.source, category_dir, category)
|
81
|
-
index.render(self.layouts, site_payload)
|
82
|
-
index.write(self.dest)
|
83
|
-
# Record the fact that this page has been added, otherwise Site::cleanup will remove it.
|
84
|
-
self.pages << index
|
85
|
-
|
86
|
-
end
|
87
|
-
|
88
|
-
# write
|
89
|
-
def write_category_feed(category_dir, category)
|
90
|
-
# Create an Atom-feed for each index.
|
91
|
-
feed = CategoryFeed.new(self, self.source, File.join(category_dir,'feed'), category)
|
92
|
-
feed.render(self.layouts, site_payload)
|
93
|
-
feed.write(self.dest)
|
94
|
-
# Record the fact that this page has been added, otherwise Site::cleanup will remove it.
|
95
|
-
self.pages << feed
|
96
|
-
end
|
97
|
-
|
98
|
-
# Loops through the list of category pages and processes each one.
|
99
|
-
def write_category_indexes
|
100
|
-
if self.layouts.key? 'theme:category-index'
|
101
|
-
config = Octopress::Ink::Plugins.config['theme']['category']
|
102
|
-
slug = config['dir']
|
103
|
-
feeds = config['feeds']
|
104
|
-
self.categories.keys.each do |category|
|
105
|
-
self.write_category_index(File.join(slug, category), category) if slug
|
106
|
-
self.write_category_feed(File.join(slug, category), category) if feeds && feeds.include?(category)
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
111
|
-
|
112
|
-
end
|
113
|
-
|
114
|
-
|
115
|
-
# Jekyll hook - the generate method is called by jekyll, and generates all of the category pages.
|
116
|
-
class GenerateCategories < Generator
|
117
|
-
safe true
|
118
|
-
priority :low
|
119
|
-
|
120
|
-
def generate(site)
|
121
|
-
site.write_category_indexes
|
122
|
-
end
|
123
|
-
|
124
|
-
end
|
125
|
-
|
126
|
-
|
127
|
-
# Adds some extra filters used during the category creation process.
|
128
|
-
module Filters
|
129
|
-
|
130
|
-
# Outputs a list of categories as comma-separated <a> links. This is used
|
131
|
-
# to output the category list for each post on a category page.
|
132
|
-
#
|
133
|
-
# +categories+ is the list of categories to format.
|
134
|
-
#
|
135
|
-
# Returns string
|
136
|
-
#
|
137
|
-
def category_links(categories)
|
138
|
-
categories = categories.sort!.map { |c| category_link c }
|
139
|
-
|
140
|
-
case categories.length
|
141
|
-
when 0
|
142
|
-
""
|
143
|
-
when 1
|
144
|
-
categories[0].to_s
|
145
|
-
else
|
146
|
-
"#{categories[0...-1].join(', ')}, #{categories[-1]}"
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
# Outputs a single category as an <a> link.
|
151
|
-
#
|
152
|
-
# +category+ is a category string to format as an <a> link
|
153
|
-
#
|
154
|
-
# Returns string
|
155
|
-
#
|
156
|
-
def category_link(category)
|
157
|
-
dir = @context.registers[:site].config['category_dir']
|
158
|
-
# TODO: URLize categories
|
159
|
-
slug = File.join('/',
|
160
|
-
Octopress::Ink::Plugins.config['theme']['category']['dir'],
|
161
|
-
sluggify(category))
|
162
|
-
"<a class='category' href='#{slug}/'>#{category}</a>"
|
163
|
-
end
|
164
|
-
|
165
|
-
# returns a string which is ready for urlizing.
|
166
|
-
def sluggify(input)
|
167
|
-
value = input.gsub(/[^\x00-\x7F]/u, '')
|
168
|
-
value.gsub!(/[']+/, '')
|
169
|
-
value.gsub!(/\W+/, ' ')
|
170
|
-
value.strip!
|
171
|
-
value.downcase!
|
172
|
-
value.gsub!(' ', '-')
|
173
|
-
value
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
|
-
end
|
data/lib/octopress-genesis.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'octopress-ink'
|
2
|
-
require 'octopress-linkblog'
|
3
|
-
require 'octopress-autoprefixer'
|
4
|
-
require 'octopress-date-format'
|
5
|
-
require 'octopress-comment-tag'
|
6
|
-
require 'octopress-wrap-tag'
|
7
|
-
require 'octopress-abort-tag'
|
8
|
-
require 'octopress-assign-tag'
|
9
|
-
require 'octopress-return-tag'
|
10
|
-
require 'octopress-include-tag'
|
11
|
-
require 'octopress-content-for'
|
12
|
-
require 'octopress-filter-tag'
|
13
|
-
|
14
|
-
require 'octopress-genesis/version'
|
15
|
-
require 'octopress-genesis/category-generator'
|
16
|
-
|
17
|
-
Octopress::Ink.add_plugin({
|
18
|
-
name: "Octopress Genesis",
|
19
|
-
slug: "theme",
|
20
|
-
assets_path: File.expand_path(File.join(File.dirname(__FILE__), "../assets")),
|
21
|
-
type: "theme",
|
22
|
-
version: Octopress::Genesis::VERSION,
|
23
|
-
description: "",
|
24
|
-
website: ""
|
25
|
-
})
|
26
|
-
|
27
|
-
|
data/octopress-genesis.gemspec
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'octopress-genesis/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "octopress-genesis-theme"
|
8
|
-
spec.version = Octopress::Genesis::VERSION
|
9
|
-
spec.authors = ["Brandon Mathis"]
|
10
|
-
spec.email = ["brandon@imathis.com"]
|
11
|
-
spec.summary = %q{A Jekyll theme built on Octopress Ink}
|
12
|
-
spec.description = %q{A Jekyll theme built on Octopress Ink}
|
13
|
-
spec.homepage = ""
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_runtime_dependency "octopress-ink"
|
22
|
-
spec.add_runtime_dependency "octopress-linkblog", "~> 1.0"
|
23
|
-
spec.add_runtime_dependency "octopress-date-format", "~> 2.0"
|
24
|
-
spec.add_runtime_dependency "octopress-autoprefixer", "~> 1.0"
|
25
|
-
spec.add_runtime_dependency "octopress-wrap-tag", "~> 1.0"
|
26
|
-
spec.add_runtime_dependency "octopress-abort-tag", "~> 1.0"
|
27
|
-
spec.add_runtime_dependency "octopress-assign-tag", "~> 1.0"
|
28
|
-
spec.add_runtime_dependency "octopress-filter-tag", "~> 1.0"
|
29
|
-
spec.add_runtime_dependency "octopress-comment-tag", "~> 1.0"
|
30
|
-
spec.add_runtime_dependency "octopress-return-tag", "~> 1.0"
|
31
|
-
spec.add_runtime_dependency "octopress-content-for", "~> 1.0"
|
32
|
-
|
33
|
-
spec.add_development_dependency "bundler", "~> 1.6"
|
34
|
-
spec.add_development_dependency "rake"
|
35
|
-
spec.add_development_dependency "octopress"
|
36
|
-
spec.add_development_dependency "clash"
|
37
|
-
spec.add_development_dependency "pry-byebug"
|
38
|
-
end
|