fix breadcrumb

This commit is contained in:
xaoxuu 2021-02-22 14:31:49 +08:00
parent c8fa05f5cb
commit 4c4ce9a547
1 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,11 @@
<div>
<a class='cap breadcrumb' href='/'><%- __('btn.home') %></a>
<span class="sep"></span>
<a class='cap breadcrumb' href='/wiki/'><%- __('btn.wiki') %></a>
<% if (page.menu_id && theme.sidebar.menu[page.menu_id] && theme.sidebar.menu[page.menu_id].url) { %>
<a class='cap breadcrumb' href='<%- url_for(theme.sidebar.menu[page.menu_id].url) %>'><%- __(theme.sidebar.menu[page.menu_id].title) %></a>
<% } else { %>
<a class='cap breadcrumb' href='/wiki/'><%- __('btn.wiki') %></a>
<% } %>
<% site.pages.filter(function (p) { %>
<% return p.layout == 'index' && p.title && p.wiki && p.wiki.includes(page.wiki) %>
<% }).limit(1).each(function(p) { %>