From 08c1c79cb6062af2e4e3095e8865282016fad1f7 Mon Sep 17 00:00:00 2001 From: Doge Date: Thu, 13 May 2021 19:20:10 +0800 Subject: Try to fix error --- scripts/feed.js | 8 ++++++-- scripts/meta.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/feed.js b/scripts/feed.js index 11e59cb..ef23998 100644 --- a/scripts/feed.js +++ b/scripts/feed.js @@ -33,10 +33,14 @@ hexo.extend.generator.register("feed", (locals) => { // Rendering for podcasts locals.posts.sort('date', -1).each(function (post) { if (!post.podcast) return; - let description = post.content.replace(/onclick=".*?"/gi, ''); + let description = post.content.replace(/onclick=".*?"/gi, '') + .replace(/class=".*?"/gi, '') + .replace(/id=".*?"/gi, '').replace(/rel=".*?"/gi, '') + .replace(/title=".*?"/gi, '').replace(/\n/g, "") + .replace(/\s+/g, ' ').trim(); feed.addItem({ title: post.title, - description: description.replace(/>\s+<', ''), + description: description, url: config.url + urler(post.path), guid: config.url + urler(post.path), author: post.podcast.authors.join(', '), diff --git a/scripts/meta.js b/scripts/meta.js index 046e939..baf8166 100644 --- a/scripts/meta.js +++ b/scripts/meta.js @@ -44,7 +44,7 @@ hexo.extend.tag.register('timeline', function (_args) { const viewstr = String(hour).padStart(2, '0') + ':' + String(minute).padStart(2, '0') + ':' + String(second).padStart(2, '0'); %>
  • - + <%= viewstr %> <%= title %>
  • -- cgit v1.2.3