Skip to content

Commit

Permalink
fix: set dynamic rendering to force-static for multiple pages
Browse files Browse the repository at this point in the history
  • Loading branch information
duyet committed Dec 26, 2024
1 parent 4104d03 commit b84d2b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/blog/app/category/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import Feed from '@duyet/components/Feed'
import { getAllCategories, getPostsByCategory } from '@duyet/libs/getPost'
import { getSlug } from '@duyet/libs/getSlug'

export const dynamic = 'force-static'

interface Params {
category: string
}
Expand Down
1 change: 1 addition & 0 deletions apps/blog/app/rss.xml/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getAllPosts } from '@duyet/libs/getPost'
import RSS from 'rss'

const siteUrl = 'https://blog.duyet.net'
export const dynamic = 'force-static'

export async function GET() {
const posts = getAllPosts(['slug', 'title', 'excerpt', 'date'], 100000)
Expand Down
2 changes: 2 additions & 0 deletions apps/blog/app/series/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { getSeries } from '@duyet/libs/getSeries'
import { notFound } from 'next/navigation'
import { SeriesBox } from '../../../components/series'

export const dynamic = 'force-static'

interface PageProps {
params: Promise<{
slug: string
Expand Down
5 changes: 4 additions & 1 deletion apps/blog/app/tag/[tag]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import Link from 'next/link'

import Feed from '@duyet/components/Feed'
import { getAllTags, getPostsByTag } from '@duyet/libs/getPost'
import { getSlug } from '@duyet/libs/getSlug'
import Link from 'next/link'

export const dynamic = 'force-static'

interface Params {
tag: string
Expand Down

0 comments on commit b84d2b3

Please sign in to comment.