Browse Source

Improve markdown template

Andrea Fazzi 2 years ago
parent
commit
c8c84dcb52
4 changed files with 16 additions and 1 deletions
  1. 1 0
      backend/data/.gitignore
  2. BIN
      backend/data/palette.gif
  3. 13 0
      backend/data/screen.tpl.md
  4. 2 1
      backend/main.go

+ 1 - 0
backend/data/.gitignore

@@ -1,2 +1,3 @@
 *.sh
 *.sh
+*.bmp
 
 

BIN
backend/data/palette.gif


+ 13 - 0
backend/data/screen.tpl.md

@@ -1,3 +1,16 @@
+---
+fontfamily: libertinus
+fontfamilyoptions:
+- osf
+- p
+papersize: a6
+fontsize: 12pt
+geometry:
+- top=5mm
+- left=5mm
+- right=5mm
+...
+
 # Buongiorno Aldo!
 # Buongiorno Aldo!
 Oggi è il {{day}}.{{month}}.{{year}}.
 Oggi è il {{day}}.{{month}}.{{year}}.
 
 

+ 2 - 1
backend/main.go

@@ -87,7 +87,8 @@ func serveScreen(res http.ResponseWriter, req *http.Request) {
 	}
 	}
 
 
 	log.Println("Converting markdown to pdf.")
 	log.Println("Converting markdown to pdf.")
-	err = pandoc.Convert("./data/screen.md", "./data/screen.pdf", "-V", "geometry:papersize={3.8in,6in}", "-V", "pagestyle:empty")
+	// err = pandoc.Convert("./data/screen.md", "./data/screen.pdf", "-V", "geometry:papersize={3.8in,6in}", "-V", "pagestyle:empty")
+	err = pandoc.Convert("./data/screen.md", "./data/screen.pdf", "-V", "pagestyle:empty")
 	if err != nil {
 	if err != nil {
 		panic(err)
 		panic(err)
 	}
 	}