do not prepend full url to linklist
that breaks links when browsing locally and when https is not availeble or vice-versa
This commit is contained in:
parent
a5e0be8a3f
commit
c49758a5c5
10
rivet.sh
10
rivet.sh
@ -1,17 +1,17 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# Copyright (c) 2021 Alessandro Mauri
|
# Copyright (c) 2021 Alessandro Mauri
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
# in the Software without restriction, including without limitation the rights
|
# in the Software without restriction, including without limitation the rights
|
||||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
# copies of the Software, and to permit persons to whom the Software is
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
# furnished to do so, subject to the following conditions:
|
# furnished to do so, subject to the following conditions:
|
||||||
#
|
#
|
||||||
# The above copyright notice and this permission notice shall be included in all
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
# copies or substantial portions of the Software.
|
# copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
# 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
|
# Create a list that contains the links to all html files
|
||||||
linklist="$(mktemp)"
|
linklist="$(mktemp)"
|
||||||
cp -f "$objlist" "$linklist"
|
cp -f "$objlist" "$linklist"
|
||||||
sed -i -e "s/^$destdir//" -e "s/^/$prefix:\/\/$domain/" "$linklist"
|
sed -i -e "s/^$destdir//" "$linklist"
|
||||||
|
|
||||||
# Insert metadata into <head>
|
# Insert metadata into <head>
|
||||||
if ! [ "$SKIP_META" ]; then
|
if ! [ "$SKIP_META" ]; then
|
||||||
@ -261,7 +261,7 @@ if ! [ "$SKIP_SITEMAP" ]; then
|
|||||||
cat << EOF >> "$destdir"/sitemap.xml
|
cat << EOF >> "$destdir"/sitemap.xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
</urlset>
|
</urlset>
|
||||||
EOF
|
EOF
|
||||||
while IFS="" read -r line; do
|
while IFS="" read -r line; do
|
||||||
sed -i "/<\/urlset>/i \
|
sed -i "/<\/urlset>/i \
|
||||||
|
Loading…
Reference in New Issue
Block a user