Make more reliable and include filename in article tags

This commit is contained in:
Anthony Rose 2025-03-03 16:38:20 +00:00
parent ce6a5cc865
commit 74e3e95a98

View file

@ -11,11 +11,11 @@ cat << __EOF__
</head>
<body>
__EOF__
shift # Drop the first argument (document title).
for i in $(seq 1 $#)
while shift
do
echo '<article>'
cmark --to html --nobreaks --unsafe --smart --validate-utf8 $(eval echo \$$i)
test -n "$1" || break # No more files.
echo "<article data-filename=\"$(basename "$1")\">"
cmark --to html --nobreaks --unsafe --smart --validate-utf8 $1
echo '</article>'
done
cat << __EOF__