#!/usr/bin/env bash # Create an index page with all the tags declare tags_index declare template_tags_posts declare template_tags_posts_singular declare template_tags_posts_2_4 declare template_tags_title declare prefix_tags declare index_file declare template_archive_index_page declare global_author declare global_title all_tags() { echo -n "Creating an index page with all the tags " contentfile=$tags_index.$RANDOM while [[ -f $contentfile ]]; do contentfile=$tags_index.$RANDOM done { echo "

$template_tags_title

" echo "" echo "
$template_archive_index_page
" } 3>&1 > "$contentfile" create_html_page "$contentfile" "$tags_index.tmp" yes "$global_title — $template_tags_title" "$global_author" mv "$tags_index.tmp" "$tags_index" chmod 644 "$tags_index" rm "$contentfile" }