summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 20:39:21 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 20:39:21 -0400
commit9222fdb099baac765dd5b8c6c5384c8f6e4e6aca (patch)
tree4025b538228196c085eda546f47e2e76c5235060
parent8336854c3f5fce52980796b2f5f0a8e35f20224c (diff)
don't stick ./ before the user-visible slug
-rwxr-xr-xindex.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.rb b/index.rb
index 4c836f2..7237e5f 100755
--- a/index.rb
+++ b/index.rb
@@ -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"