Permalink
Browse files

Revert "URL TLC"

This reverts commit d98cbe2.
  • Loading branch information...
stefanpenner committed Mar 14, 2013
1 parent d98cbe2 commit b66e22ee225cab4e3c10f3c9d20cdc6a739e1d48
View
@@ -27,23 +27,7 @@
activate :blog do |blog|
blog.prefix = 'blog'
blog.layout = 'layouts/blog'
- blog.tag_template = 'blog/tag'
- blog.permalink = '/:year/:month/:day/:title'
- blog.taglink = 'tags/:tag'
-end
-
-ready do
- blog.articles.each do |article|
- options = {
- locals: {
- redirect_to: article.url
- },
- layout: false,
- ignore: true
- }
-
- proxy article.path + '.html', 'redirect.html', options
- end
+ blog.tag_template = 'blog/tag.html'
end
page '/blog/feed.xml', layout: false
@@ -91,7 +75,7 @@ def rendered_partial_for(key)
def link_to_page name, url
path = request.path
- current = path =~ Regexp.new('^' + url[1..-1])
+ current = path =~ Regexp.new('^' + url[1..-1] + '.*\.html')
if path == 'index.html' and name == 'about'
current = true
View
@@ -11,7 +11,7 @@ def registered(app, options={})
@repo_url = options[:repo_url]
- app.ready do
+ app.after_configuration do
ApiClass.data = data.api
page '/api*', directory_index: false, layout: 'layouts/api'
File renamed without changes.
View
@@ -5,10 +5,10 @@ title: "Blog"
<% partial_for :head, 'head' %>
<% partial_for :sidebar, 'sidebar' %>
-<% blog.articles.reject(&:proxied_to).each_with_index do |article, i| %>
-<article class="blog-post-summary">
- <h2><%= link_to article.title, article %> &ndash; <time><%= article.date.strftime('%b %d, %Y') %></time></span></h2>
- <%= article.summary %>
- <%= link_to "Read more...", article %>
-</article>
+<% blog.articles.each_with_index do |article, i| %>
+ <article class="blog-post-summary">
+ <h2><%= link_to article.title, article %> &ndash; <time><%= article.date.strftime('%b %d, %Y') %></time></span></h2>
+ <%= article.summary %>
+ <%= link_to "Read more...", article %>
+ </article>
<% end %>
@@ -1,4 +1,3 @@
-<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Refresh" content="0; url=/" />
View
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Refresh" content="0; url=<%= redirect_to %>" />
- </head>
- <body>
- </body>
-</html>

1 comment on commit b66e22e

Owner

stefanpenner commented on b66e22e Mar 14, 2013

FML

Please sign in to comment.