diff --git a/scripts/helpers/doc_tree.js b/scripts/helpers/doc_tree.js deleted file mode 100644 index b40df65..0000000 --- a/scripts/helpers/doc_tree.js +++ /dev/null @@ -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 += '
'; - function doc_node(p) { - if ((p.title || p.seo_title) && p.permalink) { - var node = '
'; - node += ''; - node += ''; - node += p.title || p.seo_title; - node += ''; - node += ''; - node += '
'; - return node; - } else { - return ''; - } - } - pages.forEach((p, i) => { - el += doc_node(p); - }); - el += '
'; - return el; -});