From 96e4a6d7ba9abcb59da05801cd65043d76e8ca4e Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 31 Jul 2021 21:16:45 +0800 Subject: [PATCH] delete old file --- scripts/helpers/doc_tree.js | 48 ------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 scripts/helpers/doc_tree.js 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 = ''; - return node; - } else { - return ''; - } - } - pages.forEach((p, i) => { - el += doc_node(p); - }); - el += '
'; - return el; -});