Browse Source

more bugfixes

master
Alessandro Mauri 2 years ago
parent
commit
e0367536ea
  1. 9
      rivet.sh

9
rivet.sh

@ -65,6 +65,8 @@ fi @@ -65,6 +65,8 @@ fi
src="$1"
srcdir=${src%%\/}
unset src
headerfile=$srcdir/_header.html
footerfile=$srcdir/_footer.html
# Check if index.md is present
if ! [ -e "$srcdir"/index.md ]; then
@ -93,9 +95,6 @@ url="$(echo "$2" | @@ -93,9 +95,6 @@ url="$(echo "$2" |
sed -e 's/\/$//' |
sed -e 's/[]\/$*.^[]/\\&/g')"
headerfile=$srcdir/_header.html
footerfile=$srcdir/_footer.html
if [ "$PRINT_HELP" ]; then
usage
fi
@ -153,7 +152,7 @@ if ! [ "$SKIP_SITEMAP" ] || ! [ "$SKIP_LIST" ]; then @@ -153,7 +152,7 @@ if ! [ "$SKIP_SITEMAP" ] || ! [ "$SKIP_LIST" ]; then
rm -f "$tmpfile"
cat << EOF >> "$tmpfile"
<div id="map">
<h2 id="Pages">"$linksec"</h2>
<h2 id="Pages">$linksec</h2>
EOF
while IFS="" read -r line; do
if echo "$line" | grep -q 'index\.html'; then
@ -161,7 +160,7 @@ EOF @@ -161,7 +160,7 @@ EOF
fi
title="$(grep -e '^<title>.*<\/title>' "$destdir"/"$line" |
sed -e 's/<title>//' -e 's/<\/title>//')"
if ! [ "$title" ]; then
if ! [ "$title" ] || echo "$title" | grep -q 'Untitled article'; then
title=${line%?????}
fi
printf "<p><a href=\"%s\">%s</a></p>\n" "$line" "$title" >> "$tmpfile"

Loading…
Cancel
Save