# index2 generator related configuration index2_include_index:false# suggested false
# the custom index2 generator, can be array or object index2_generator: -layout:'index'# use existing index layout path:''# default path per_page:10 order_by:-date index:true# home page layout or not exclude: -categoryessays
-layout:'index'# use existing index layout path:'essays'# your-website/essays index:false per_page:10 order_by:-date include: -categoryessays
<!-- 除去随笔页面中的翻页功能,但该方法治标不治本,不应采用 --> <!-- file: blog-root-path/themes/volantis/layout/_partial/article.ejs --> <% <!-- line: about 150, not modified --> <!-- ... --> <!-- for essays begin --> let contains_essays = false; if (post.categories && post.categories.length){ for(cat of post.categories.toArray()) { if(cat.name == 'essays') { contains_essays = true; break; } } } <!-- for essays end --> if (['docs'].includes(post.layout) && (prev || next) && (!contains_essays)) { %> <divclass="prev-next"> <% if (prev.path) { %> <aclass='prev'href='<%- url_for(prev.path) %>'> <pclass='title'><iclass="fa-solid fa-chevron-left"aria-hidden="true"></i><%- prev.title || '' %></p> <!--<p class='content'><%- prev.exp %></p>--> </a> <% } %> <% if (next.path) { %> <aclass='next'href='<%- url_for(next.path) %>'> <pclass='title'><%- next.title || '' %><iclass="fa-solid fa-chevron-right"aria-hidden="true"></i></p> <!--<p class='content'><%- next.exp %></p>--> </a> <% } %> </div> <% } %>
<% } %>
<% <!-- for essays begin --> let contains_essays = false; if (post.categories && post.categories.length){ for(cat of post.categories.toArray()) { if(cat.name == 'essays') { contains_essays = true; break; } } } <!-- for essays end --> if ((post.prev || post.next) && (!contains_essays)) { %> <!-- not modified line --> <!-- ... -->