commit 43a12fb548aad13d7de8393452e9a55908a52477
parent 9eb67b7115d69275f78ceb7501078b30374830f3
Auteur: Selve <selve@asteride.xyz>
Date: Sun, 22 Oct 2023 23:44:31 -0400
[cont] changement de l'URL du sitemap dans robots.txt
Elle varie maintenant selon le protocol.
Diffstat:
5 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/construire.sh b/construire.sh
@@ -40,6 +40,20 @@ humans() {
$tous "$DOS_SRC/$inter" >"$DOS_DST/$1/$dst"
}
+# $1 protocol
+# $2 destination
+robots.txt() {
+ special="$DOS_SRC/robots.special.debout"
+ dst="$DOS_DST/$1/robots.txt"
+ plus_jeune "$dst" "$special" "$FCH_LIENS_STD" || return 0
+ echo "$special -> $dst"
+ aplat <"$special" | exclure -vdest="$2" | \
+ awk -v fichier="$DOS_LIENS/$1" \
+ -f "$DOS_LIB/general.awk" \
+ -f "$DOS_LIB/liens_rempl.awk" | \
+ awk -f "$DOS_LIB/general.awk" -f "$DOS_LIB/robots.awk" >"$dst"
+}
+
style() {
special="style.special.cp"
dst="${special%.special.cp}.css"
@@ -116,6 +130,7 @@ gemini() {
liens_std "gemini" "gmi"
gen_aplat "gemini" "gemini"
hierarchie "gemini"
+ robots.txt "gemini" "gemini"
copier "gemini"
gen_final "gemini" "gemtext" "gmi"
humans "gemini"
@@ -126,6 +141,7 @@ http() {
liens_std "http" "html"
gen_aplat "http" "web"
hierarchie "http"
+ robots.txt "http" "web"
copier "http"
gen_final "http" "html" "html"
humans "http"
@@ -138,6 +154,7 @@ https() {
liens_std "https" "html"
gen_aplat "https" "web"
hierarchie "https"
+ robots.txt "https" "web"
copier "https"
gen_final "https" "html" "html"
humans "https"
diff --git a/lib/robots.awk b/lib/robots.awk
@@ -0,0 +1,12 @@
+etq("^:doc:$") && ouvrante() {
+ metadonnees_lire()
+}
+
+{
+ intervalle()
+}
+
+etq("^:doc:$") && fermante() {
+ ramasser("\n")
+ metadonnees_supp($1)
+}
diff --git a/liens/liens.debout b/liens/liens.debout
@@ -17,6 +17,8 @@
"://asteride.xyz/~selve/articles/avant-propos.")
(lien (@ (id "ART_A_VISITER"))
"://asteride.xyz/~selve/articles/a_visiter.")
+ (lien (@ (id "SITEMAP.TXT"))
+ "://asteride.xyz/~selve/sitemap.txt")
(lien (@ (id "EXT_GAMIFICAT"))
"://gamifi.cat/")
diff --git a/src/robots.special.debout b/src/robots.special.debout
@@ -0,0 +1,8 @@
+(doc (@ (césure "pre")
+ (type "robots.txt")
+ (date-pub "2021-12-21")
+ (date-mod "2023-10-22"))
+"User-agent: *
+Disallow: /LICENSE.txt
+
+Sitemap: "(lien (@ (ref (std "SITEMAP.TXT")))))
diff --git a/src/robots.txt.cp b/src/robots.txt.cp
@@ -1,4 +0,0 @@
-User-agent: *
-Disallow: /LICENSE.txt
-
-Sitemap: http://asteride.xyz/~selve/sitemap.txt