Working on _blog_idx_for_index
This commit is contained in:
parent
fac9789732
commit
7d964e7a1b
27
qsgen2
27
qsgen2
@ -409,6 +409,9 @@ function _blogs() {
|
||||
|
||||
if (( ${#make_blog_array[@]} > 0 )); then
|
||||
|
||||
# Declare the array to hold metadata strings for each blog
|
||||
BLOG_META_STR_ARRAY=()
|
||||
|
||||
# Regular blog creation process
|
||||
#if [[ ! ${mode} ]]; then
|
||||
|
||||
@ -440,6 +443,13 @@ function _blogs() {
|
||||
blog_dir="/blog/${sdate[2]}/${sdate[3]:l}/${sdate[4]}"
|
||||
blog_url="${blog_dir}/${blog_index}.html"
|
||||
|
||||
if (${debug}) echo "_blogs: Adding data for ${blog} to array"
|
||||
|
||||
# Concatenate all metadata into a single string for the current blog
|
||||
local metadata_str="SDATE: ${sdate[@]}||BTITLE: ${btitle}||INGRESS: ${ingress}||URL: ${blog_url}"
|
||||
# Append this metadata string to the array
|
||||
BLOG_META_STR_ARRAY+=("${metadata_str}")
|
||||
|
||||
if (${debug}) echo "_blogs: Processing ${blog}"
|
||||
|
||||
echo "${green}Generating blog ${blog_index}.html${end}"
|
||||
@ -488,9 +498,6 @@ function _blogs() {
|
||||
|
||||
#else
|
||||
|
||||
# Declare the array to hold metadata strings for each blog
|
||||
BLOG_META_STR_ARRAY=()
|
||||
|
||||
# Iterate over make_blog_array
|
||||
#for blog_to_index in "${#make_blog_array[@]}"
|
||||
#do
|
||||
@ -503,22 +510,10 @@ function _blogs() {
|
||||
#blog_dir="/blog/${sdate[2]}/${sdate[3]:l}/${sdate[4]}"
|
||||
#blog_url="${blog_dir}/${blog_index}.html"
|
||||
|
||||
if ${debug}; then echo "_blogs: Adding data for ${blog} to array"; fi
|
||||
|
||||
# Concatenate all metadata into a single string for the current blog
|
||||
local metadata_str="SDATE: ${sdate[@]}||BTITLE: ${btitle}||INGRESS: ${ingress}||URL: ${blog_url}"
|
||||
|
||||
# Append this metadata string to the array
|
||||
BLOG_META_STR_ARRAY+=("${metadata_str}")
|
||||
#done
|
||||
|
||||
done
|
||||
# Now BLOG_META_STR_ARRAY contains the metadata string for each blog post
|
||||
export BLOG_META_STR_ARRAY
|
||||
|
||||
done
|
||||
|
||||
#fi
|
||||
|
||||
else
|
||||
echo "${yellow}No new or updated Blogs detected.${end}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user