moved computer
1
src/components/AstroImage.astro
Normal file → Executable file
|
@ -17,6 +17,7 @@ const imgAvif = await getImage({
|
|||
const imgWebp = await getImage({
|
||||
src: src,
|
||||
format: "webp",
|
||||
// need Number() because sharp wants an integer and not a string for w/h
|
||||
width: Number(imgWidth),
|
||||
height: Number(imgHeight),
|
||||
});
|
||||
|
|
0
src/components/CardEditorial.astro
Normal file → Executable file
0
src/components/EditorialContent.astro
Normal file → Executable file
0
src/components/Footer.astro
Normal file → Executable file
0
src/components/Head.astro
Normal file → Executable file
0
src/components/Header.astro
Normal file → Executable file
0
src/components/LangSwitcher.astro
Normal file → Executable file
0
src/components/ListCards.astro
Normal file → Executable file
0
src/components/ListTags.astro
Normal file → Executable file
0
src/components/MetaDate.astro
Normal file → Executable file
6
src/components/Navigation.astro
Normal file → Executable file
|
@ -7,19 +7,19 @@ import LanguageSwitcher from "./LangSwitcher.astro";
|
|||
<ul class="main-nav" role="list">
|
||||
<li>
|
||||
<a href={l("/articles")} class="clean-link nice-link"
|
||||
>{t("article.titre")}</a
|
||||
>{t("article.titre")} </a
|
||||
>
|
||||
<span aria-hidden="true">·</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href={l("/fragments")} class="clean-link nice-link"
|
||||
>{t("fragments.titre")}</a
|
||||
>{t("fragments.titre")} </a
|
||||
>
|
||||
<span aria-hidden="true">·</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href={l("/references")} class="clean-link nice-link"
|
||||
>{t("references.titre")}</a
|
||||
>{t("references.titre")} </a
|
||||
>
|
||||
<span aria-hidden="true">·</span>
|
||||
</li>
|
||||
|
|
0
src/components/QuickAccessCard.astro
Normal file → Executable file
0
src/components/TOC.astro
Normal file → Executable file
0
src/content/articles/en/2022.md
Normal file → Executable file
0
src/content/articles/en/2023.md
Normal file → Executable file
0
src/content/articles/en/after-effects-expressions.mdx
Normal file → Executable file
0
src/content/articles/en/faq.md
Normal file → Executable file
0
src/content/articles/en/gratuiste.md
Normal file → Executable file
0
src/content/articles/en/sci-hub-blocage.mdx
Normal file → Executable file
0
src/content/articles/en/the-day-I-jamd.mdx
Normal file → Executable file
0
src/content/articles/en/video-compression.mdx
Normal file → Executable file
0
src/content/articles/fr/2022.md
Normal file → Executable file
0
src/content/articles/fr/2023.md
Normal file → Executable file
0
src/content/articles/fr/after-effects-expressions.md
Normal file → Executable file
0
src/content/articles/fr/faq.md
Normal file → Executable file
0
src/content/articles/fr/gratuiste.md
Normal file → Executable file
0
src/content/articles/fr/sci-hub-blocage.mdx
Normal file → Executable file
0
src/content/articles/fr/the-day-I-jamd.mdx
Normal file → Executable file
0
src/content/articles/fr/video-compression.md
Normal file → Executable file
0
src/content/config.ts
Normal file → Executable file
0
src/content/fragments/en/acme-sh-tls-cert.md
Normal file → Executable file
0
src/content/fragments/en/array-vs-array.md
Normal file → Executable file
0
src/content/fragments/en/buttons.md
Normal file → Executable file
0
src/content/fragments/en/image-full.mdx
Normal file → Executable file
0
src/content/fragments/en/nuxt-graphql-static.md
Normal file → Executable file
0
src/content/fragments/en/super-cookies.mdx
Normal file → Executable file
0
src/content/fragments/en/toulouse-fun.md
Normal file → Executable file
0
src/content/fragments/en/visited-links.md
Normal file → Executable file
0
src/content/fragments/fr/acme-sh-tls-cert.md
Normal file → Executable file
0
src/content/fragments/fr/array-vs-array.md
Normal file → Executable file
0
src/content/fragments/fr/buttons.mdx
Normal file → Executable file
0
src/content/fragments/fr/image-full.mdx
Normal file → Executable file
0
src/content/fragments/fr/nuxt-graphql-static.md
Normal file → Executable file
0
src/content/fragments/fr/super-cookies.mdx
Normal file → Executable file
0
src/content/fragments/fr/toulouse-fun.md
Normal file → Executable file
0
src/content/fragments/fr/visited-links.md
Normal file → Executable file
0
src/content/references/en/3w.md
Normal file → Executable file
0
src/content/references/en/natureo.md
Normal file → Executable file
0
src/content/references/en/parole-expression.md
Normal file → Executable file
0
src/content/references/en/rose-primaire.md
Normal file → Executable file
0
src/content/references/fr/3w.md
Normal file → Executable file
0
src/content/references/fr/natureo.md
Normal file → Executable file
0
src/content/references/fr/parole-expression.md
Normal file → Executable file
0
src/content/references/fr/rose-primaire.md
Normal file → Executable file
0
src/data/HP/en/01-offre.md
Normal file → Executable file
0
src/data/HP/en/02-methodo.md
Normal file → Executable file
0
src/data/HP/en/03-about.md
Normal file → Executable file
0
src/data/HP/fr/01.1-offre.md
Normal file → Executable file
0
src/data/HP/fr/01.2-offre.md
Normal file → Executable file
0
src/data/HP/fr/01.3-offre.md
Normal file → Executable file
0
src/data/HP/fr/02-methodo.md
Normal file → Executable file
0
src/data/HP/fr/03-about.md
Normal file → Executable file
0
src/data/veille/en/2023.md
Normal file → Executable file
0
src/data/veille/fr/2023.md
Normal file → Executable file
0
src/env.d.ts
vendored
Normal file → Executable file
0
src/fonts/wotfard/wotfard-medium-webfont.woff2
Normal file → Executable file
0
src/fonts/wotfard/wotfard-regular-webfont.woff2
Normal file → Executable file
0
src/fonts/wotfard/wotfard-semibold-webfont.woff2
Normal file → Executable file
0
src/i18n/en.json
Normal file → Executable file
0
src/i18n/fr.json
Normal file → Executable file
0
src/images/home/about.svg
Normal file → Executable file
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 582 B |
0
src/images/home/icon-desktop.svg
Normal file → Executable file
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 528 B |
0
src/images/home/icon-heart.svg
Normal file → Executable file
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
0
src/images/home/icon-methodo.svg
Normal file → Executable file
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
0
src/images/home/icon-mobile.svg
Normal file → Executable file
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 429 B |
0
src/images/home/icon-philo.svg
Normal file → Executable file
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 464 B |
0
src/images/home/methodo-1.svg
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
src/images/home/methodo.svg
Normal file → Executable file
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 953 B |
0
src/images/home/offres.svg
Normal file → Executable file
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 821 B |
0
src/images/oui.jpg
Normal file → Executable file
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
0
src/images/projects/parole-expression/hero.png
Normal file → Executable file
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
0
src/layouts/BaseLayout.astro
Normal file → Executable file
0
src/layouts/MarkdownPostLayout.astro
Normal file → Executable file
27
src/pages/articles/[slug].astro
Normal file → Executable file
|
@ -6,22 +6,29 @@ import { getCollection } from "astro:content";
|
|||
import EditorialContent from "../../components/EditorialContent.astro";
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
|
||||
export const getStaticPaths = createStaticPaths(async ({ langCode }) => {
|
||||
const articles = await getCollection("articles", ({ data }) => {
|
||||
return data.lang === langCode;
|
||||
});
|
||||
return articles.map((article) => ({
|
||||
params: { slug: article.data.permalink },
|
||||
props: { article },
|
||||
}));
|
||||
}, import.meta.url);
|
||||
export const getStaticPaths = createStaticPaths(
|
||||
async ({ langCode }) => {
|
||||
const articles = await getCollection("articles", ({ data }) => {
|
||||
console.log(langCode);
|
||||
return data.lang === langCode;
|
||||
});
|
||||
return articles.map((article) => ({
|
||||
params: { slug: article.data.permalink },
|
||||
props: { article },
|
||||
}));
|
||||
},
|
||||
import.meta.url
|
||||
);
|
||||
|
||||
// export async function getStaticPaths() {
|
||||
// const articles = await getCollection("articles", ({ data }) => {
|
||||
// console.log(astroI18n.langCode);
|
||||
// return data.lang === astroI18n.langCode;
|
||||
// });
|
||||
// console.log(articles);
|
||||
|
||||
// return articles.map((article) => ({
|
||||
// params: { slug: article.slug },
|
||||
// params: { slug: article.data.permalink },
|
||||
// props: { article },
|
||||
// }));
|
||||
// }
|
||||
|
|
0
src/pages/articles/i18n/en.json
Normal file → Executable file
0
src/pages/articles/i18n/fr.json
Normal file → Executable file
0
src/pages/articles/index.astro
Normal file → Executable file
0
src/pages/en/articles/[slug].astro
Normal file → Executable file
0
src/pages/en/articles/index.astro
Normal file → Executable file
0
src/pages/en/index.astro
Normal file → Executable file
|
@ -1,34 +0,0 @@
|
|||
import rss from "@astrojs/rss";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export async function get(context) {
|
||||
const articles = await getCollection("articles", ({ data }) => {
|
||||
return data.lang === "en" && !data.draft;
|
||||
});
|
||||
const fragments = await getCollection("fragments", ({ data }) => {
|
||||
return data.lang === "en" && !data.draft;
|
||||
});
|
||||
const posts = articles.concat(fragments);
|
||||
return rss({
|
||||
// `<title>` field in output xml
|
||||
title: "Nicolas Arduin",
|
||||
// `<description>` field in output xml
|
||||
description: "Articles from nardu.in",
|
||||
// Pull in your project "site" from the endpoint context
|
||||
// https://docs.astro.build/en/reference/api-reference/#contextsite
|
||||
site: context.site,
|
||||
// Array of `<item>`s in output xml
|
||||
// See "Generating items" section for examples using content collections and glob imports
|
||||
items: posts.map((post) => ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.createdAt,
|
||||
description: post.data.subtitle,
|
||||
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.data.permalink}/`,
|
||||
})),
|
||||
// (optional) inject custom xml
|
||||
customData: `<language>en-us</language>`,
|
||||
});
|
||||
}
|
0
src/pages/en/sitemap.astro
Normal file → Executable file
0
src/pages/en/snippets/[slug].astro
Normal file → Executable file
0
src/pages/en/snippets/index.astro
Normal file → Executable file
0
src/pages/en/veille/index.astro
Normal file → Executable file
0
src/pages/en/work/index.astro
Normal file → Executable file
24
src/pages/fragments/[slug].astro
Normal file → Executable file
|
@ -1,27 +1,31 @@
|
|||
---
|
||||
import { createStaticPaths } from "astro-i18n";
|
||||
// import { astroI18n } from "astro-i18n";
|
||||
|
||||
import { getCollection } from "astro:content";
|
||||
import EditorialContent from "../../components/EditorialContent.astro";
|
||||
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
|
||||
export const getStaticPaths = createStaticPaths(async ({ langCode }) => {
|
||||
const snippets = await getCollection("fragments", ({ data }) => {
|
||||
return data.lang === langCode;
|
||||
});
|
||||
return snippets.map((snippet) => ({
|
||||
params: { slug: snippet.data.permalink },
|
||||
props: { snippet },
|
||||
}));
|
||||
}, import.meta.url);
|
||||
export const getStaticPaths = createStaticPaths(
|
||||
async ({ langCode }) => {
|
||||
const snippets = await getCollection("fragments", ({ data }) => {
|
||||
return data.lang === langCode;
|
||||
});
|
||||
return snippets.map((snippet) => ({
|
||||
params: { slug: snippet.data.permalink },
|
||||
props: { snippet },
|
||||
}));
|
||||
},
|
||||
import.meta.url
|
||||
);
|
||||
|
||||
// export async function getStaticPaths() {
|
||||
// const snippets = await getCollection("fragments", ({ data }) => {
|
||||
// return data.lang === astroI18n.langCode;
|
||||
// });
|
||||
// return snippets.map((snippet) => ({
|
||||
// params: { slug: snippet.slug },
|
||||
// params: { slug: snippet.data.permalink },
|
||||
// props: { snippet },
|
||||
// }));
|
||||
// }
|
||||
|
|