remove redirects & fix rss + add rel=me links + en link

This commit is contained in:
nicolas arduin 2025-01-02 14:52:11 +01:00
parent fa61a28160
commit 069baaf81c
Signed by: nicolas
SSH Key Fingerprint: SHA256:ELi8eDeNLl5PTn64G+o2Kx5+XVDfHF5um2tZigfwWkM
15 changed files with 338 additions and 126 deletions

View File

@ -2,13 +2,13 @@
export default new Map([
["src/content/articles/en/after-effects-expressions.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fafter-effects-expressions.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/sci-hub-blocage.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fsci-hub-blocage.mdx&astroContentModuleFlag=true")],
["src/content/fragments/en/image-full.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Fen%2Fimage-full.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/the-day-I-jamd.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fthe-day-I-jamd.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/video-compression.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fvideo-compression.mdx&astroContentModuleFlag=true")],
["src/content/fragments/en/image-full.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Fen%2Fimage-full.mdx&astroContentModuleFlag=true")],
["src/content/fragments/en/super-cookies.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Fen%2Fsuper-cookies.mdx&astroContentModuleFlag=true")],
["src/content/articles/fr/sci-hub-blocage.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Ffr%2Fsci-hub-blocage.mdx&astroContentModuleFlag=true")],
["src/content/articles/fr/the-day-I-jamd.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Ffr%2Fthe-day-I-jamd.mdx&astroContentModuleFlag=true")],
["src/content/fragments/fr/buttons.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fbuttons.mdx&astroContentModuleFlag=true")],
["src/content/fragments/fr/image-full.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fimage-full.mdx&astroContentModuleFlag=true")],
["src/content/fragments/fr/super-cookies.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fsuper-cookies.mdx&astroContentModuleFlag=true")],
["src/content/articles/fr/the-day-I-jamd.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Ffr%2Fthe-day-I-jamd.mdx&astroContentModuleFlag=true")]]);
["src/content/fragments/fr/super-cookies.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fsuper-cookies.mdx&astroContentModuleFlag=true")]]);

206
.astro/content.d.ts vendored
View File

@ -0,0 +1,206 @@
declare module 'astro:content' {
interface Render {
'.mdx': Promise<{
Content: import('astro').MarkdownInstance<{}>['Content'];
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
components: import('astro').MDXInstance<{}>['components'];
}>;
}
}
declare module 'astro:content' {
export interface RenderResult {
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
}
interface Render {
'.md': Promise<RenderResult>;
}
export interface RenderedContent {
html: string;
metadata?: {
imagePaths: Array<string>;
[key: string]: unknown;
};
}
}
declare module 'astro:content' {
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
export type CollectionKey = keyof AnyEntryMap;
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
export type ContentCollectionKey = keyof ContentEntryMap;
export type DataCollectionKey = keyof DataEntryMap;
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
ContentEntryMap[C]
>['slug'];
/** @deprecated Use `getEntry` instead. */
export function getEntryBySlug<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(
collection: C,
// Note that this has to accept a regular string too, for SSR
entrySlug: E,
): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
/** @deprecated Use `getEntry` instead. */
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
collection: C,
entryId: E,
): Promise<CollectionEntry<C>>;
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
collection: C,
filter?: (entry: CollectionEntry<C>) => entry is E,
): Promise<E[]>;
export function getCollection<C extends keyof AnyEntryMap>(
collection: C,
filter?: (entry: CollectionEntry<C>) => unknown,
): Promise<CollectionEntry<C>[]>;
export function getEntry<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(entry: {
collection: C;
slug: E;
}): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof DataEntryMap,
E extends keyof DataEntryMap[C] | (string & {}),
>(entry: {
collection: C;
id: E;
}): E extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(
collection: C,
slug: E,
): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof DataEntryMap,
E extends keyof DataEntryMap[C] | (string & {}),
>(
collection: C,
id: E,
): E extends keyof DataEntryMap[C]
? string extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]> | undefined
: Promise<DataEntryMap[C][E]>
: Promise<CollectionEntry<C> | undefined>;
/** Resolve an array of entry references from the same collection */
export function getEntries<C extends keyof ContentEntryMap>(
entries: {
collection: C;
slug: ValidContentEntrySlug<C>;
}[],
): Promise<CollectionEntry<C>[]>;
export function getEntries<C extends keyof DataEntryMap>(
entries: {
collection: C;
id: keyof DataEntryMap[C];
}[],
): Promise<CollectionEntry<C>[]>;
export function render<C extends keyof AnyEntryMap>(
entry: AnyEntryMap[C][string],
): Promise<RenderResult>;
export function reference<C extends keyof AnyEntryMap>(
collection: C,
): import('astro/zod').ZodEffects<
import('astro/zod').ZodString,
C extends keyof ContentEntryMap
? {
collection: C;
slug: ValidContentEntrySlug<C>;
}
: {
collection: C;
id: keyof DataEntryMap[C];
}
>;
// Allow generic `string` to avoid excessive type errors in the config
// if `dev` is not running to update as you edit.
// Invalid collection names will be caught at build time.
export function reference<C extends string>(
collection: C,
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
>;
type ContentEntryMap = {
};
type DataEntryMap = {
"HPsections": Record<string, {
id: string;
body?: string;
collection: "HPsections";
data: InferEntrySchema<"HPsections">;
rendered?: RenderedContent;
filePath?: string;
}>;
"articles": Record<string, {
id: string;
body?: string;
collection: "articles";
data: InferEntrySchema<"articles">;
rendered?: RenderedContent;
filePath?: string;
}>;
"fragments": Record<string, {
id: string;
body?: string;
collection: "fragments";
data: InferEntrySchema<"fragments">;
rendered?: RenderedContent;
filePath?: string;
}>;
"references": Record<string, {
id: string;
body?: string;
collection: "references";
data: InferEntrySchema<"references">;
rendered?: RenderedContent;
filePath?: string;
}>;
"veille": Record<string, {
id: string;
body?: string;
collection: "veille";
data: InferEntrySchema<"veille">;
rendered?: RenderedContent;
filePath?: string;
}>;
};
type AnyEntryMap = ContentEntryMap & DataEntryMap;
export type ContentConfig = typeof import("../src/content.config.js");
}

File diff suppressed because one or more lines are too long

View File

@ -11,28 +11,6 @@ export default defineConfig({
build: {
format: 'directory'
},
redirects: {
'/en/': {
status: 308,
destination: '/articles/en-2025'
},
'/articles/en/': {
status: 308,
destination: '/articles/#en-articles'
},
'/articles/en/[...id]': {
status: 308,
destination: '/articles/en-[...id]'
},
'/snippets/en/': {
status: 308,
destination: '/fragments/#en-fragments'
},
'/snippets/en/[...id]': {
status: 308,
destination: '/fragments/en-[...id]'
}
},
image: {
domains: ['assets.nardu.in'],
remotePatterns: [{ protocol: 'https' }]

View File

@ -7,7 +7,7 @@ const { item, routeName } = Astro.props
const isReference = routeName === 'references'
---
<div class:list={['card', { 'card--link': !isReference }]}>
<div class='card'>
<h3>
{
!isReference ? (
@ -44,58 +44,73 @@ const isReference = routeName === 'references'
box-shadow: var(--shadow-elevation-medium);
background-color: white;
}
/*
* to be replaced with .card:has(a)
* when firefox supports it
*/
.card--link:hover {
box-shadow: var(--shadow-elevation-high);
}
.card--link:focus-within {
box-shadow: var(--shadow-elevation-high);
}
.card--link::after {
content: '';
position: absolute;
inline-size: 30px;
block-size: 30px;
top: var(--space-m);
right: var(--space-s);
opacity: 0;
background-image: url('/assets/svg/arrow-right.svg');
background-repeat: no-repeat;
background-position: center;
background-size: contain;
transform: translateX(1rem);
}
.card--link:hover::after,
.card--link:focus-within::after {
transform: translateX(0);
opacity: 1;
}
.card--link:hover h3 a {
text-decoration: underline;
}
.card--link:hover h3 a,
.card--link:focus-within h3 a {
color: var(--color-brique);
}
.card--link::before {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
block-size: 100%;
inline-size: 2px;
transform: scaleY(0);
transform-origin: bottom;
background-color: var(--color-brique);
}
.card--link:hover::before,
.card--link:focus-within::before {
transform: scaleY(1);
transform-origin: top;
/* selects card that do not have an external link */
.card:not(:has([rel='noopener noreferer'])) {
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
block-size: 100%;
inline-size: 2px;
transform: scaleY(0);
transform-origin: bottom;
background-color: var(--color-brique);
}
&::after {
content: '';
position: absolute;
inline-size: 30px;
block-size: 30px;
top: var(--space-m);
right: var(--space-s);
opacity: 0;
background-image: url('/assets/svg/arrow-right.svg');
background-repeat: no-repeat;
background-position: center;
background-size: contain;
transform: translateX(1rem);
}
&:hover,
&:focus-within {
box-shadow: var(--shadow-elevation-high);
&::before {
transform: scaleY(1);
transform-origin: top;
}
&::after {
transform: translateX(0);
opacity: 1;
}
h3 a {
text-decoration: underline;
color: var(--color-brique);
}
}
@media (prefers-reduced-motion: no-preference) {
& {
transition: box-shadow 0.2s ease;
}
&::before {
transition: transform 0.2s ease-in-out;
}
&::after {
transition:
opacity ease 0.2s,
transform ease 0.2s;
}
h3 a {
transition: color ease 0.2s;
}
}
}
h3 {
@ -112,25 +127,6 @@ const isReference = routeName === 'references'
position: absolute;
inset: 0;
}
@media (prefers-reduced-motion: no-preference) {
.card {
transition: box-shadow 0.2s ease;
}
.card::before {
transition: transform 0.2s ease-in-out;
}
.card::after {
transition:
opacity ease 0.2s,
transform ease 0.2s;
}
.card--link {
view-transition-name: var(--slug);
}
h3 a {
transition: color ease 0.2s;
}
}
.card h4 {
margin-block-start: var(--space-2xs);

View File

@ -1,26 +1,19 @@
<footer class='footer' role='contentinfo'>
<section class='flow'>
<p>Nicolas Arduin</p>
<p>Développeur web spécialisé en accessibilité.</p>
---
import SocialRel from '../components/SocialRel.astro'
---
<footer class='footer wrapper' role='contentinfo'>
<section class='info'>
<div>
<p class='h4'>Nicolas Arduin</p>
<p>Développeur web spécialisé en accessibilité.</p>
</div>
<ul class='flow' role='list'>
<li>
<a
href='mailto:contact@nardu.in'
title='Envoyez-moi un mail (ouverture du logiciel automatique).'
>contact@nardu.in</a
>
</li>
<li>
<a
href='tel:+33749464239'
title='Contactez-moi par téléphone (ouverture du logiciel automatique)'
>+337 49 46 42 39</a
>
</li>
<li><a href='/veille'>Veille</a></li>
<li><a href='/plan-du-site'>Plan du site</a></li>
<li><a href='/"rss.xml'>RSS</a></li>
<li><a href='/rss.xml'>RSS</a></li>
</ul>
<SocialRel />
</section>
</footer>
@ -39,4 +32,12 @@
font-weight: 500;
color: var(--color-blue);
}
.info {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
gap: var(--space-s);
text-align: left;
}
</style>

View File

@ -5,9 +5,15 @@ const { pageTitle } = Astro.props
<head>
<meta charset='utf-8' />
<link rel='icon' type='image/svg+xml' href='/favicon.svg' />
<link
rel='alternate'
type='application/rss+xml'
title='Nicolas Arduin'
href={new URL('rss.xml', Astro.site)}
/>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
<title>{pageTitle} - Nicolas Arduin</title>
<title>{pageTitle} | Nicolas Arduin</title>
<meta
name='description'
content='Développeur web spécialisé en accessibilité numérique et éco-conception à Toulouse. Création de sites web sur mesure, mise en conformité RGAA, maintenance, etc.'
@ -15,5 +21,5 @@ const { pageTitle } = Astro.props
<meta name='robots' content='index,follow.' />
<meta name='author' content='Nicolas Arduin' />
<meta name='subject' content='Développement de sites web, accessibilité.' />
<meta name='view-transition' content='same-origin' />
<meta name='fediverse:creator' content='@narduin@mastodon.tetaneutral.net' />
</head>

View File

@ -0,0 +1,12 @@
<ul class='flow' role='list'>
<li><a href='mailto:contact@nardu.in' rel='me'>contact@nardu.in</a></li>
<li>
<a href='tel:+33749464239' rel='me'>+337 49 46 42 39</a>
</li>
<li><a href='https://github.com/narduin' rel='me'>@narduin sur Github</a></li>
<li>
<a rel='me' href='https://mastodon.tetaneutral.net/@narduin'
>@narduin sur Mastodon</a
>
</li>
</ul>

View File

@ -1,13 +1,18 @@
---
title: Nico v3.0
subtitle: Update 2025.
subtitle: This website no longer has an english version..
lang: en
slug: en-2023
excerpt: So long i18n
slug: en-2025
excerpt: This website no longer has an english version.
tags: ['Freelance']
type: articles
createdAt: '2025-01-02T17:41:00.000Z'
---
## This website no longer has an english version.
## So long <code style="font-size: var(--size-2)">lang="en"</code>
I have maintained an english version of my website for some years. But the
I have maintained an english version of my website for some years but **no more…** The effort needed to make a fully multilingual website with Astro is just too much work for my small personal website.
**All previous content will remain online** ([articles](/articles/#en-articles) and [snippets](/fragments/#en-fragments)) but the interface and internal pages will only be in french.
I do not have any metrics on who visits my website but I don't think it will be missed. If you do miss it, don't hesitate to send me an email!

View File

@ -9,6 +9,8 @@ type: articles
createdAt: '2022-06-08T14:24:06.000Z'
---
<a href='/articles/en-2022/' lang='en'>This content exists in english.</a>
Après deux ans de freelance à temps plein, jai pris du recul sur mon activité. Jai surtout questionné mon positionnement et les prestations que je proposais.
## Les services

View File

@ -10,6 +10,8 @@ createdAt: '2023-02-03T17:41:00.000Z'
updatedAt: '2023-05-17T17:41:00.000Z'
---
<a href='/articles/en-2023/' lang='en'>This content exists in english.</a>
Cet article sera mis à jour lorsque j'aurai des nouveautés à partager au cours de l'année 2023.
## Le site

View File

@ -12,6 +12,8 @@ updatedAt: '2022-12-27T12:08:00.000Z'
import AstroImage from '../../../components/AstroImage.astro'
<a href='/articles/en-sci-hub-unblock/' lang='en'>This content exists in english.</a>
L'adresse actuelle de sci-hub est&nbsp;: <a href="https://www.sci-hub.st/" rel="noreferer noopener">sci-hub.st</a>
## Résumé de la situation

View File

@ -10,6 +10,8 @@ createdAt: '2020-10-08T07:47:36.000Z'
updatedAt: '2022-12-27T15:40:06.000Z'
---
<a href='/articles/en-the-day-I-jamd/' lang='en'>This content exists in english.</a>
import AstroImage from '../../../components/AstroImage.astro'
## La solution de non facilité

View File

@ -1,7 +1,7 @@
import rss from '@astrojs/rss'
import { getCollection } from 'astro:content'
export async function get(context) {
export async function GET(context) {
const articles = await getCollection('articles', ({ data }) => {
return data.lang === 'fr' && !data.draft
})

View File

@ -46,7 +46,7 @@ h3,
h4,
.h4 {
font-size: var(--size-2);
font-size: var(--size-1);
color: var(--color-dark);
}