From f59fb15c0155481bf6e9697aa3618298cb96712b Mon Sep 17 00:00:00 2001 From: Jacob Bare Date: Thu, 10 Jun 2021 09:22:46 -0500 Subject: [PATCH] Use `googleNewsPublicationName` if present --- .../src/graphql/resolvers/platform/content.js | 7 +++++++ services/graphql-server/src/site-context/load.js | 1 + 2 files changed, 8 insertions(+) diff --git a/services/graphql-server/src/graphql/resolvers/platform/content.js b/services/graphql-server/src/graphql/resolvers/platform/content.js index 03f9fdc0a..0380e0201 100644 --- a/services/graphql-server/src/graphql/resolvers/platform/content.js +++ b/services/graphql-server/src/graphql/resolvers/platform/content.js @@ -641,6 +641,13 @@ module.exports = { images: (content, _, { basedb }) => loadSitemapImages({ content, basedb }), }, + /** + * + */ + ContentSitemapNewsPublication: { + name: ({ name, googleNewsPublicationName }) => googleNewsPublicationName || name, + }, + ContentSitemapImage: { loc: (image, _, { site }) => { // Use site image host otherwise fallback to global default. diff --git a/services/graphql-server/src/site-context/load.js b/services/graphql-server/src/site-context/load.js index c0d13bce7..29f48bded 100644 --- a/services/graphql-server/src/site-context/load.js +++ b/services/graphql-server/src/site-context/load.js @@ -32,6 +32,7 @@ module.exports = async ({ imageHost: 1, assetHost: 1, date: 1, + googleNewsPublicationName: 1, }; site = await basedb.findOne('platform.Product', { status: 1,