File tree Expand file tree Collapse file tree 4 files changed +44
-5
lines changed
Expand file tree Collapse file tree 4 files changed +44
-5
lines changed Original file line number Diff line number Diff line change 11---
2- layout: default
2+ layout: layout
33---
44< div class ="entry-container ">
55 < div class ='entry '>
Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ require "rack/rewrite"
44
55use Rack ::Static , :urls => [ "/css" , "/img" , "/js" ]
66use Rack ::Rewrite do
7- #rewrite %r{/(.*)}, '/$1.html', :if => lambda { File.exists?('/$1.html')}
7+ rewrite %r{/(.+)} , lambda { |match , rack_env |
8+ if File . exists? ( '_site/' + match [ 1 ] + '.html' )
9+ return '/' + match [ 1 ] + '.html'
10+ else
11+ return '/' + match [ 1 ]
12+ end
13+ }
814end
915
1016run Rack ::Jekyll . new
Original file line number Diff line number Diff line change 1- < div class ="entry-container ">
1+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+ < html xmlns ="http://www.w3.org/1999/xhtml ">
3+ < head >
4+ < meta content ="en-au " http-equiv ="Content-Language " />
5+ < meta content ="text/html; charset=utf-8 " http-equiv ="Content-Type " />
6+ < title > Code52</ title >
7+ < link rel ="stylesheet " type ="text/css " href ="/css/style.css " />
8+ </ head >
9+ < body >
10+ < div id ="container ">
11+ < div id ="side ">
12+ code
13+ < h1 > 52</ h1 >
14+ < h2 > a new coding project every week</ h2 >
15+
16+ < ul >
17+ < li > < a href ="# "> about</ a > </ li >
18+ < li > < a href ="# "> submit an idea</ a > </ li >
19+ < li > < a href ="# "> past ideas</ a > </ li >
20+ </ ul >
21+ </ div >
22+ < div id ="content ">
23+ < div class ="entry-container ">
224 < div class ='entry '>
325 < h1 > Idea 1: Cupcake ipsum dolor sit amet marshmallow. </ h1 >
426 < span class ="postdate "> 14 December, 2011
@@ -34,4 +56,9 @@ <h1> Idea 1: Cupcake ipsum dolor sit amet marshmallow. </h1>
3456 } ) ( ) ;
3557</ script >
3658< noscript > Please enable JavaScript to view the < a href ="http://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
37- < a href ="http://disqus.com " class ="dsq-brlink "> blog comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
59+ < a href ="http://disqus.com " class ="dsq-brlink "> blog comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
60+ </ div >
61+
62+ </ div >
63+ </ body >
64+ </ html >
Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ require "rack/rewrite"
44
55use Rack ::Static , :urls => [ "/css" , "/img" , "/js" ]
66use Rack ::Rewrite do
7- #rewrite %r{/(.*)}, '/$1.html', :if => lambda { File.exists?('/$1.html')}
7+ rewrite %r{/(.+)} , lambda { |match , rack_env |
8+ if File . exists? ( '_site/' + match [ 1 ] + '.html' )
9+ return '/' + match [ 1 ] + '.html'
10+ else
11+ return '/' + match [ 1 ]
12+ end
13+ }
814end
915
1016run Rack ::Jekyll . new
You can’t perform that action at this time.
0 commit comments