this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

♿ ️Correctly set lang attribute on html tag

Signed-off-by: Gwenn Le Bihan <gwenn.lebihan7@gmail.com>

+5 -1
+4 -1
src/layouts/Layout.astro
··· 10 10 --- 11 11 12 12 <!doctype html> 13 - <html lang="en" style={setCssColors(Astro.props.colors)}> 13 + <html 14 + lang={Astro.locals.locale || Astro.locals.lang} 15 + style={setCssColors(Astro.props.colors)} 16 + > 14 17 <head> 15 18 <meta charset="UTF-8" /> 16 19 <meta name="viewport" content="width=device-width" />
+1
src/middleware.ts
··· 4 4 5 5 export const onRequest = defineMiddleware(async ({ locals, url }, next) => { 6 6 locals.lang = process.env.LANG === "fr" ? "fr" : "en"; 7 + locals.locale = process.env.LOCALE; 7 8 const response = await next(); 8 9 const dom = new JSDOM(await response.text(), { 9 10 url: url.toString(),