--- import type { InferGetStaticPropsType, GetStaticPaths } from 'astro'; import { blogCategoryRobots, getStaticPathsBlogCategory } from '~/utils/blog'; import Layout from '~/layouts/PageLayout.astro'; import BlogList from '~/components/blog/List.astro'; import Headline from '~/components/blog/Headline.astro'; import Pagination from '~/components/blog/Pagination.astro'; export const prerender = true; export const getStaticPaths = (async ({ paginate }) => { return await getStaticPathsBlogCategory({ paginate }); }) satisfies GetStaticPaths; type Props = InferGetStaticPropsType & { category: Record }; const { page, category } = Astro.props as Props; const currentPage = page.currentPage ?? 1; const metadata = { title: `Category '${category.title}' ${currentPage > 1 ? ` — Page ${currentPage}` : ''}`, description: currentPage > 1 ? `Browse page ${currentPage} of RustDesk blog posts filed under ${category.title}.` : `Browse RustDesk blog posts and release notes filed under the ${category.title} category.`, robots: { index: blogCategoryRobots?.index, follow: blogCategoryRobots?.follow, }, }; ---
{category.title}