--- import { SITE, BLOG } from '~/config.mjs'; import Layout from '~/layouts/PageLayout.astro'; import BlogList from '~/components/blog/List.astro'; import Pagination from '~/components/common/Pagination.astro'; import { fetchPosts } from '~/utils/blog'; import { BLOG_BASE } from '~/utils/permalinks'; import Title from '~/components/blog/Title.astro'; export async function getStaticPaths({ paginate }) { if (BLOG?.disabled || BLOG?.blog?.disabled) return []; return paginate(await fetchPosts(), { params: { blog: BLOG_BASE || undefined }, pageSize: BLOG.postsPerPage, }); } const { page } = Astro.props; const currentPage = page.currentPage ?? 1; const meta = { title: `Blog${currentPage > 1 ? ` — Page ${currentPage}` : ''}`, description: SITE.description, noindex: BLOG?.blog?.noindex || currentPage > 1, ogType: 'blog', }; ---
News and tutorials about AstroWind