From 7785df09b593422d31d075320bc6babcef6f2a37 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Thu, 24 Nov 2022 23:43:40 +0800 Subject: [PATCH] feat(open_graph): drop google_plus --- lib/plugins/helper/open_graph.js | 6 +----- test/scripts/helpers/open_graph.js | 10 ---------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/plugins/helper/open_graph.js b/lib/plugins/helper/open_graph.js index 3f35ed82e4..e9c3eb0dbe 100644 --- a/lib/plugins/helper/open_graph.js +++ b/lib/plugins/helper/open_graph.js @@ -1,7 +1,7 @@ 'use strict'; const { isMoment, isDate } = require('moment'); -const { encodeURL, prettyUrls, htmlTag, stripHTML, escapeHTML } = require('hexo-util'); +const { encodeURL, prettyUrls, stripHTML, escapeHTML } = require('hexo-util'); const { default: moize } = require('moize'); const localeMap = { @@ -169,10 +169,6 @@ function openGraphHelper(options = {}) { result += meta('twitter:site', options.twitter_site, false); } - if (options.google_plus) { - result += `${htmlTag('link', { rel: 'publisher', href: options.google_plus })}\n`; - } - if (options.fb_admins) { result += og('fb:admins', options.fb_admins); } diff --git a/test/scripts/helpers/open_graph.js b/test/scripts/helpers/open_graph.js index be2fb2ecb1..ba78dc3bd3 100644 --- a/test/scripts/helpers/open_graph.js +++ b/test/scripts/helpers/open_graph.js @@ -491,16 +491,6 @@ describe('open_graph', () => { result.should.have.string(meta({name: 'twitter:site', content: 'Hello'})); }); - it('google_plus - options', () => { - const result = openGraph.call({ - page: {}, - config: hexo.config, - is_post: isPost - }, {google_plus: '+123456789'}); - - result.should.have.string(tag('link', {rel: 'publisher', href: '+123456789'})); - }); - it('fb_admins - options', () => { const result = openGraph.call({ page: {},