feat: add madeira blog post upgrade astro
Some checks failed
Deploy to SFTP Server / build (push) Failing after 5m43s
Some checks failed
Deploy to SFTP Server / build (push) Failing after 5m43s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import { getCollection, render } from "astro:content";
|
||||
import { getLocale } from "astro-i18n-aut";
|
||||
import { filterCollection, parseSlug } from "@i18n/utils";
|
||||
|
||||
@@ -19,6 +19,7 @@ export async function getStaticPaths() {
|
||||
const pages = await getCollection("photos");
|
||||
const page = filterCollection(pages, locale).find((page) => {
|
||||
const [slug] = parseSlug(page.id);
|
||||
console.log({ slug, id: page.id, params: Astro.params.slug, locale });
|
||||
return slug === Astro.params.slug;
|
||||
});
|
||||
|
||||
@@ -28,7 +29,7 @@ if (!page) {
|
||||
});
|
||||
}
|
||||
|
||||
const { Content } = await page.render();
|
||||
const { Content } = await render(page);
|
||||
---
|
||||
|
||||
<Content />
|
||||
|
Reference in New Issue
Block a user