delete old file

This commit is contained in:
xaoxuu 2021-07-31 21:16:45 +08:00
parent 48edbf2497
commit 96e4a6d7ba
1 changed files with 0 additions and 48 deletions

View File

@ -1,48 +0,0 @@
/**
* doc_tree(page, {toc: false})
*/
'use strict';
var util = require('hexo-util');
hexo.extend.helper.register('doc_tree', function(page, args){
if (page.layout != 'wiki') {
return '';
}
const pages = hexo.locals.get('pages').filter(function (p) {
if (p.layout == 'wiki' && p.wiki && p.wiki == page.wiki) {
return true;
} else {
return false;
}
}).sort('order');
if (pages.length == 0) {
return '';
}
var el = '';
el += '<div class="doc-tree">';
function doc_node(p) {
if ((p.title || p.seo_title) && p.permalink) {
var node = '<div class="doc-node">';
node += '<a class="doc-tree-link';
if (p.permalink == page.permalink) {
node += ' active';
}
node += '" href="' + p.permalink + '">';
node += '<span class="toc-text">';
node += p.title || p.seo_title;
node += '</span>';
node += '</a>';
node += '</div>';
return node;
} else {
return '';
}
}
pages.forEach((p, i) => {
el += doc_node(p);
});
el += '</div>';
return el;
});