add force-static

This commit is contained in:
Timothy Lin 2024-10-31 22:49:51 +08:00
parent 85fe09b13e
commit caedfeac50
3 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,8 @@
import { NewsletterAPI } from 'pliny/newsletter' import { NewsletterAPI } from 'pliny/newsletter'
import siteMetadata from '@/data/siteMetadata' import siteMetadata from '@/data/siteMetadata'
export const dynamic = 'force-static'
const handler = NewsletterAPI({ const handler = NewsletterAPI({
// @ts-ignore // @ts-ignore
provider: siteMetadata.newsletter.provider, provider: siteMetadata.newsletter.provider,

View File

@ -1,6 +1,8 @@
import { MetadataRoute } from 'next' import { MetadataRoute } from 'next'
import siteMetadata from '@/data/siteMetadata' import siteMetadata from '@/data/siteMetadata'
export const dynamic = 'force-static'
export default function robots(): MetadataRoute.Robots { export default function robots(): MetadataRoute.Robots {
return { return {
rules: { rules: {

View File

@ -2,6 +2,8 @@ import { MetadataRoute } from 'next'
import { allBlogs } from 'contentlayer/generated' import { allBlogs } from 'contentlayer/generated'
import siteMetadata from '@/data/siteMetadata' import siteMetadata from '@/data/siteMetadata'
export const dynamic = 'force-static'
export default function sitemap(): MetadataRoute.Sitemap { export default function sitemap(): MetadataRoute.Sitemap {
const siteUrl = siteMetadata.siteUrl const siteUrl = siteMetadata.siteUrl