Small changes to add project specific rss feed to
headers of Articles Also a small change to make speed up display of text
This commit is contained in:
parent
95d82dba8f
commit
9f3f550fdc
2 changed files with 11 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ class CustomDocument extends Document {
|
|||
<link rel="icon" href="/images/favicon-192.png" sizes="192x192" />
|
||||
<link rel="icon" href="/images/favicon-228.png" sizes="228x228" />
|
||||
</Fragment>
|
||||
<link href="https://fonts.googleapis.com/css?family=Cabin|Jaldi" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Cabin|Jaldi&display=swap" rel="stylesheet" />
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
|
|
|
|||
|
|
@ -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 ( <Layout sections={sections} pagedata={pagedata}>
|
||||
<Head>
|
||||
<meta name="twitter:card" content={ article_obj.Abstract } key="twcard" />
|
||||
|
|
@ -31,6 +37,9 @@ const Article = ({article_obj, sections, pagedata, stories, serverRuntimeConfig,
|
|||
{ article_obj.FeatureImage.data != null &&
|
||||
<meta name="og:image" content={featureImage.url}></meta>
|
||||
}
|
||||
{ article_obj.project.data != null && article_obj.project.data.attributes.HasFeed == true &&
|
||||
<link rel="alternate" type="application/rss+xml" title={article_obj.project.data.attributes.Title + " Feed"} href={rssFeed} />
|
||||
}
|
||||
</Head>
|
||||
<div className="main_content col-md-9 col-sm-12">
|
||||
{ article_obj.FeatureImage.data != null &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue