diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-12 20:39:21 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-12 20:39:21 -0400 |
commit | 9222fdb099baac765dd5b8c6c5384c8f6e4e6aca (patch) | |
tree | 4025b538228196c085eda546f47e2e76c5235060 | |
parent | 8336854c3f5fce52980796b2f5f0a8e35f20224c (diff) |
don't stick ./ before the user-visible slug
-rwxr-xr-x | index.rb | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -11,8 +11,8 @@ license_url = 'https://creativecommons.org/licenses/by-sa/3.0/' @content = "<h1>#{@title}</h1>\n<ul>\n" for filename in ARGV do title = RDiscount.new(File.read(filename).split("\n",2).first).to_html; - url=filename.sub(/^public\//,'./').sub(/\.md$/,''); - @content += "<li><tt><a href='#{url}.html'>#{url}</a></tt> — #{title}</a></li>\n" + slug = filename.sub(/^public\//,'').sub(/\.md$/,''); + @content += "<li><tt><a href='./#{slug}.html'>#{slug}</a></tt> — #{title}</a></li>\n" end @content += "</ul>\n" |