From 9f3f550fdc4efee53c9496c20a274ba9b44ae96f Mon Sep 17 00:00:00 2001 From: James Purser Date: Sat, 2 Jul 2022 16:59:36 +1000 Subject: [PATCH] Small changes to add project specific rss feed to headers of Articles Also a small change to make speed up display of text --- pages/_document.js | 2 +- pages/news/[slug].js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pages/_document.js b/pages/_document.js index e80708e..9dc3c71 100755 --- a/pages/_document.js +++ b/pages/_document.js @@ -36,7 +36,7 @@ class CustomDocument extends Document { - +
diff --git a/pages/news/[slug].js b/pages/news/[slug].js index 30ec09b..effc880 100755 --- a/pages/news/[slug].js +++ b/pages/news/[slug].js @@ -19,7 +19,13 @@ const Article = ({article_obj, sections, pagedata, stories, serverRuntimeConfig, featureImage = article_obj.FeatureImage.data.attributes.formats.large } } - console.log(article_obj) + + var rssFeed + + if (article_obj.project.data && article_obj.project.data.attributes.HasFeed == true) { + rssFeed = config.siteURL+"/feed/"+article_obj.project.data.attributes.Slug+"-feed.xml" + } + return ( @@ -31,6 +37,9 @@ const Article = ({article_obj, sections, pagedata, stories, serverRuntimeConfig, { article_obj.FeatureImage.data != null && } + { article_obj.project.data != null && article_obj.project.data.attributes.HasFeed == true && + + }
{ article_obj.FeatureImage.data != null &&