Skip to content
This repository
Browse code

Revert "URL TLC"

This reverts commit d98cbe2.
  • Loading branch information...
commit b66e22ee225cab4e3c10f3c9d20cdc6a739e1d48 1 parent d98cbe2
Stefan Penner authored March 13, 2013
20  config.rb
@@ -27,23 +27,7 @@
27 27
 activate :blog do |blog|
28 28
   blog.prefix = 'blog'
29 29
   blog.layout = 'layouts/blog'
30  
-  blog.tag_template = 'blog/tag'
31  
-  blog.permalink = '/:year/:month/:day/:title'
32  
-  blog.taglink = 'tags/:tag'
33  
-end
34  
-
35  
-ready do
36  
-  blog.articles.each do |article|
37  
-    options = {
38  
-      locals: {
39  
-        redirect_to: article.url
40  
-      },
41  
-      layout: false,
42  
-      ignore: true
43  
-    }
44  
-
45  
-    proxy article.path + '.html', 'redirect.html', options
46  
-  end
  30
+  blog.tag_template = 'blog/tag.html'
47 31
 end
48 32
 
49 33
 page '/blog/feed.xml', layout: false
@@ -91,7 +75,7 @@ def rendered_partial_for(key)
91 75
 
92 76
   def link_to_page name, url
93 77
     path = request.path
94  
-    current = path =~ Regexp.new('^' + url[1..-1])
  78
+    current = path =~ Regexp.new('^' + url[1..-1] + '.*\.html')
95 79
 
96 80
     if path == 'index.html' and name == 'about'
97 81
       current = true
2  lib/api_docs.rb
@@ -11,7 +11,7 @@ def registered(app, options={})
11 11
 
12 12
       @repo_url = options[:repo_url]
13 13
 
14  
-      app.ready do
  14
+      app.after_configuration do
15 15
         ApiClass.data = data.api
16 16
 
17 17
         page '/api*', directory_index: false, layout: 'layouts/api'
0  source/blog/2012-08-03-ember-1-0-prerelease.markdown → ...log/2012-08-03-ember-1-0-prerelease.html.markdown
Source Rendered
File renamed without changes
0  source/blog/2012-10-25-ember-1-0-pre2.markdown → source/blog/2012-10-25-ember-1-0-pre2.html.markdown
Source Rendered
File renamed without changes
0  source/blog/2013-02-15-ember-1-0-rc.markdown → source/blog/2013-02-15-ember-1-0-rc.html.markdown
Source Rendered
File renamed without changes
0  source/blog/post.html.erb → source/blog/_post.html.erb
File renamed without changes
12  source/blog/index.html.erb
@@ -5,10 +5,10 @@ title: "Blog"
5 5
 <% partial_for :head, 'head' %>
6 6
 <% partial_for :sidebar, 'sidebar' %>
7 7
 
8  
-<% blog.articles.reject(&:proxied_to).each_with_index do |article, i| %>
9  
-<article class="blog-post-summary">
10  
-  <h2><%= link_to article.title, article %> &ndash; <time><%= article.date.strftime('%b %d, %Y') %></time></span></h2>
11  
-  <%= article.summary %>
12  
-  <%= link_to "Read more...", article %>
13  
-</article>
  8
+<% blog.articles.each_with_index do |article, i| %>
  9
+  <article class="blog-post-summary">
  10
+    <h2><%= link_to article.title, article %> &ndash; <time><%= article.date.strftime('%b %d, %Y') %></time></span></h2>
  11
+    <%= article.summary %>
  12
+    <%= link_to "Read more...", article %>
  13
+  </article>
14 14
 <% end %>
1  source/examples/index.html
... ...
@@ -1,4 +1,3 @@
1  
-<!DOCTYPE html>
2 1
 <html>
3 2
   <head>
4 3
     <meta http-equiv="Refresh" content="0; url=/" />
8  source/redirect.html.erb
... ...
@@ -1,8 +0,0 @@
1  
-<!DOCTYPE html>
2  
-<html>
3  
-<head>
4  
-  <meta http-equiv="Refresh" content="0; url=<%= redirect_to %>" />
5  
-  </head>
6  
-  <body>
7  
-  </body>
8  
-</html>

1 note on commit b66e22e

Stefan Penner
Owner

#FML

Please sign in to comment.
Something went wrong with that request. Please try again.