diff options
Diffstat (limited to 'pagerender.rb')
-rwxr-xr-x | pagerender.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pagerender.rb b/pagerender.rb index d63bcad..3edaaaf 100755 --- a/pagerender.rb +++ b/pagerender.rb @@ -31,6 +31,13 @@ unless author_urls[@author].nil? @author="<a href=\"#{author_urls[@author]}\">#{@author}</a>" end +@breadcrumbs = '<a href="/">Luke Shumaker</a> » ' +if (infile =~ /.*\/index(\..*)?/) + @breadcrumbs += "blog" +else + @breadcrumbs += '<a href=/blog>blog</a> » ' + infile.sub(/\..*$/,'').sub(/^.*\//,'') +end + @content = doc.to('html5') erb = ERB.new(File.read(template)); |