Merge remote-tracking branch 'origin/main'
Some checks failed
Version Static Assets / version-assets (push) Has been cancelled

# Conflicts:
#	www/index.html
This commit is contained in:
2026-01-21 18:10:40 +01:00
8 changed files with 3415 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
name: Version Static Assets
on:
push:
branches:
- main
paths:
- 'script.js'
- 'styles.css'
- 'logo.png'
- 'index.html'
- 'version-assets.sh'
- '.github/workflows/version-assets.yml'
jobs:
version-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.APP_SECRET }}
fetch-depth: 0
- name: Delete old versioned assets
run: |
echo "🗑️ Borrando archivos hasheados antiguos..."
rm -f *.*.js *.*.css *.*.png || true
git add -A
- name: Run asset versioning
run: |
chmod +x version-assets.sh
./version-assets.sh
- name: Check for changes
id: check_changes
run: |
if git diff --quiet && git diff --cached --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT
echo "No hay cambios para commitear"
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push versioned assets
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --local user.email "ci@dariosevilla.es"
git config --local user.name "CI Action"
git add *.*.js *.*.css *.*.png index.html
git commit -m "chore: update asset versions [skip ci]"
git push

BIN
logo.78f51359.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

18
robots.txt Normal file
View File

@@ -0,0 +1,18 @@
# Robots.txt for Juego del Impostor
# https://impostor.dariosevilla.es
User-agent: *
Allow: /
# Sitemap location
Sitemap: https://impostor.dariosevilla.es/sitemap.xml
# Allow all crawlers to access the main content
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
# Crawl-delay for polite crawling (optional)
Crawl-delay: 1

1347
script.f88d8968.js Normal file

File diff suppressed because it is too large Load Diff

13
sitemap.xml Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://impostor.dariosevilla.es/</loc>
<lastmod>2026-01-17</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
<xhtml:link rel="alternate" hreflang="es" href="https://impostor.dariosevilla.es/"/>
<xhtml:link rel="alternate" hreflang="en" href="https://impostor.dariosevilla.es/?lang=en"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://impostor.dariosevilla.es/"/>
</url>
</urlset>

1829
styles.1a37b506.css Normal file

File diff suppressed because it is too large Load Diff

80
version-assets.sh Executable file
View File

@@ -0,0 +1,80 @@
#!/bin/bash
# Script de versionado de archivos estáticos
# Genera hashes basados en el contenido y actualiza referencias en HTML
set -e
echo "🚀 Iniciando versionado de archivos estáticos..."
echo ""
# Archivos a versionar
ASSETS=("script.js" "styles.css" "logo.png")
HTML_FILE="index.html"
# Función para generar hash MD5 de un archivo
generate_hash() {
local file=$1
md5sum "$file" | cut -c1-8
}
# Función para obtener el nombre versionado
get_versioned_name() {
local file=$1
local hash=$2
local base="${file%.*}"
local ext="${file##*.}"
echo "${base}.${hash}.${ext}"
}
# Limpiar archivos versionados antiguos
echo "🗑️ Limpiando versiones antiguas..."
rm -f *.*.js *.*.css *.*.png 2>/dev/null || true
echo ""
# Crear backup del HTML
cp "$HTML_FILE" "${HTML_FILE}.bak"
# Versionar cada archivo
for asset in "${ASSETS[@]}"; do
if [[ ! -f "$asset" ]]; then
echo "⚠️ Advertencia: $asset no encontrado, saltando..."
continue
fi
# Generar hash
hash=$(generate_hash "$asset")
versioned=$(get_versioned_name "$asset" "$hash")
# Copiar archivo con versión
echo "📦 Versionando: $asset$versioned"
cp "$asset" "$versioned"
# Obtener nombre base y extensión para el patrón
base="${asset%.*}"
ext="${asset##*.}"
# Actualizar referencia en HTML (busca versión original o hasheada)
case "$asset" in
*.js)
sed -i -E "s|src=\"${base}(\.[a-f0-9]{8})?\.${ext}\"|src=\"${versioned}\"|g" "$HTML_FILE"
;;
*.css)
sed -i -E "s|href=\"${base}(\.[a-f0-9]{8})?\.${ext}\"|href=\"${versioned}\"|g" "$HTML_FILE"
;;
*.png)
sed -i -E "s|href=\"${base}(\.[a-f0-9]{8})?\.${ext}\"|href=\"${versioned}\"|g" "$HTML_FILE"
sed -i -E "s|src=\"${base}(\.[a-f0-9]{8})?\.${ext}\"|src=\"${versioned}\"|g" "$HTML_FILE"
;;
esac
echo "✏️ Actualizado: $asset$versioned en $HTML_FILE"
echo ""
done
# Limpiar backup
rm -f "${HTML_FILE}.bak"
echo "✅ Versionado completado exitosamente!"
echo ""
echo "📋 Archivos versionados:"
ls -1 *.*.{js,css,png} 2>/dev/null || echo " (ninguno)"

View File

@@ -3,10 +3,83 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>Juego del Impostor</title> <title>Juego del Impostor - Juego de Rol Gratis Online | Encuentra al Impostor</title>
<!-- SEO Meta Tags -->
<meta name="description" content="Juego del Impostor: un emocionante juego de rol social gratuito para 3-10 jugadores. Descubre quién es el impostor antes de que sea tarde. Sin descargas, juega desde el navegador.">
<meta name="keywords" content="juego del impostor, impostor game, juego de rol, juego social, juego gratis, juego online, juego de palabras, juego de deducción, juego para fiestas, juego multijugador, among us estilo">
<meta name="author" content="Darío Sevilla">
<meta name="robots" content="index, follow">
<meta name="theme-color" content="#1a1a2e">
<link rel="canonical" href="https://impostor.dariosevilla.es/">
<link rel="alternate" hreflang="es" href="https://impostor.dariosevilla.es/">
<link rel="alternate" hreflang="en" href="https://impostor.dariosevilla.es/?lang=en">
<link rel="alternate" hreflang="x-default" href="https://impostor.dariosevilla.es/">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://impostor.dariosevilla.es/">
<meta property="og:title" content="Juego del Impostor - Juego de Rol Social Gratis">
<meta property="og:description" content="¿Podrás descubrir quién es el impostor? Juego de deducción social gratuito para 3-10 jugadores. Sin descargas, juega directamente en tu navegador.">
<meta property="og:image" content="https://impostor.dariosevilla.es/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:locale" content="es_ES">
<meta property="og:locale:alternate" content="en_US">
<meta property="og:site_name" content="Juego del Impostor">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://impostor.dariosevilla.es/">
<meta name="twitter:title" content="Juego del Impostor - Juego de Rol Social Gratis">
<meta name="twitter:description" content="¿Podrás descubrir quién es el impostor? Juego de deducción social para 3-10 jugadores. Sin descargas.">
<meta name="twitter:image" content="https://impostor.dariosevilla.es/og-image.png">
<!-- Additional SEO -->
<meta name="application-name" content="Juego del Impostor">
<meta name="apple-mobile-web-app-title" content="Impostor">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<!-- Structured Data JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Juego del Impostor",
"alternateName": "The Impostor Game",
"description": "Juego de rol social gratuito donde los jugadores deben descubrir quién es el impostor usando pistas y deducción.",
"url": "https://impostor.dariosevilla.es/",
"applicationCategory": "GameApplication",
"operatingSystem": "Web Browser",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "EUR"
},
"author": {
"@type": "Person",
"name": "Darío Sevilla",
"url": "https://dariosevilla.es"
},
"inLanguage": ["es", "en"],
"genre": ["Party Game", "Social Deduction", "Word Game"],
"numberOfPlayers": {
"@type": "QuantitativeValue",
"minValue": 3,
"maxValue": 10
}
}
</script>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Crimson+Text:wght@600;700&family=Courier+Prime:wght@400;700&family=JetBrains+Mono:wght@400;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Crimson+Text:wght@600;700&family=Courier+Prime:wght@400;700&family=JetBrains+Mono:wght@400;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.1a37b506.css">
<link rel="icon" type="image/png" href="logo.78f51359.png">
<link rel="sitemap" type="application/xml" href="/sitemap.xml">
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="styles.css">
<link rel="icon" type="image/png" href="logo.png"> <link rel="icon" type="image/png" href="logo.png">
<link rel="manifest" href="manifest.webmanifest"> <link rel="manifest" href="manifest.webmanifest">