Update to Astro v3

This commit is contained in:
prototypa
2023-08-22 18:19:53 -04:00
parent d36f60218b
commit 53e12771bd
7 changed files with 34 additions and 27 deletions

View File

@ -58,7 +58,7 @@ const metadata = {
<span class="hidden sm:inline">
Elevate your website creation process with <span class="font-semibold">AstroWind</span>'s SaaS solutions.</span
>
Seamlessly blend the power of Astro 2.0 and Tailwind CSS to craft websites that resonate with your brand and
Seamlessly blend the power of Astro 3.0 and Tailwind CSS to craft websites that resonate with your brand and
audience.
</Fragment>
</Hero2>
@ -72,7 +72,7 @@ const metadata = {
columns={2}
items={[
{
title: 'Integration of Astro 2.0 and Tailwind CSS',
title: 'Integration of Astro 3.0 and Tailwind CSS',
description:
'Offers a powerful combination that enhances both the development process and the end-user experience. Also, allows to build dynamic and visually stunning websites with optimized performance.',
icon: 'tabler:layers-union',
@ -95,7 +95,7 @@ const metadata = {
},
{
title: 'Fast loading times and production-ready code',
description: `Using Astro 2.0 ensures fast loading and seamless rendering, enhancing browsing. The code follows best practices, improving user experience, SEO, and reducing bounce rates.`,
description: `Using Astro 3.0 ensures fast loading and seamless rendering, enhancing browsing. The code follows best practices, improving user experience, SEO, and reducing bounce rates.`,
icon: 'tabler:rocket',
},
{
@ -116,7 +116,7 @@ const metadata = {
{
title: 'Description:',
description:
'Are you a startup with big dreams? AstroWind propels your success. Our template forges a seamless online presence, attracting investors and customers from day one. Astro 2.0 and Tailwind CSS ensure striking, responsive sites, leaving lasting impressions. Countless startups leverage AstroWind to kickstart their journey and resonate with audiences.',
'Are you a startup with big dreams? AstroWind propels your success. Our template forges a seamless online presence, attracting investors and customers from day one. Astro 3.0 and Tailwind CSS ensure striking, responsive sites, leaving lasting impressions. Countless startups leverage AstroWind to kickstart their journey and resonate with audiences.',
},
{
title: 'Benefits:',
@ -146,7 +146,7 @@ const metadata = {
items={[
{
title: 'Description:',
description: `For SaaS businesses, user experience is key. AstroWind enhances showcasing SaaS solutions intuitively. The template's Astro 2.0 and Tailwind CSS integration guarantees user-friendly experience, mirroring your software's efficiency. Customize pages to communicate SaaS value and solutions for your audience.`,
description: `For SaaS businesses, user experience is key. AstroWind enhances showcasing SaaS solutions intuitively. The template's Astro 3.0 and Tailwind CSS integration guarantees user-friendly experience, mirroring your software's efficiency. Customize pages to communicate SaaS value and solutions for your audience.`,
},
{
title: 'Benefits:',

View File

@ -54,7 +54,7 @@ const metadata = {
<Features2
title="About us"
subtitle="We believe in the magic of turning dreams into stunning realities. Founded by passionate developers with a shared vision, we set out to simplify the website creation process. Our templates bring together the innovation of Astro 2.0 and the versatility of Tailwind CSS, enabling you to express your unique brand identity like never before."
subtitle="We believe in the magic of turning dreams into stunning realities. Founded by passionate developers with a shared vision, we set out to simplify the website creation process. Our templates bring together the innovation of Astro 3.0 and the versatility of Tailwind CSS, enabling you to express your unique brand identity like never before."
>
<Fragment slot="bg">
<div class="absolute inset-0 bg-blue-50 dark:bg-transparent"></div>

View File

@ -28,12 +28,12 @@ const metadata = {
>
<Fragment slot="title">
Free template for <span class="hidden xl:inline">creating websites with</span>
<span class="text-accent dark:text-white highlight"> Astro 2.0</span> + Tailwind CSS
<span class="text-accent dark:text-white highlight"> Astro 3.0</span> + Tailwind CSS
</Fragment>
<Fragment slot="subtitle">
<span class="hidden sm:inline">
<span class="font-semibold">AstroWind</span> is a free, customizable and production-ready template for Astro 2.0
<span class="font-semibold">AstroWind</span> is a free, customizable and production-ready template for Astro 3.0
+ Tailwind CSS.</span
>
<span class="block mb-1 sm:hidden font-bold text-blue-600">AstroWind: Production-ready.</span>
@ -101,7 +101,7 @@ const metadata = {
title="AstroWind's Blueprint: Fun Meets Functionality!"
items={[
{
title: 'Built on top of Astro 2.0',
title: 'Built on top of Astro 3.0',
description:
'Benefiting from the performance and developer-friendly features of this modern static site generator.',
},

View File

@ -4,7 +4,7 @@ import { SITE_CONFIG, METADATA_CONFIG, APP_BLOG_CONFIG } from '~/utils/config';
import { fetchPosts } from '~/utils/blog';
import { getPermalink } from '~/utils/permalinks';
export const get = async () => {
export const GET = async () => {
if (!APP_BLOG_CONFIG.isEnabled) {
return new Response(null, {
status: 404,
@ -14,7 +14,7 @@ export const get = async () => {
const posts = await fetchPosts();
return rss({
const { body = "" } = await rss({
title: `${SITE_CONFIG.name}s Blog`,
description: METADATA_CONFIG?.description || "",
site: import.meta.env.SITE,
@ -27,5 +27,12 @@ export const get = async () => {
})),
trailingSlash: SITE_CONFIG.trailingSlash,
})
return new Response(body, {
status: 200,
headers: {
"Content-Type": "application/xml"
}
});
};

View File

@ -173,7 +173,7 @@ export const getStaticPathsBlogList = async ({ paginate }) => {
/** */
export const getStaticPathsBlogPost = async () => {
if (!isBlogEnabled || !isBlogPostRouteEnabled) return [];
return (await fetchPosts()).map((post) => ({
return (await fetchPosts()).flatMap((post) => ({
params: {
blog: post.permalink,
},
@ -191,7 +191,7 @@ export const getStaticPathsBlogCategory = async ({ paginate }) => {
typeof post.category === 'string' && categories.add(post.category.toLowerCase());
});
return Array.from(categories).map((category: string) =>
return Array.from(categories).flatMap((category: string) =>
paginate(
posts.filter((post) => typeof post.category === 'string' && category === post.category.toLowerCase()),
{
@ -213,7 +213,7 @@ export const getStaticPathsBlogTag = async ({ paginate }) => {
Array.isArray(post.tags) && post.tags.map((tag) => tags.add(tag.toLowerCase()));
});
return Array.from(tags).map((tag: string) =>
return Array.from(tags).flatMap((tag: string) =>
paginate(
posts.filter((post) => Array.isArray(post.tags) && post.tags.find((elem) => elem.toLowerCase() === tag)),
{