diff --git a/lib/plugins/helper/open_graph.js b/lib/plugins/helper/open_graph.js index 67b0281ed1..279f1db908 100644 --- a/lib/plugins/helper/open_graph.js +++ b/lib/plugins/helper/open_graph.js @@ -116,10 +116,6 @@ function openGraphHelper(options = {}) { } result += meta('twitter:card', twitterCard); - result += meta('twitter:title', title); - if (description) { - result += meta('twitter:description', description, false); - } if (images.length) { result += meta('twitter:image', images[0], false); diff --git a/test/scripts/helpers/open_graph.js b/test/scripts/helpers/open_graph.js index 158f5caab8..18faaab6e9 100644 --- a/test/scripts/helpers/open_graph.js +++ b/test/scripts/helpers/open_graph.js @@ -37,8 +37,7 @@ describe('open_graph', () => { meta({property: 'og:site_name', content: hexo.config.title}), meta({property: 'og:locale', content: 'en'}), meta({property: 'og:updated_time', content: post.updated.toISOString()}), - meta({name: 'twitter:card', content: 'summary'}), - meta({name: 'twitter:title', content: hexo.config.title}) + meta({name: 'twitter:card', content: 'summary'}) ].join('\n')); return Post.removeById(post._id); @@ -429,7 +428,7 @@ describe('open_graph', () => { result.should.not.contain(meta({property: 'og:updated_time', content: '2016-05-23T21:20:21.372Z'})); }); - it('description - do not add /(?:og:|twitter:)?description/ meta tags if there is no description', () => { + it('description - do not add /(?:og:)?description/ meta tags if there is no description', () => { const result = openGraph.call({ page: { }, config: {}, @@ -437,7 +436,6 @@ describe('open_graph', () => { }, { }); result.should.not.contain(meta({property: 'og:description'})); - result.should.not.contain(meta({property: 'twitter:description'})); result.should.not.contain(meta({property: 'description'})); });