96 lines
3.4 KiB
Bash
96 lines
3.4 KiB
Bash
#!/bin/bash
|
|
|
|
echo "=== SOCIOWIRE LOGOS + METADATA INSTALLER ==="
|
|
|
|
# --- REQUIRE Imagemagick ---
|
|
if ! command -v convert &> /dev/null
|
|
then
|
|
echo "Imagemagick non installé — installation..."
|
|
sudo apt install -y imagemagick
|
|
fi
|
|
|
|
# --- CREATE FOLDERS ---
|
|
mkdir -p public/icons
|
|
|
|
# --- COPY MASTER LOGO ---
|
|
|
|
# --- GENERATE ICONS ---
|
|
echo "Génération des icônes…"
|
|
|
|
convert public/icons/logo-master.png -resize 16x16 public/icons/favicon-16.png
|
|
convert public/icons/logo-master.png -resize 32x32 public/icons/favicon-32.png
|
|
convert public/icons/logo-master.png -resize 48x48 public/icons/favicon-48.png
|
|
convert public/icons/logo-master.png -resize 180x180 public/icons/apple-touch-icon.png
|
|
convert public/icons/logo-master.png -resize 192x192 public/icons/icon-192.png
|
|
convert public/icons/logo-master.png -resize 512x512 public/icons/icon-512.png
|
|
convert public/icons/logo-master.png -resize 1200x630 public/icons/og-image.png
|
|
|
|
echo "Icônes générées."
|
|
|
|
# --- ADD METADATA INTO index.html ---
|
|
echo "Injection des balises SEO et OpenGraph…"
|
|
|
|
sed -i '/<head>/a \
|
|
<!-- ===== SOCIOWIRE SEO + SHARE + ICONS ===== -->\
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16.png" />\
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32.png" />\
|
|
<link rel="icon" type="image/png" sizes="48x48" href="/icons/favicon-48.png" />\
|
|
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />\
|
|
<link rel="manifest" href="/manifest.json" />\
|
|
<meta name="theme-color" content="#0ea5e9" />\
|
|
<meta name="description" content="SocioWire — The real-time world feed. Live posts, geolocated events, discover everything happening right now." />\
|
|
<meta property="og:title" content="SocioWire — Wired to Life" />\
|
|
<meta property="og:description" content="Live posts from the world. Real-time events, map-based stories, and instant geolocated content." />\
|
|
<meta property="og:image" content="/icons/og-image.png" />\
|
|
<meta property="og:image:width" content="1200" />\
|
|
<meta property="og:image:height" content="630" />\
|
|
<meta property="og:type" content="website" />\
|
|
<meta property="og:url" content="https://sociowire.com" />\
|
|
<meta name="twitter:card" content="summary_large_image" />\
|
|
<meta name="twitter:title" content="SocioWire — Wired to Life" />\
|
|
<meta name="twitter:description" content="Share what you see. Discover what others are living — in real time." />\
|
|
<meta name="twitter:image" content="/icons/og-image.png" />\
|
|
<!-- ===== END META ===== -->\
|
|
' index.html
|
|
|
|
echo "Metadonnées ajoutées."
|
|
|
|
# --- INSTALL MANIFEST.JSON FOR PWA + GOOGLE + ANDROID ---
|
|
echo "Création du manifest.json…"
|
|
|
|
cat << 'EOF' > public/manifest.json
|
|
{
|
|
"name": "SocioWire",
|
|
"short_name": "SocioWire",
|
|
"description": "Real-time posts on a global map — wired to life.",
|
|
"start_url": "/",
|
|
"display": "standalone",
|
|
"background_color": "#020617",
|
|
"theme_color": "#0ea5e9",
|
|
"icons": [
|
|
{
|
|
"src": "/icons/icon-192.png",
|
|
"sizes": "192x192",
|
|
"type": "image/png"
|
|
},
|
|
{
|
|
"src": "/icons/icon-512.png",
|
|
"sizes": "512x512",
|
|
"type": "image/png"
|
|
}
|
|
]
|
|
}
|
|
EOF
|
|
|
|
echo "manifest.json généré."
|
|
|
|
echo "=== INSTALLATION TERMINÉE ==="
|
|
echo "Ton site a maintenant :"
|
|
echo "✔ Favicon"
|
|
echo "✔ Apple Touch Icon"
|
|
echo "✔ Android App Icon"
|
|
echo "✔ OpenGraph Facebook"
|
|
echo "✔ Twitter Card"
|
|
echo "✔ SEO Google complet"
|
|
echo "✔ PWA Manifest"
|