summaryrefslogtreecommitdiff
path: root/pagerender.rb
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-11-24 13:53:51 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-11-24 13:53:51 -0500
commitac109a11976014d876b5ea920c4c7ba8034683fa (patch)
tree68e17f939a52b17ca4d0f22335ef5b144733202a /pagerender.rb
parent1d994a5bb9b08a988bd5fd834a72dfc01e659875 (diff)
do proper breadcrumbs
Diffstat (limited to 'pagerender.rb')
-rwxr-xr-xpagerender.rb7
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));