diff options
Diffstat (limited to 'util/sitemap.sh')
-rwxr-xr-x | util/sitemap.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/sitemap.sh b/util/sitemap.sh new file mode 100755 index 0000000..643ed44 --- /dev/null +++ b/util/sitemap.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +url="${1%/}" +mdpath="$2" +htmlpath="${3#/}" + +date=$(git log -1 --format=%cs "$mdpath") + +cat <<_EOF +<url> +<loc>$(echo $url/$htmlpath)</loc> +<lastmod>$date</lastmod> +</url> +_EOF |