new HP design + content, new references, fixed styles, fixed i18n
This commit is contained in:
parent
407cdf9099
commit
3ff4ad3b17
64 changed files with 445 additions and 133 deletions
|
@ -11,7 +11,7 @@ export const getStaticPaths = createStaticPaths(async ({ langCode }) => {
|
|||
return data.lang === langCode;
|
||||
});
|
||||
return articles.map((article) => ({
|
||||
params: { slug: article.slug },
|
||||
params: { slug: article.data.permalink },
|
||||
props: { article },
|
||||
}));
|
||||
}, import.meta.url);
|
||||
|
|
|
@ -26,7 +26,7 @@ export async function get(context) {
|
|||
lang: post.data.lang,
|
||||
// Compute RSS link from post `slug`
|
||||
// This example assumes all posts are rendered as `/blog/[slug]` routes
|
||||
link: `/en/${post.data.type}/${post.slug}/`,
|
||||
link: `/en/${post.data.type}/${post.data.permalink}/`,
|
||||
})),
|
||||
// (optional) inject custom xml
|
||||
customData: `<language>en-us</language>`,
|
||||
|
|
|
@ -11,7 +11,7 @@ export const getStaticPaths = createStaticPaths(async ({ langCode }) => {
|
|||
return data.lang === langCode;
|
||||
});
|
||||
return snippets.map((snippet) => ({
|
||||
params: { slug: snippet.slug },
|
||||
params: { slug: snippet.data.permalink },
|
||||
props: { snippet },
|
||||
}));
|
||||
}, import.meta.url);
|
||||
|
|
|
@ -3,13 +3,10 @@
|
|||
import { l, t, astroI18n } from "astro-i18n";
|
||||
astroI18n.init(Astro);
|
||||
|
||||
import { getEntry } from "astro:content";
|
||||
|
||||
// import stuff
|
||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||
import QuickAccessCard from "../components/QuickAccessCard.astro";
|
||||
import ListCards from "../components/ListCards.astro";
|
||||
import CardEditorial from "../components/CardEditorial.astro";
|
||||
|
||||
const pageTitle = t("accueil");
|
||||
|
||||
|
@ -73,7 +70,7 @@ const localizedReferences = await getCollection("references", ({ data }) => {
|
|||
<div class="section__reference">
|
||||
<ListCards
|
||||
list={localizedReferences.filter((ref) => {
|
||||
return ref.slug === section.frontmatter.reference;
|
||||
return ref.data.permalink === section.frontmatter.reference;
|
||||
})}
|
||||
routeName={t("references.slug")}
|
||||
/>
|
||||
|
|
|
@ -26,7 +26,7 @@ export async function get(context) {
|
|||
lang: post.data.lang,
|
||||
// Compute RSS link from post `slug`
|
||||
// This example assumes all posts are rendered as `/blog/[slug]` routes
|
||||
link: `/${post.data.type}/${post.slug}/`,
|
||||
link: `/${post.data.type}/${post.data.permalink}/`,
|
||||
})),
|
||||
// (optional) inject custom xml
|
||||
customData: `<language>fr-fr</language>`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue