commit
9f1663cfde
|
@ -1,14 +1,15 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
images: {
|
||||
domains: [
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
'image.simplecastcdn.com',
|
||||
'img.youtube.com',
|
||||
],
|
||||
},
|
||||
reactStrictMode: true,
|
||||
images: {
|
||||
domains: [
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
'image.simplecastcdn.com',
|
||||
'img.youtube.com',
|
||||
'strapi.logos.co'
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
|
|
|
@ -43,10 +43,14 @@ export const getStaticProps: GetStaticProps<PageProps> = async () => {
|
|||
|
||||
const { data: tags = [] } = await strapiApi.getTopics()
|
||||
|
||||
const rss = new LPERssFeed('main')
|
||||
await rss.init()
|
||||
latest.data.forEach((post) => rss.addPost(post))
|
||||
await rss.save()
|
||||
try {
|
||||
const rss = new LPERssFeed('main')
|
||||
await rss.init()
|
||||
latest.data.forEach((post) => rss.addPost(post))
|
||||
await rss.save()
|
||||
} catch (e) {
|
||||
console.log('Error generating RSS feed', e)
|
||||
}
|
||||
|
||||
return {
|
||||
props: {
|
||||
|
|
|
@ -98,19 +98,23 @@ export const getStaticProps = async ({ params }: GetStaticPropsContext) => {
|
|||
showSlug: showSlug as string,
|
||||
})
|
||||
|
||||
const rss = new LPERssFeed(showSlug as string, {
|
||||
title: shows[0].title,
|
||||
description: shows[0].descriptionText,
|
||||
image: shows[0].logo.url,
|
||||
language: 'en',
|
||||
id: shows[0].id ?? (showSlug as string),
|
||||
copyright: `All rights reserved ${new Date().getFullYear()}, ${
|
||||
shows[0].title
|
||||
}`,
|
||||
})
|
||||
await rss.init()
|
||||
latestEpisodes.data.forEach((post: LPE.Post.Document) => rss.addPost(post))
|
||||
await rss.save()
|
||||
try {
|
||||
const rss = new LPERssFeed(showSlug as string, {
|
||||
title: shows[0].title,
|
||||
description: shows[0].descriptionText,
|
||||
image: shows[0].logo.url,
|
||||
language: 'en',
|
||||
id: shows[0].id ?? (showSlug as string),
|
||||
copyright: `All rights reserved ${new Date().getFullYear()}, ${
|
||||
shows[0].title
|
||||
}`,
|
||||
})
|
||||
await rss.init()
|
||||
latestEpisodes.data.forEach((post: LPE.Post.Document) => rss.addPost(post))
|
||||
await rss.save()
|
||||
} catch (e) {
|
||||
console.log('Error generating RSS feed', e)
|
||||
}
|
||||
|
||||
return {
|
||||
props: {
|
||||
|
|
Loading…
Reference in New Issue