feat: add notificarions feed to header
This commit is contained in:
@@ -33,6 +33,12 @@ export const SEOHead: React.FC<{
|
||||
title={title}
|
||||
type="application/feed+json"
|
||||
></link>
|
||||
<link
|
||||
rel="alternate"
|
||||
href="/feed"
|
||||
title={`Notifications on ${title}`}
|
||||
type="application/feed+json"
|
||||
></link>
|
||||
<link rel="icon" href={icon || `${SITE_URL}/logo.svg`}></link>
|
||||
</Head>
|
||||
)
|
||||
|
||||
@@ -33,9 +33,9 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
version: "https://jsonfeed.org/version/1.1",
|
||||
title: site.name,
|
||||
description: site.description,
|
||||
icon: site.avatars?.[0],
|
||||
icon: link + site.avatars?.[0],
|
||||
home_page_url: link,
|
||||
feed_url: `${link}/feed.json`,
|
||||
feed_url: `${link}/feed`,
|
||||
items: pages.list?.map((page: any) => ({
|
||||
id: page.id,
|
||||
title: page.title,
|
||||
|
||||
+3
-3
@@ -27,11 +27,11 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
ctx.res.write(
|
||||
JSON.stringify({
|
||||
version: "https://jsonfeed.org/version/1.1",
|
||||
title: site.name,
|
||||
title: "Notifications on " + site.name,
|
||||
description: site.description,
|
||||
icon: site.avatars?.[0],
|
||||
icon: link + site.avatars?.[0],
|
||||
home_page_url: link,
|
||||
feed_url: `${link}/feed.json`,
|
||||
feed_url: `${link}/feed/notifications`,
|
||||
items: notifications
|
||||
?.map((notification: any) => {
|
||||
let key = ""
|
||||
Reference in New Issue
Block a user