diff options
-rw-r--r-- | scripts/feed.js | 8 | ||||
-rw-r--r-- | scripts/meta.js | 2 |
2 files changed, 7 insertions, 3 deletions
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+</g, '><', ''), + 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'); %> <li class="is-family-monospace"> - <a href="<%= urler(page.path) %>#t=<%= viewstr %>" onclick="eval('player.seek(<%= timestamp %>)')"> + <a href="#t=<%= viewstr %>" onclick="eval('player.seek(<%= timestamp %>)')"> <%= viewstr %> </a><%= title %> </li> |