You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.1 KiB
65 lines
2.1 KiB
[(#REM) |
|
|
|
Surcharge du Sitemap fournit en défaut par SPIP pour integrer les images |
|
|
|
Intégration des images |
|
https://support.google.com/webmasters/answer/178636?hl=fr |
|
|
|
Inspire du travail d'orsal |
|
https://www.orsal.fr/Sitemap-avec-images-pour-SPIP |
|
|
|
Exemple tres simple de sitemap.xml accessible via URL_SITE_SPIP/sitemap.xml |
|
(copier htaccess.txt en .htaccess pour en beneficier) |
|
|
|
Parametre |
|
- annee (facultatif) permet de lister les items par annee |
|
|
|
(On pose un cache a zero pour echapper au test _IS_BOT) |
|
|
|
|
|
]#CACHE{0} |
|
#HTTP_HEADER{Content-Type: text/xml; charset=utf-8} |
|
<?xml version="1.0" encoding="UTF-8"?> |
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" |
|
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"> |
|
[(#REM) Accueil] |
|
<url> |
|
<loc>#URL_SITE_SPIP</loc> |
|
<BOUCLE_maj(ARTICLES){tout}{!par date_modif}{0,1}>[(#DATE_MODIF|?{[<lastmod>(#DATE_MODIF|date_iso)</lastmod>]})]</BOUCLE_maj> |
|
<changefreq>hourly</changefreq> |
|
<priority>1.0</priority> |
|
</url> |
|
|
|
[(#REM) Rubriques] |
|
<BOUCLE_r(RUBRIQUES){racine}{0,1000}> |
|
<url> |
|
[<loc>(#URL_RUBRIQUE|url_absolue)</loc>] |
|
[<image:image> |
|
<image:loc>#URL_SITE_SPIP/(#LOGO_RUBRIQUE|extraire_attribut{src}|supprimer_timestamp)</image:loc> |
|
[<image:title>(#TITRE|trim|textebrut)</image:title>] |
|
</image:image>] |
|
</url> |
|
</BOUCLE_r> |
|
|
|
[(#REM) Articles] |
|
<BOUCLE_a(ARTICLES){annee?}{!par date_modif}{!par date}{0,2000}> |
|
<url> |
|
<loc>[(#URL_ARTICLE|url_absolue)]</loc> |
|
<lastmod>[(#DATE_MODIF|date_iso)]</lastmod> |
|
<changefreq>weekly</changefreq> |
|
<priority>[(#POPULARITE|div{100})]</priority> |
|
[<image:image> |
|
<image:loc>#URL_SITE_SPIP/(#LOGO_ARTICLE|extraire_attribut{src}|supprimer_timestamp)</image:loc> |
|
[<image:title>(#TITRE|trim|textebrut)</image:title>] |
|
</image:image>] |
|
<BOUCLE_mesimages(DOCUMENTS){id_article}{doublons}{extension IN jpg,gif,png}{0,1000}><image:image> |
|
<image:loc>[(#URL_DOCUMENT|url_absolue)]</image:loc> |
|
[<image:caption>(#DESCRIPTIF|trim|textebrut)</image:caption>] |
|
[<image:title>(#TITRE|trim|sinon{#FICHIER|basename|titre_naturel}|textebrut)</image:title>] |
|
</image:image></BOUCLE_mesimages> |
|
</url> |
|
</BOUCLE_a> |
|
|
|
|
|
|
|
</urlset> |