We want to actually find things

This commit is contained in:
Stig-Ørjan Smelror 2024-01-30 09:18:59 +01:00
parent 19a2e5bef3
commit 44bfc364a7

6
qsgen2
View File

@ -343,13 +343,13 @@ function _pages() {
# Look for links, images and videos and convert them if present.
if (${debug}) echo "_pages: Checking for #link, #showimg and #ytvideo in page_content"
if [[ $( cat ${www_root}/${pages_title_lower%.*}.html | grep \#link ) ]]; then
if [[ $( grep \#link ${page_content} ) ]]; then
echo "If #link is present, run _link: page_content"
page_content=$( _link "${page_content}" )
elif [[ $( cat ${www_root}/${pages_title_lower%.*}.html | grep \#showimg ) ]]; then
elif [[ $( echo ${page_content} | grep \#showimg ) ]]; then
echo "If #showimg is present, run _image: page_content"
page_content=$( _image "${page_content}" )
elif [[ $( cat ${www_root}/${pages_title_lower%.*}.html | grep \#ytvideo ) ]]; then
elif [[ $( echo ${page_content} | grep \#ytvideo ) ]]; then
echo "If #ytvideo is present, run _youtube: page_content"
page_content=$( _youtube "${page_content}" )
fi