Fix minimal details
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
---
|
||||
import { SITE, BLOG } from "~/config.mjs";
|
||||
import { fetchPosts } from "~/utils/fetchPosts";
|
||||
|
||||
import Layout from "~/layouts/BlogLayout.astro";
|
||||
import BlogList from "~/components/widgets/BlogList.astro";
|
||||
import Pagination from "~/components/widgets/Pagination.astro";
|
||||
import { getCanonical, getPermalink, BLOG_BASE } from "~/utils/permalinks";
|
||||
|
||||
import { fetchPosts } from "~/utils/posts";
|
||||
import { getCanonical, getPermalink, BLOG_BASE } from "~/utils/permalinks";
|
||||
|
||||
export async function getStaticPaths({ paginate }) {
|
||||
if (BLOG?.disabled) return [];
|
||||
@ -24,16 +25,15 @@ const currentPage = page.currentPage ?? 1;
|
||||
const meta = {
|
||||
title: `Blog ${currentPage > 1 ? `— Page ${currentPage} ` : ""}— ${SITE.name}`,
|
||||
description: SITE.description,
|
||||
canonical: getCanonical(getPermalink(page.url.current))
|
||||
}
|
||||
canonical: getCanonical(getPermalink(page.url.current)),
|
||||
};
|
||||
---
|
||||
|
||||
<Layout meta={meta}>
|
||||
<Fragment slot="title">
|
||||
News and step-by-step guides about
|
||||
<span class="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-pink-500">AstroWind
|
||||
</span>
|
||||
<span class="bg-clip-text text-transparent bg-gradient-to-r from-primary-500 to-secondary-500">AstroWind</span>
|
||||
</Fragment>
|
||||
<BlogList posts={page.data} />
|
||||
<Pagination prevUrl={page.url.prev} nextUrl={page.url.next} />
|
||||
</Layout>
|
||||
</Layout>
|
||||
|
@ -1,11 +1,12 @@
|
||||
---
|
||||
import { SITE, BLOG } from "~/config.mjs";
|
||||
import { getCanonical, getPermalink, cleanSlug, BLOG_BASE } from "~/utils/permalinks";
|
||||
import { fetchPosts } from "~/utils/fetchPosts";
|
||||
import { findImage } from "~/utils/findImage";
|
||||
|
||||
import Layout from "~/layouts/PageLayout.astro";
|
||||
import BlogPost from "~/components/widgets/BlogPost.astro";
|
||||
|
||||
import { getCanonical, getPermalink, cleanSlug, BLOG_BASE } from "~/utils/permalinks";
|
||||
import { fetchPosts } from "~/utils/posts";
|
||||
import { findImage } from "~/utils/images";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
if (BLOG?.disabled) return [];
|
||||
@ -25,9 +26,9 @@ const meta = {
|
||||
description: post.description,
|
||||
canonical: post.canonical || getCanonical(getPermalink(post.slug, "post")),
|
||||
image: await findImage(post.image),
|
||||
}
|
||||
};
|
||||
---
|
||||
|
||||
<Layout meta={meta}>
|
||||
<BlogPost post={{ ...post, image: meta.image }} />
|
||||
</Layout>
|
||||
</Layout>
|
||||
|
Reference in New Issue
Block a user