Had to fix an issue with the get-last-5-posts function. It was providing the first 5 posts retrieved instead of the last

This commit is contained in:
Tristan Ancelet 2023-11-18 16:10:08 -06:00
parent e69fad1184
commit f92e5e9f17

View File

@ -37,8 +37,8 @@ function get_last_5_pages (){
VAR=( ${pages[@]} )
else
## Otherwise, itterate through the last 5 blog posts
INDEX=-5
while [[ $INDEX -ne 0 ]]; do
INDEX=0
while [[ $INDEX -ne 5 ]]; do
VAR+=( "${pages[$INDEX]}" )
## Increment the index so that we get closer and closer to end of the list
((INDEX++))