Skip to content

Commit

Permalink
fix(excerpt): use span instead of anchor element for better SEO perfo…
Browse files Browse the repository at this point in the history
…rmance (#4627)
  • Loading branch information
stevenjoezhang authored Jan 29, 2021
1 parent 30f34f5 commit de8814c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/filter/after_post_render/excerpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function excerptFilter(data) {
data.excerpt = content.substring(0, index).trim();
data.more = content.substring(index + match.length).trim();

return '<a id="more"></a>';
return '<span id="more"></span>';
});
} else {
data.excerpt = '';
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/filters/excerpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Excerpt', () => {
data.content.should.eql([
'foo',
'bar',
'<a id="more"></a>',
'<span id="more"></span>',
'baz'
].join('\n'));

Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Excerpt', () => {

data.content.should.eql([
'foo',
'<a id="more"></a>',
'<span id="more"></span>',
'bar',
'<!-- more -->',
'baz'
Expand Down

0 comments on commit de8814c

Please sign in to comment.