File tree 4 files changed +44
-5
lines changed
4 files changed +44
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- layout: default
2
+ layout: layout
3
3
---
4
4
< div class ="entry-container ">
5
5
< div class ='entry '>
Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ require "rack/rewrite"
4
4
5
5
use Rack ::Static , :urls => [ "/css" , "/img" , "/js" ]
6
6
use 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
+ }
8
14
end
9
15
10
16
run 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 ">
2
24
< div class ='entry '>
3
25
< h1 > Idea 1: Cupcake ipsum dolor sit amet marshmallow. </ h1 >
4
26
< span class ="postdate "> 14 December, 2011
@@ -34,4 +56,9 @@ <h1> Idea 1: Cupcake ipsum dolor sit amet marshmallow. </h1>
34
56
} ) ( ) ;
35
57
</ script >
36
58
< 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"
4
4
5
5
use Rack ::Static , :urls => [ "/css" , "/img" , "/js" ]
6
6
use 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
+ }
8
14
end
9
15
10
16
run Rack ::Jekyll . new
You can’t perform that action at this time.
0 commit comments