Merge pull request 'fix(deps): update dependency astro to v6' (!21) from renovate/major-astro-monorepo into master
Some checks failed
Test / npm test (push) Has been cancelled
RenovateBot / renovate (push) Has been cancelled

Reviewed-on: #21
This commit was merged in pull request #21.
This commit is contained in:
2026-04-09 12:52:31 +04:00
9 changed files with 383 additions and 1077 deletions

1425
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@
"@astrojs/rss": "^4.0.12",
"@astrojs/sitemap": "^3.4.1",
"@resvg/resvg-js": "^2.6.2",
"astro": "^5.9.0",
"astro": "^6.0.0",
"autoprefixer": "^10.4.21",
"cssnano": "^7.0.7",
"cssnano-preset-advanced": "^7.0.7",

View File

@@ -3,4 +3,4 @@ module.exports = {
gitAuthor: "renovate[bot] <renovatebot@noreply.localhost>",
optimizeForDisabled: true,
platform: "gitea",
};
};

View File

@@ -1,5 +1,5 @@
---
import { type CollectionEntry } from "astro:content";
import { type CollectionEntry, render } from "astro:content";
import dayjs from "dayjs";
type Props = {
@@ -7,7 +7,7 @@ type Props = {
};
const { post } = Astro.props;
const { remarkPluginFrontmatter } = await post.render();
const { remarkPluginFrontmatter } = await render(post);
const formattedDate = dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY");
const datePublished = post.data.datePublished.toISOString();
@@ -28,7 +28,7 @@ const datePublished = post.data.datePublished.toISOString();
<li>
<article>
<a href={`/blog/${post.slug}`} lang={post.data.lang}>{post.data.title}</a>
<a href={`/blog/${post.id}`} lang={post.data.lang}>{post.data.title}</a>
<div>
<small>
<time datetime={datePublished} lang="en">{formattedDate}</time>

View File

@@ -27,7 +27,7 @@ const latestPosts = posts.slice(0, 5);
{
latestPosts.map((post) => (
<li>
<a href={`/blog/${post.slug}`} lang={post.data.lang}>
<a href={`/blog/${post.id}`} lang={post.data.lang}>
{post.data.title}
</a>

View File

@@ -1,7 +1,9 @@
import { defineCollection, z } from "astro:content";
import { defineCollection } from "astro:content";
import { glob } from "astro/loaders";
import { z } from "astro/zod";
const blog = defineCollection({
type: "content",
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
schema: z.object({
basedOn: z.optional(z.string()),
dateModified: z.coerce.date(),

View File

@@ -1,5 +1,5 @@
---
import { type CollectionEntry, getCollection } from "astro:content";
import { type CollectionEntry, getCollection, render } from "astro:content";
import Comments from "../../components/Comments.astro";
import Layout from "../../layouts/BaseLayout.astro";
import blogPostSchema from "../../utils/schemas/blogPostSchema";
@@ -13,20 +13,20 @@ export async function getStaticPaths() {
});
return posts.map((post) => ({
params: { slug: post.slug },
params: { slug: post.id },
props: post,
}));
}
const post = Astro.props;
const { Content, remarkPluginFrontmatter } = await post.render();
const { Content, remarkPluginFrontmatter } = await render(post);
const description = post.data.description;
const isBasedOn = post.data.basedOn;
const lang = post.data.lang;
const preview = `/images/preview/${post.slug}.png`;
const slug = post.slug;
const preview = `/images/preview/${post.id}.png`;
const slug = post.id;
const title = post.data.title;
const dateModified = post.data.dateModified?.toISOString();

View File

@@ -13,10 +13,9 @@ export async function GET(context) {
customData: `<language>en</language>`,
description: description,
items: posts.map((post) => ({
customData: post.data.customData,
description: post.data.description,
link: `/blog/${post.slug}`,
pubDate: post.data.pubDate,
link: `/blog/${post.id}`,
pubDate: post.data.datePublished,
title: post.data.title,
})),
site: context.site,

View File

@@ -19,7 +19,7 @@ export default ({ siteUrl, title, posts }: BlogSchemaParams): WithContext<Collec
"itemListElement": posts.map((post, index) => ({
"@type": "ListItem",
"position": index + 1,
"url": new URL(`/blog/${post.slug}`, siteUrl).toString(),
"url": new URL(`/blog/${post.id}`, siteUrl).toString(),
"name": post.data.title,
})),
},