LogSource/lib/functions/subshell/build_page_tree.sh
Wheaterwax 0faf445b39
Some checks are pending
Deploy Arise to html branch / Deploy Arise (push) Waiting to run
initial commit with stuff from arise
2025-09-01 18:57:24 -03:00

22 lines
671 B
Bash

#!/bin/bash
#############
# DESCRIPTION
#############
# Builds all pages on the site by calling "build_page" for every markdown file it can find outside of /config.
#
# Note that this function actually takes the root site directory to recursively build from as an argument.
#
#############
# Usage:
# build_page /path/to/arise-out/
build_page_tree() (
cd $1
find . -type f -name "index.md" -not \( -path ./config -prune \) | while read fname; do
build_page $fname
# Add the source file to the list of files to remove in cleanup
echo "$(realpath $fname)" >> $removelist
done
)