qsgen2: Add option to update sitemaps only again

This commit is contained in:
Stig-Ørjan Smelror 2024-02-19 20:00:16 +01:00
parent 7abece6b6a
commit 14258f5b20

33
qsgen2
View File

@ -137,22 +137,6 @@ fi
blog_cache_file="${project_dir}/.blog_cache" blog_cache_file="${project_dir}/.blog_cache"
pages_cache_file="${project_dir}/.pages_cache" pages_cache_file="${project_dir}/.pages_cache"
case ${1} in
force)
_msg sub "_qsgen2_msg_2"
: >| "$blog_cache_file" # Truncate the blog cache before doing update
: >| "$pages_cache_file" # Truncate the page cache before doing update
;;
sitemap)
_msg sub "Updating sitemaps"
_sitemap
exit
;;
*)
# Nothing
;;
esac
# Let's check if qsgen2 can generate this site by checking if 'generator' is available # Let's check if qsgen2 can generate this site by checking if 'generator' is available
if [[ ! ${generator} ]] || [[ -d $(pwd)/.git ]]; then if [[ ! ${generator} ]] || [[ -d $(pwd)/.git ]]; then
_msg debug "_qsgen2_msg_3" _msg debug "_qsgen2_msg_3"
@ -1321,6 +1305,23 @@ function _zhtml() {
} }
case ${1} in
force)
_msg sub "_qsgen2_msg_2"
: >| "$blog_cache_file" # Truncate the blog cache before doing update
: >| "$pages_cache_file" # Truncate the page cache before doing update
;;
sitemap)
_msg sub "Updating sitemaps"
_sitemap
exit
;;
*)
# Nothing
;;
esac
_blogs _blogs
_pages _pages
_sitemap _sitemap