2021-02-19 23:33:19 +08:00
|
|
|
<% if (page.layout == 'wiki') { %>
|
|
|
|
<% site.pages.filter(function (p) { %>
|
|
|
|
<% return p.layout == 'index' && p.title && p.wiki && p.wiki.includes(page.wiki) %>
|
|
|
|
<% }).limit(1).each(function(current_group) { %>
|
|
|
|
<% if (current_group.wiki.length > 1) { %>
|
|
|
|
<div class='widget-wrap' id='related'>
|
2021-03-05 21:37:28 +08:00
|
|
|
<div class='widget-header h4 dis-select'>
|
2021-02-19 23:33:19 +08:00
|
|
|
<span class='name'>更多<%- current_group.title %></span>
|
|
|
|
</div>
|
2021-03-05 21:37:28 +08:00
|
|
|
<div class='widget-body fs14'>
|
2021-02-19 23:33:19 +08:00
|
|
|
<% current_group.wiki.forEach((wiki, i) => { %>
|
|
|
|
<% site.pages.filter(function (p) { %>
|
|
|
|
<% return p.wiki == wiki && p.wiki != page.wiki && p.description %>
|
|
|
|
<% }).each(function(post) { %>
|
|
|
|
<% if (post.wiki || post.title) { %>
|
|
|
|
<div class='post-title'>
|
|
|
|
<a href="<%= url_for(post.link || post.path) %>">
|
|
|
|
<%- post.wiki || post.title %>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
<% }); %>
|
|
|
|
<% }); %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
<% }); %>
|
|
|
|
<% } %>
|