Skip to content

Commit

Permalink
update middleman article generator
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdave committed Feb 25, 2015
1 parent 7823324 commit 4f29ca9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
15 changes: 5 additions & 10 deletions config.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
###
# Blog settings
###

# Time.zone = 'UTC'
require 'addressable/template'

activate :blog do |blog|
# This will add a prefix to all links, template references and source paths
# blog.prefix = 'blog'

blog.permalink = '{year}/{month}/{slug}'
blog.sources = 'posts/{year}/{title}'
blog.sources = 'posts/{year}/{year}-{month}-{day}-{title}'
# blog.source_template = Addressable::Template.new('posts/{year}/{year}-{month}-{day}-{title}')
# blog.taglink = 'tags/{tag}.html'
blog.layout = 'post'
blog.summary_separator = '<!-- more -->'
Expand All @@ -19,7 +13,8 @@
# blog.day_link = '{year}/{month}/{day}.html'
blog.default_extension = '.md'

blog.tag_template = 'tag.html'
blog.new_article_template = 'templates/article.tt'
# blog.tag_template = 'tag.html'
# blog.calendar_template = 'calendar.html'

# Enable pagination
Expand Down
7 changes: 7 additions & 0 deletions templates/article.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: <%= @title %>
slug: <%= @slug %>
date: <%= @date.strftime('%Y-%m-%d %H:%M:%S %z') %>
tags:
published: false
---

0 comments on commit 4f29ca9

Please sign in to comment.