diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-11-24 13:53:51 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-11-24 13:53:51 -0500 |
commit | ac109a11976014d876b5ea920c4c7ba8034683fa (patch) | |
tree | 68e17f939a52b17ca4d0f22335ef5b144733202a /pagerender.rb | |
parent | 1d994a5bb9b08a988bd5fd834a72dfc01e659875 (diff) |
do proper breadcrumbs
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)); |