Fix onthispage plugin

This commit is contained in:
James Mills 2023-04-01 16:20:11 +10:00
parent 79aacde71a
commit 9f5a6b7b7b
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
if [ ! $# = 1 ]; then
printf >&2 "Usage: %s <path> [ext]\n" "$(basename "$0")"
exit 0

View File

@ -1,7 +1,9 @@
#!/bin/sh
#!/bin/bash
set -eo pipefail
{
echo "**On this page**"
echo
toc -a=false -d 2 -s 1 -p "$ZS_FILE"
toc -d 2 -s 1 "$ZS_FILE"
} | zs gen