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
|
if (( ${#make_blog_array[@]} > 0 )); then
|
||||||
|
|
||||||
|
# Declare the array to hold metadata strings for each blog
|
||||||
|
BLOG_META_STR_ARRAY=()
|
||||||
|
|
||||||
# Regular blog creation process
|
# Regular blog creation process
|
||||||
#if [[ ! ${mode} ]]; then
|
#if [[ ! ${mode} ]]; then
|
||||||
|
|
||||||
@ -440,6 +443,13 @@ function _blogs() {
|
|||||||
blog_dir="/blog/${sdate[2]}/${sdate[3]:l}/${sdate[4]}"
|
blog_dir="/blog/${sdate[2]}/${sdate[3]:l}/${sdate[4]}"
|
||||||
blog_url="${blog_dir}/${blog_index}.html"
|
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}"
|
if (${debug}) echo "_blogs: Processing ${blog}"
|
||||||
|
|
||||||
echo "${green}Generating blog ${blog_index}.html${end}"
|
echo "${green}Generating blog ${blog_index}.html${end}"
|
||||||
@ -488,9 +498,6 @@ function _blogs() {
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
# Declare the array to hold metadata strings for each blog
|
|
||||||
BLOG_META_STR_ARRAY=()
|
|
||||||
|
|
||||||
# Iterate over make_blog_array
|
# Iterate over make_blog_array
|
||||||
#for blog_to_index in "${#make_blog_array[@]}"
|
#for blog_to_index in "${#make_blog_array[@]}"
|
||||||
#do
|
#do
|
||||||
@ -503,22 +510,10 @@ function _blogs() {
|
|||||||
#blog_dir="/blog/${sdate[2]}/${sdate[3]:l}/${sdate[4]}"
|
#blog_dir="/blog/${sdate[2]}/${sdate[3]:l}/${sdate[4]}"
|
||||||
#blog_url="${blog_dir}/${blog_index}.html"
|
#blog_url="${blog_dir}/${blog_index}.html"
|
||||||
|
|
||||||
if ${debug}; then echo "_blogs: Adding data for ${blog} to array"; fi
|
done
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Now BLOG_META_STR_ARRAY contains the metadata string for each blog post
|
# Now BLOG_META_STR_ARRAY contains the metadata string for each blog post
|
||||||
export BLOG_META_STR_ARRAY
|
export BLOG_META_STR_ARRAY
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
#fi
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "${yellow}No new or updated Blogs detected.${end}"
|
echo "${yellow}No new or updated Blogs detected.${end}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user