import React from "react"; import { client } from "@/lib/sanity"; import { Metadata } from "next"; import BlogCards from "@/components/cards/BlogCards"; import { Rss } from "lucide-react"; import { Button } from "@/components/ui/button"; import Link from "next/link"; export const dynamic = "force-static"; export const metadata: Metadata = { title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", openGraph: { title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", url: "https://svrjs.org/blog", type: "website", images: [ { url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", width: 800, height: 600, alt: "Blog - SVR.JS" } ] }, twitter: { card: "summary_large_image", site: "@SVR_JS", title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], creator: "@SVR_JS" } }; const BlogPage = async ({ params }: { params: { id: string } }) => { // Optionally, you can fetch some initial data here if needed. return (

SVR.JS Blog Post

Stay updated with our latest blog posts by subscribing to our

); }; export async function generateStaticParams() { // Change in BlogCards component too! const cardsPerPage = 6; const totalPostsQuery = `count(*[_type == 'blog'])`; const totalPosts: number = await client.fetch( totalPostsQuery, {}, { cache: "no-store" } ); const totalPages = Math.ceil(totalPosts / cardsPerPage); let ids: any[] = []; for (let i = 1; i <= totalPages; i++) { ids.push({ id: i.toString() }); } return ids; } export default BlogPage;