From b4d3fb036bc7bf5d087145482315842194b07569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Mon, 19 Feb 2024 19:55:00 +0100 Subject: [PATCH] _sitemap: Removed html_files array by accident --- qsgen2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qsgen2 b/qsgen2 index ae1eadc..d2e5829 100755 --- a/qsgen2 +++ b/qsgen2 @@ -942,6 +942,7 @@ function _sitemap() { # Find all HTML files and store them in an array # local -a html_files=("${(@f)$(find "${www_root}" -type f -name "*.html")}") builtin cd ${config[site_root]} + local -a html_files=(**/[a-z]*.html(.)) local -a blog_files=() local -a page_files=() for file in "${html_files[@]}"; do @@ -966,7 +967,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}" local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//') echo " " >> ${sitemap_blog} @@ -995,7 +996,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}" local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//') echo " " >> ${sitemap_page}