From 6a138075fbb2c5ca3539b1473d51aeaa6fac718b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Mon, 19 Feb 2024 19:31:37 +0100 Subject: [PATCH] _sitemap: Missing / in sitemap links --- qsgen2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qsgen2 b/qsgen2 index 9a781cd..868a0fc 100755 --- a/qsgen2 +++ b/qsgen2 @@ -951,7 +951,7 @@ function _sitemap() { local -a xml_files=([a-z]*.xml(.)) for file in "${xml_files[@]}"; do - [[ $file != *sitemap.xml* ]] && xml_files+=("$file") + [[ $file != *sitemap.* ]] && xml_files+=("$file") done # Start of the XML file for BLOGS @@ -968,7 +968,7 @@ function _sitemap() { for file in "${blog_files[@]}" do # Remove www_root from the path and prepend site_url - local url="${site_url}${file#$www_root}" + local url="${site_url}/${file#$www_root}" local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//') echo " " >> ${sitemap_blog} @@ -997,7 +997,7 @@ function _sitemap() { for file in "${page_files[@]}" do # Remove www_root from the path and prepend site_url - local url="${site_url}${file#$www_root}" + local url="${site_url}/${file#$www_root}" local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//') echo " " >> ${sitemap_page} @@ -1026,7 +1026,7 @@ function _sitemap() { for file in "${xml_files[@]}" do # Remove www_root from the path and prepend site_url - local url="${site_url}${file#$www_root}" + local url="${site_url}/${file#$www_root}" local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//') echo " " >> ${sitemap_file}