fix up file uris/uri path code

This commit is contained in:
Kyle Drake 2024-09-15 14:18:35 -05:00
parent 1794a4bcba
commit dee9128cb3
4 changed files with 23 additions and 13 deletions

View file

@ -98,7 +98,7 @@
<% if file[:is_directory] %>
<a class="link-overlay" href="?dir=<%= Rack::Utils.escape file[:path] %>" title="View <%= file[:path] %>"></a>
<% else %>
<a class="link-overlay" href="<%= current_site.file_uri Rack::Utils.escape(file[:path]) %>" title="View <%= file[:path] == '/index.html' ? 'your site index' : file[:path] %>" target="_blank"></a>
<a class="link-overlay" href="<%= file[:uri] %>" title="View <%= file[:path] %>" target="_blank"></a>
<% end %>
</div>
</div>