From 0fe565817362f08afe1dce31c9a0bc87cc746d76 Mon Sep 17 00:00:00 2001 From: curben Date: Thu, 30 May 2019 19:18:11 +0930 Subject: [PATCH] fix(sitemap): remove index.html from url https://github.com/pyyzcwg2833/hexo-generator-sitemap/commit/a92dbbb83cc39ff60d43faa5cd688a56574a3889 https://github.com/hexojs/hexo-generator-sitemap/pull/12/commits/3fccc82d3ab3fd2d79d011d00af9a36824caf0a4 --- themes/typing/scripts/sitemap/generator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/typing/scripts/sitemap/generator.js b/themes/typing/scripts/sitemap/generator.js index 0da6dee..9300e06 100644 --- a/themes/typing/scripts/sitemap/generator.js +++ b/themes/typing/scripts/sitemap/generator.js @@ -23,6 +23,10 @@ module.exports = function (locals) { .sort((a, b) => { return b.updated - a.updated }) + .map((post) => ({ + ...post, + permalink: post.permalink.replace('index.html', '') + })) // configuration dictionary const xmlConfig = {