_sitemap: Removed html_files array by accident
This commit is contained in:
parent
e5c4b9ae3e
commit
b4d3fb036b
5
qsgen2
5
qsgen2
@ -942,6 +942,7 @@ function _sitemap() {
|
|||||||
# Find all HTML files and store them in an array
|
# Find all HTML files and store them in an array
|
||||||
# local -a html_files=("${(@f)$(find "${www_root}" -type f -name "*.html")}")
|
# local -a html_files=("${(@f)$(find "${www_root}" -type f -name "*.html")}")
|
||||||
builtin cd ${config[site_root]}
|
builtin cd ${config[site_root]}
|
||||||
|
local -a html_files=(**/[a-z]*.html(.))
|
||||||
local -a blog_files=()
|
local -a blog_files=()
|
||||||
local -a page_files=()
|
local -a page_files=()
|
||||||
for file in "${html_files[@]}"; do
|
for file in "${html_files[@]}"; do
|
||||||
@ -966,7 +967,7 @@ function _sitemap() {
|
|||||||
for file in "${blog_files[@]}"
|
for file in "${blog_files[@]}"
|
||||||
do
|
do
|
||||||
# Remove www_root from the path and prepend site_url
|
# 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/\..*$//')
|
local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//')
|
||||||
|
|
||||||
echo " <url>" >> ${sitemap_blog}
|
echo " <url>" >> ${sitemap_blog}
|
||||||
@ -995,7 +996,7 @@ function _sitemap() {
|
|||||||
for file in "${page_files[@]}"
|
for file in "${page_files[@]}"
|
||||||
do
|
do
|
||||||
# Remove www_root from the path and prepend site_url
|
# 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/\..*$//')
|
local lastmod=$(stat -c %y "${file}" 2>/dev/null | cut -d' ' -f1,2 | sed 's/ /T/' | sed 's/\..*$//')
|
||||||
|
|
||||||
echo " <url>" >> ${sitemap_page}
|
echo " <url>" >> ${sitemap_page}
|
||||||
|
Loading…
Reference in New Issue
Block a user