11---
22import { languages , isRtl } from ' ../i18n/config' ;
33import ThemeToggle from ' ../components/ThemeToggle.astro' ;
4- import { glob } from ' node:fs/promises' ;
54
65interface Props {
76 title: string ;
@@ -16,15 +15,6 @@ const {
1615} = Astro .props ;
1716
1817const dir = isRtl (lang ) ? " rtl" : " ltr" ;
19-
20- // Pick a random lockdown image at build time for social media previews
21- const lockdownImages: string [] = [];
22- for await (const entry of glob (' public/img/lockdowns/*.{png,jpg,jpeg,webp}' )) {
23- lockdownImages .push (entry .replace (/ ^ public/ , ' ' ));
24- }
25- const ogImage = lockdownImages .length > 0
26- ? ` https://keepandroidopen.org${lockdownImages [Math .floor (Math .random () * lockdownImages .length )]} `
27- : ' https://keepandroidopen.org/img/keepandroidopen.png' ;
2818---
2919<!DOCTYPE html >
3020<html lang ={ lang } dir ={ dir } >
@@ -33,16 +23,11 @@ const ogImage = lockdownImages.length > 0
3323 <meta charset =" UTF-8" >
3424 <meta http-equiv =" X-UA-Compatible" content =" IE=edge" >
3525 <meta name =" viewport" content =" width=device-width, initial-scale=1" >
36- <meta name =" viewport" content =" width=device-width, initial-scale=1" >
3726 <meta name =" color-scheme" content =" light dark" >
3827 <meta name =" description" content ={ description } >
3928 <meta property =" og:title" content ={ title } >
4029 <meta property =" og:description" content ={ description } >
41- <meta property =" og:image" content ={ ogImage } >
4230 <meta property =" og:type" content =" website" >
43- <meta name =" twitter:card" content =" summary" >
44- <meta name =" twitter:title" content ={ title } >
45- <meta name =" twitter:image" content ={ ogImage } >
4631 <link rel =" me" href =" https://techhub.social/@keepandroidopen" >
4732 <link rel =" stylesheet" href =" /css/pico.min.css" >
4833
0 commit comments