diff --git a/kewt.sh b/kewt.sh index 7a02d5c..6928c6c 100755 --- a/kewt.sh +++ b/kewt.sh @@ -761,7 +761,7 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while has_list="false" if [ -f "$dir/index.md" ]; then has_custom_index="true" - if grep -q '{{LIST}}' "$dir/index.md" 2>/dev/null; then + if grep -q '^[[:space:]]*{{LIST}}[[:space:]]*$' "$dir/index.md" 2>/dev/null; then has_list="true" fi fi @@ -885,7 +885,7 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while if [ "$has_custom_index" = "true" ]; then awk ' - /\{\{LIST\}\}/ { + /^[[:space:]]*\{\{LIST\}\}[[:space:]]*$/ { while((getline line < "'"$temp_list"'") > 0) print line close("'"$temp_list"'") next @@ -925,7 +925,7 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type f -print" | sort | while template.html|site.conf|style.css|styles.css) continue ;; esac - if [ "${file##*/}" = "index.md" ] && grep -q '{{LIST}}' "$file" 2>/dev/null; then + if [ "${file##*/}" = "index.md" ] && grep -q '^[[:space:]]*{{LIST}}[[:space:]]*$' "$file" 2>/dev/null; then continue fi diff --git a/site/Docs/configuration.md b/site/Docs/configuration.md new file mode 100644 index 0000000..d437ac3 --- /dev/null +++ b/site/Docs/configuration.md @@ -0,0 +1,37 @@ +# Configuration + +## Dot Files + +- `.kewtignore` - files/directories to ignore completely. If the file is empty, the whole directory gets ignored. +- `.kewthide` - files/directories to hide from navigation but still process. Same empty-file rules as `.kewtignore`. +- `.kewtpreserve` - files/directories to copy as-is without converting markdown to HTML. Same empty-file rules again. + +## Frontmatter + +You can set metadata for a page using a `site.conf`-style frontmatter block at the very top of `.md` files: + +```conf +--- +title = "Custom Page Title" +date = "2026-03-23 11:32" +draft = false +--- +``` +- `title` - overrides the page title, post name in index links, and RSS `