hexo-theme-stellar/layout/post.ejs

40 lines
1.1 KiB
Plaintext
Executable File

<%
if (page.menu_id == undefined) {
page.menu_id = 'post';
}
if (page.header == undefined) {
page.header = 'auto';
}
function layoutTitle() {
const title = page.h1 || page.title;
if (title && title.length > 0) {
return '<h1 class="article-title"><span>' + title + '</span></h1>';
} else {
return '';
}
}
let post = page;
let heti = '';
if (theme.plugins.heti && theme.plugins.heti.enable) {
heti = ' heti';
}
%>
<% if (page.mathjax == true){ %>
<%- partial('mathjax') %>
<% } %>
<% if (page.mermaid == true){ %>
<%- partial('mermaid') %>
<% } %>
<%- partial('_partial/main/navbar/breadcrumb') %>
<article class='md-text content<%- heti %> <%- post.layout %><%- post.indent ? ' indent' : '' %><%- scrollreveal() %>'>
<%- layoutTitle() %>
<%- post.content %>
<% if (theme.plugins.tianli_gpt.enable && ['all', 'post'].includes(theme.plugins.tianli_gpt.field)) { %>
<%- partial('_partial/plugins/ai/tianli_gpt') %>
<% } %>
<%- partial('_partial/main/article/article_footer') %>
</article>
<%- partial('_partial/main/article/read_next') %>
<%- partial('_partial/main/article/related_posts') %>
<%- partial('_partial/plugins/comments/layout') %>