diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-13 14:06:35 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-13 14:06:35 -0400 |
commit | 27cde747eb3f46ca44bde0ba727a0b644bce91ef (patch) | |
tree | 14eeb58e4c6d08af8a7c9e7c6a7e88d11a9572c1 | |
parent | c27cee0d9cd91237bb28bb4a579cccbfe6b01af6 (diff) |
index.rb: actually, don't run the titles through rdiscount
-rwxr-xr-x | index.rb | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,6 +1,5 @@ #!/usr/bin/env ruby # -*- coding: utf-8 -*- -require 'rdiscount' require 'erb' @title = "Web log entries" @@ -11,8 +10,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; - slug = filename.sub(/^public\//,'').sub(/\.md$/,''); + title = File.read(filename).split("\n",2).first + slug = filename.sub(/^public\//,'').sub(/\.md$/,'') @content += "<li><tt><a href='./#{slug}.html'>#{slug}</a></tt> — #{title}</a></li>\n" end @content += "</ul>\n" |