Page 404, llms.txt, balises méta (À propos) et bloc Caddy handle_errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cette révision appartient à :
1 Parent
edccda33a5
révision
6551843f28
9 fichiers modifiés
+263
-1
Aucun fichier ne correspond à votre recherche
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Assemble le site publiable de vercors.me dans <projet>/site-v2/ à partir de la maquette.
|
||||
|
||||
site-v2/index.html, a-propos.html, (cgu.html, confidentialite.html si présents), polices/, tuiles/, data/ (vide)
|
||||
site-v2/index.html, a-propos.html, 404.html, llms.txt, llms-full.txt, (cgu.html, confidentialite.html si présents), polices/, tuiles/, data/ (vide)
|
||||
Les JSON de données (data/*.json, data/semaine/) sont produits sur cornafserver et copiés sur le serveur public à part.
|
||||
Usage : python assembler.py
|
||||
"""
|
||||
@@ -28,6 +28,9 @@ def main():
|
||||
t = t.replace('<li><a href="cgu.html">CGU</a></li>', '').replace('<li><a href="confidentialite.html">Confidentialité</a></li>', '')
|
||||
t = t.replace('href="forum/index.html"', 'aria-disabled="true"').replace('href="forum/connexion.html"', 'aria-disabled="true"')
|
||||
open(ip, "w", encoding="utf-8").write(t)
|
||||
for fixe in ("404.html", "llms.txt", "llms-full.txt"):
|
||||
if os.path.exists(os.path.join(ICI, fixe)):
|
||||
shutil.copy(os.path.join(ICI, fixe), os.path.join(DEST, fixe))
|
||||
open(os.path.join(DEST, "robots.txt"), "w", encoding="utf-8").write("User-agent: *\nAllow: /\nSitemap: https://vercors.me/sitemap.xml\n")
|
||||
urls = "".join("<url><loc>https://vercors.me/%s</loc></url>" % u for u in ("", "a-propos"))
|
||||
open(os.path.join(DEST, "sitemap.xml"), "w", encoding="utf-8").write('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">%s</urlset>\n' % urls)
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur