vercors.me : correction de l'assembleur (robots.txt, sitemap)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cette révision appartient à :
1 Parent
c955635e4e
révision
11d44a563e
1 fichier modifié
+2
-6
@@ -26,13 +26,9 @@ def main():
|
||||
t = open(ip, encoding="utf-8").read()
|
||||
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)
|
||||
open(os.path.join(DEST, "robots.txt"), "w", encoding="utf-8").write("User-agent: *
|
||||
Allow: /
|
||||
Sitemap: https://vercors.me/sitemap.xml
|
||||
")
|
||||
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", "cgu", "confidentialite"))
|
||||
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>
|
||||
' % urls)
|
||||
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)
|
||||
for dossier in ("polices", "tuiles"):
|
||||
src = os.path.join(ICI, dossier)
|
||||
if os.path.isdir(src):
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur