| This is a Makefile snippet
that you can use to create a sitemap.xml file |
| PAGES += $(wildcard *.html) PAGES += $(wildcard */*.html) SITEMAP = sitemap.xml SITEMAPGZ = $(SITEMAP:%=%.gz) $(SITEMAP) : $(PAGES) @-rm -f $@ @echo '<?xml version="1.0" encoding="UTF-8"?>' >> $@ @echo '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">' >> $@ @for name in $(PAGES) ; do \ m=`stat --format="%y" $$name` ;\ echo "<url><loc>$(URL)/$$name</loc><lastmod>$$m</lastmod></url>" >> $@ ;\ done @echo '</urlset>' >> $@ |
|
|
email any comments
to:
![]() |