Make more reliable and include filename in article tags
This commit is contained in:
parent
ce6a5cc865
commit
74e3e95a98
1 changed files with 4 additions and 4 deletions
|
@ -11,11 +11,11 @@ cat << __EOF__
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
__EOF__
|
__EOF__
|
||||||
shift # Drop the first argument (document title).
|
while shift
|
||||||
for i in $(seq 1 $#)
|
|
||||||
do
|
do
|
||||||
echo '<article>'
|
test -n "$1" || break # No more files.
|
||||||
cmark --to html --nobreaks --unsafe --smart --validate-utf8 $(eval echo \$$i)
|
echo "<article data-filename=\"$(basename "$1")\">"
|
||||||
|
cmark --to html --nobreaks --unsafe --smart --validate-utf8 $1
|
||||||
echo '</article>'
|
echo '</article>'
|
||||||
done
|
done
|
||||||
cat << __EOF__
|
cat << __EOF__
|
||||||
|
|
Loading…
Reference in a new issue