You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
869 B
Plaintext
18 lines
869 B
Plaintext
<% contents = Dir.children("." + request.path_info)%>
|
|
<% contents.each do |content| %>
|
|
<% if content.end_with?(".erb") %>
|
|
<% file = content %>
|
|
<% if File.exists?("." + request.path_info + "/" + file + ".meta") %>
|
|
<%= erb :blogpageERB, locals: {file: "." + request.path_info + "/" + content, meta: "." + request.path_info + "/" + file + ".meta"} %>
|
|
<% else %>
|
|
<%= erb :blogpageERB, locals: {file: "." + request.path_info + "/" + content} %>
|
|
<% end %>
|
|
<% elsif content.end_with?(".md") %>
|
|
<% file = content %>
|
|
<% if File.exists?("." + request.path_info + "/" + file + ".meta") %>
|
|
<%= erb :blogpageMD, locals: {file: "." + request.path_info + "/" + content, meta: "." + request.path_info + "/" + file + ".meta"} %>
|
|
<% else %>
|
|
<%= erb :blogpageMD, locals: {file: "." + request.path_info + "/" + content} %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %> |