From ed4cdcae576b6c79a6c9280e0643b430a4461390 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Mon, 28 Aug 2023 10:22:07 -0500 Subject: [PATCH] Add rel="prev/next" to navigation footers in ebook text --- scripts/inject-chapter-navigation-footer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/inject-chapter-navigation-footer b/scripts/inject-chapter-navigation-footer index 3de87fd0..96c6d011 100755 --- a/scripts/inject-chapter-navigation-footer +++ b/scripts/inject-chapter-navigation-footer @@ -33,8 +33,8 @@ if($toc){ $fileName = $epubDirectory . '/' . $chapterLinks[$i]->Path . '.xhtml'; $chapter = file_get_contents($fileName); // Inject the navigation footer. - $previousLink = $previousObj ? sprintf('Previous: %s', $bookUrl . '/' . $previousObj->Path, htmlspecialchars($previousObj->Name)) : ''; - $nextLink = $nextObj ? sprintf('Next: %s', $bookUrl . '/' . $nextObj->Path, htmlspecialchars($nextObj->Name)) : ''; + $previousLink = $previousObj ? sprintf('', $bookUrl . '/' . $previousObj->Path, htmlspecialchars($previousObj->Name)) : ''; + $nextLink = $nextObj ? sprintf('', $bookUrl . '/' . $nextObj->Path, htmlspecialchars($nextObj->Name)) : ''; $footer = sprintf('', $previousLink, $nextLink); $chapter = str_replace('', $footer . '', $chapter); file_put_contents($fileName, $chapter);