|
|
|
@ -44,10 +44,10 @@ index = Base |
|
|
|
|
Dir.entries("articles").select{ |i| i != "." && i != ".." }.each do |article| |
|
|
|
|
if article[article.size-3, article.size] == ".md" |
|
|
|
|
File.write Path.new("dist", article[0,article.size-3]+".html"), render_file("articles/"+article) |
|
|
|
|
index += "<h4><a href=\"/"+article[0,article.size-3]+"\"/>"+article[0,article.size-3]+"</a></h4>\n" |
|
|
|
|
index += "<h3><a href=\"/"+article[0,article.size-3]+".html\"/>"+article[0,article.size-3].gsub("-", " ")+"</a></h3>\n" |
|
|
|
|
else |
|
|
|
|
File.write Path.new("dist", article+".html"), render_file("articles/"+article) |
|
|
|
|
index += "<h4><a href=\"/"+article+"\"/>"+article+"</a></h4>\n" |
|
|
|
|
index += "<h3><a href=\"/"+article+".html\"/>"+article.gsub("-", " ")+"</a></h3>\n" |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
File.write Path["dist/index.html"], index+"</body></html>" |
|
|
|
|