From c49758a5c5bba73be9a07b7cf476673626df84ba Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Thu, 8 Jul 2021 18:27:58 +0200 Subject: [PATCH] do not prepend full url to linklist that breaks links when browsing locally and when https is not availeble or vice-versa --- rivet.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rivet.sh b/rivet.sh index 65d0064..4625c38 100644 --- a/rivet.sh +++ b/rivet.sh @@ -1,17 +1,17 @@ #!/bin/sh -e # Copyright (c) 2021 Alessandro Mauri -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -183,7 +183,7 @@ sed -i -e 's/\.md$/\.html/' "$objlist" # Create a list that contains the links to all html files linklist="$(mktemp)" cp -f "$objlist" "$linklist" -sed -i -e "s/^$destdir//" -e "s/^/$prefix:\/\/$domain/" "$linklist" +sed -i -e "s/^$destdir//" "$linklist" # Insert metadata into if ! [ "$SKIP_META" ]; then @@ -261,7 +261,7 @@ if ! [ "$SKIP_SITEMAP" ]; then cat << EOF >> "$destdir"/sitemap.xml - + EOF while IFS="" read -r line; do sed -i "/<\/urlset>/i \