fix missing title on post pages, tweak style

This commit is contained in:
Sami Samhuri 2010-12-06 20:32:08 -08:00
parent 92c4af2b1e
commit 24caa3e470
6 changed files with 8 additions and 7 deletions

View file

@ -119,7 +119,7 @@ footer { text-align: center
; margin: 0
; padding: 1em
; background-color: #a6bcdf
; border-top: solid 1px #222
; border-top: solid 1px #666
; clear: both
}

View file

@ -23,7 +23,7 @@ posts = Posts['published'].map do |filename|
line = lines.shift.strip
m = line.match(/(\w+):/)
if m && param = m[1].downcase
post[param] = line.sub(Regexp.new('^' + param + ':\s*', 'i'), '').strip
post[param.to_sym] = line.sub(Regexp.new('^' + param + ':\s*', 'i'), '').strip
elsif line.match(/^----\s*$/)
lines.shift while lines.first.strip.empty?
break
@ -37,7 +37,8 @@ posts = Posts['published'].map do |filename|
end
posts.each_with_index do |post, i|
post[:html] = Mustache.render(template, { :post => post,
post[:html] = Mustache.render(template, { :title => post[:title],
:post => post,
:previous => i < posts.length - 1 && posts[i + 1],
:next => i > 0 && posts[i - 1]
})

View file

@ -1,7 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<meta name=viewport content=width=device-width>
<title> :: samhuri.net</title>
<title>37signals' Chalk Dissected :: samhuri.net</title>
<link rel=stylesheet href=../assets/blog.css>
<script>
var _gaq = _gaq || [];

View file

@ -1,7 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<meta name=viewport content=width=device-width>
<title> :: samhuri.net</title>
<title>A preview of Mach-O file generation :: samhuri.net</title>
<link rel=stylesheet href=../assets/blog.css>
<script>
var _gaq = _gaq || [];

View file

@ -1,7 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<meta name=viewport content=width=device-width>
<title> :: samhuri.net</title>
<title>Basics of the Mach-O file format :: samhuri.net</title>
<link rel=stylesheet href=../assets/blog.css>
<script>
var _gaq = _gaq || [];

View file

@ -1,7 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<meta name=viewport content=width=device-width>
<title> :: samhuri.net</title>
<title>Working with C-style structs in Ruby :: samhuri.net</title>
<link rel=stylesheet href=../assets/blog.css>
<script>
var _gaq = _gaq || [];