Adjust nofollow attribute

This commit is contained in:
Alex Cabal 2024-11-26 13:41:00 -06:00
parent 351713f58e
commit e11f2ad6b1
5 changed files with 55 additions and 38 deletions

View file

@ -322,7 +322,7 @@ do
sed --in-place --regexp-extended "s|<body([^>]*)>|<body\1><header><nav><ul><li><a href=\"/\">Standard Ebooks</a></li><li><a href=\"${bookUrl}\">Back to ebook</a></li></ul></nav></header>|" "${workDir}"/single-page.xhtml
# Adjust sponsored links in the colophon.
sed --in-place 's|<p><a href="http|<p><a rel="nofollow" href="http|g' "${workDir}"/single-page.xhtml
sed --in-place 's|<p><a href="http|<p><a href="http|g' "${workDir}"/single-page.xhtml
if [ "${verbose}" = "true" ]; then
printf "Done.\n"
@ -357,7 +357,7 @@ do
"${scriptsDir}"/inject-chapter-navigation-footer "${workDir}" "${bookUrl}"
# Adjust sponsored links in the colophon.
sed --in-place 's|<p><a href="http|<p><a rel="nofollow" href="http|g' "${workDir}"/src/epub/text/colophon.xhtml
sed --in-place 's|<p><a href="http|<p><a href="http|g' "${workDir}"/src/epub/text/colophon.xhtml
# Done adding compatibility!