From 3868c50a796750c47fe0e5a2dd558c85a92b8367 Mon Sep 17 00:00:00 2001 From: novalagung Date: Thu, 8 Jun 2023 16:02:02 +0700 Subject: [PATCH] fix: header --- etc/fix-webbook.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/fix-webbook.go b/etc/fix-webbook.go index e6f73fe46..a5081b8eb 100644 --- a/etc/fix-webbook.go +++ b/etc/fix-webbook.go @@ -87,7 +87,7 @@ func postAdjustment() { }(htmlString) newTitle := oldTitle - isLandingPage := (oldTitle == "Introduction · HonKit") || (oldTitle == "Introduction · HonKit") + isLandingPage := (oldTitle == "Introduction · GitBook") || (oldTitle == "Introduction · HonKit") || (oldTitle == "Introduction · GitBook") || (oldTitle == "Introduction · HonKit") if isLandingPage { newTitle = bookName } else { @@ -104,7 +104,9 @@ func postAdjustment() { if newTitle == "Belajar Golang" { newTitle = "Tutorial Gratis Belajar Dasar Pemrograman Golang Mulai Dari 0" } + newTitle = strings.ReplaceAll(newTitle, "· GitBook", fmt.Sprintf("- %s", bookName)) newTitle = strings.ReplaceAll(newTitle, "· HonKit", fmt.Sprintf("- %s", bookName)) + newTitle = strings.ReplaceAll(newTitle, "· GitBook", fmt.Sprintf("- %s", bookName)) newTitle = strings.ReplaceAll(newTitle, "· HonKit", fmt.Sprintf("- %s", bookName)) // ==== remove the "A.2"-ish from the title