Working on _blog_idx_for_index

This commit is contained in:
Stig-Ørjan Smelror 2024-01-30 12:41:06 +01:00
parent 15d458b909
commit d5ec8b51c8

13
qsgen2
View File

@ -491,7 +491,8 @@ function _blogs() {
BLOG_META_STR_ARRAY=() BLOG_META_STR_ARRAY=()
# Iterate over make_blog_array # Iterate over make_blog_array
for blog in "${make_blog_array[@]}"; do for blog in "${make_blog_array[@]}"
do
local content="$(<"${blog}")" local content="$(<"${blog}")"
sdate=( $( echo ${content} | grep DATE | sed "s|DATE\ ||" | sed "s|\-|\ |g" ) ) sdate=( $( echo ${content} | grep DATE | sed "s|DATE\ ||" | sed "s|\-|\ |g" ) )
@ -502,11 +503,11 @@ 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"
echo "_blogs: get_index: Date = ${sdate[@]}" #echo "_blogs: get_index: Date = ${sdate[@]}"
echo "_blogs: get_index: URL = ${blog_url}" #echo "_blogs: get_index: URL = ${blog_url}"
echo "_blogs: get_index: Title = ${btitle}" #echo "_blogs: get_index: Title = ${btitle}"
echo "_blogs: get_index: Ingress = ${ingress}" #echo "_blogs: get_index: Ingress = ${ingress}"
exit #exit
if ${debug}; then echo "_blogs: Adding data for ${blog} to array"; fi if ${debug}; then echo "_blogs: Adding data for ${blog} to array"; fi