2023-12-15 10:30:18 -05:00

17 lines
370 B
Bash

#! /run/current-system/sw/bin/bash
# Static runtime variables
SRC_DIR=src
PUBLIC_DIR=public
for content in $(find $SRC_DIR -type f)
do
output_file="$PUBLIC_DIR/$(echo "$content" | sed -e 's/src\///g' -e 's/md$/html/g')"
content_type=$(echo $content | awk -F/ '{ print $2 }')
mkdir -p $(dirname $output_file)
pandoc -o "$output_file" "$content"
done