+
+
+
+
+ {% include category_list.html category=page.data['category'] limit=0 %}
+
+
+
diff --git a/_plugins/auto_categories.rb b/_plugins/auto_categories.rb
deleted file mode 100644
index bdff537..0000000
--- a/_plugins/auto_categories.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# Very simple plugin that adds a subdirectory under _posts as a category
-
-def get_category_from_subdir(path)
- path.sub(/^.*_posts\/(.*?)\/.*$/, "\\1")
-end
-
-Jekyll::Hooks.register :posts, :pre_render do |post, payload|
- post.data['categories'] << get_category_from_subdir(post.path)
-end
diff --git a/_plugins/category_page.rb b/_plugins/category_page.rb
new file mode 100644
index 0000000..2bf5359
--- /dev/null
+++ b/_plugins/category_page.rb
@@ -0,0 +1,30 @@
+class CategoryPage < Jekyll::Page
+ def initialize(site, base, dir, category)
+ @site = site
+ @base = base
+ @dir = dir
+ @name = 'index.html'
+
+ self.process(@name)
+ self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
+ self.data['category'] = category
+
+ category_title = site.config['category_titles'][category] || category.capitalize
+ self.data['title'] = "#{category_title}"
+ end
+end
+
+class CategoryPageGenerator < Jekyll::Generator
+ safe true
+
+ def generate(site)
+ if !site.layouts.key? 'category_index'
+ return
+ end
+
+ site.categories.each_key do |category|
+ site.pages << CategoryPage.new(site, site.source, category, category)
+ end
+ end
+
+end
diff --git a/_sass/_columns.scss b/_sass/_columns.scss
new file mode 100644
index 0000000..da1893d
--- /dev/null
+++ b/_sass/_columns.scss
@@ -0,0 +1,25 @@
+/* For dynamically determined columnar formatting.
+ Currently supports equal-width, 1-4 column layouts.
+*/
+
+* {
+ box-sizing: border-box;
+}
+
+.column {
+ float: left;
+ padding-right: 5px;
+}
+
+.col-1 {
+ width: 100%;
+}
+.col-2 {
+ width: 50%;
+}
+.col-3 {
+ width: 33%;
+}
+.col-4 {
+ width: 25%;
+}
diff --git a/index.html b/index.html
index 7853ea2..7bdb407 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@ layout: default
{% for category in site.categories %}
{% if category.first == "meta" %} {% continue %} {% endif %}
- {% include category_list.html category=category.first %}
+ {% include category_list.html category=category.first limit=5 %}
{% endfor %}