diff --git a/Makefile b/Makefile index d51c703..d6c82b5 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,8 @@ deps: .PHONY: pdf pdf: build deps - @echo "Generating PDF with headless Chrome..." - @$(GO) run ./cmd/pdf --in $(OUT_DIR)/print.html --out $(PDF) + @echo "Generating PDF by rendering each page and merging..." + @$(GO) run ./cmd/pdfbook --pages $(OUT_DIR) --order pages.yaml --out $(PDF) .PHONY: pdf-2up pdf-2up: build deps diff --git a/assets/css/smartbar.css b/assets/css/smartbar.css index 002508a..5470601 100644 --- a/assets/css/smartbar.css +++ b/assets/css/smartbar.css @@ -1,6 +1,6 @@ @font-face { font-family: "Heading Now"; - src: url("/assets/font/HeadingNow-95Medium.otf"); + src: url("../font/HeadingNow-95Medium.otf"); } .ytmnd-1 { diff --git a/cmd/build/main.go b/cmd/build/main.go index a65333d..216911c 100644 --- a/cmd/build/main.go +++ b/cmd/build/main.go @@ -8,7 +8,6 @@ import ( "io/fs" "os" "path/filepath" - "regexp" "sort" "strings" @@ -27,152 +26,6 @@ func floatToIn(v float64) string { return strings.TrimRight(strings.TrimRight(fmt.Sprintf("%.4fin", v), "0"), ".") } -func min(a, b int) int { - if a < b { - return a - } - return b -} - -// extractAndScopeCSS extracts `) - matches := styleRegex.FindAllStringSubmatch(content, -1) - - var scopedCSS strings.Builder - contentWithoutCSS := content - - // Remove all \ No newline at end of file + \ No newline at end of file diff --git a/templates/print.gohtml b/templates/print.gohtml index fe97eaf..bb64325 100644 --- a/templates/print.gohtml +++ b/templates/print.gohtml @@ -5,6 +5,7 @@