From e260d0b792d8f8f530813640b663d25c505df379 Mon Sep 17 00:00:00 2001 From: Noval Agung Prayogo Date: Fri, 9 Feb 2024 00:21:53 +0700 Subject: [PATCH] fix: ebook script --- etc/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/etc/main.go b/etc/main.go index c688080a7..c5e26c4b9 100644 --- a/etc/main.go +++ b/etc/main.go @@ -147,8 +147,14 @@ func webbookPostAdjustment() { htmlString = strings.ReplaceAll(htmlString, imagesAltToFind, imagesAltReplacement) // ==== disqus lazy load - disqusJSBuf, _ := os.ReadFile("./gitbook-plugin-disqus.js") - os.WriteFile("./_book/gitbook/gitbook-plugin-disqus/plugin.js", disqusJSBuf, 0644) + disqusJSBuf, err := os.ReadFile("./gitbook-plugin-disqus.js") + if err != nil { + fmt.Println("error", err) + } + err = os.WriteFile("./_book/gitbook/gitbook-plugin-disqus/plugin.js", disqusJSBuf, 0644) + if err != nil { + fmt.Println("error", err) + } // ==== gitbook assets lazy load cssToLoad := []string{