robots.txt en ASCII ; déploiement : annoncer l'encodage UTF-8 des fichiers texte (llms.txt, sitemap)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tony AVERTY 2026-10-09 13:44:19 +02:00
parent b0d40b911f
commit df89a04487
3 changed files with 14 additions and 6 deletions

View file

@ -104,6 +104,13 @@ Les liens montrés aux clients (QR d'inscription `/c/<slug>`, lien de la carte `
client_max_body_size 1m;
}
```
Toujours dans ce bloc `server` (port 8080), annoncer l'encodage UTF-8 des fichiers texte, sinon les accents de
`llms.txt`, `llms-full.txt` et du plan du site s'affichent mal (« é ») :
```nginx
charset utf-8;
charset_types text/plain text/xml text/css application/javascript application/json;
```
Vérification : `curl -sI https://monespacepro.eu/llms.txt | grep -i content-type` doit afficher `text/plain; charset=utf-8`.
3. SSL/TLS → Let's Encrypt (ou certificat d'origine Cloudflare si le proxy orange est activé, mode SSL **Full (strict)**).
4. Dans le `.env` de l'API : `WEB_URL=https://monespacepro.eu`, puis fichier `RESTART`.

View file

@ -643,9 +643,10 @@ function build(OUT) {
const DISALLOW = ['/api/', '/carte/', '/espace', '/abonnement/'];
const AI_BOTS = ['GPTBot', 'OAI-SearchBot', 'ChatGPT-User', 'ClaudeBot', 'Claude-SearchBot', 'Claude-User', 'PerplexityBot', 'Perplexity-User', 'Google-Extended', 'Applebot-Extended', 'Bingbot', 'DuckAssistBot', 'MistralAI-User', 'Meta-ExternalAgent'];
const rules = DISALLOW.map((d) => `Disallow: ${d}`).join('\n');
fs.writeFileSync(path.join(OUT, 'robots.txt'), `# ${NAME} — consignes aux robots
# Le site public est ouvert à tous les moteurs de recherche et assistants IA.
# Présentation pour les IA : ${BASE}/llms.txt
// ASCII uniquement : le fichier reste lisible même si le serveur n'annonce pas l'encodage UTF-8.
fs.writeFileSync(path.join(OUT, 'robots.txt'), `# ${NAME} - robots.txt
# Public site open to all search engines and AI assistants.
# Presentation for AI assistants: ${BASE}/llms.txt
User-agent: *
Allow: /

View file

@ -1,6 +1,6 @@
# MonEspacePro — consignes aux robots
# Le site public est ouvert à tous les moteurs de recherche et assistants IA.
# Présentation pour les IA : https://monespacepro.eu/llms.txt
# MonEspacePro - robots.txt
# Public site open to all search engines and AI assistants.
# Presentation for AI assistants: https://monespacepro.eu/llms.txt
User-agent: *
Allow: /