package web import ( "embed" "io/fs" "net/http" ) // To install a Jade compiler: go install github.com/Joker/jade/cmd/jade@latest // //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer index.pug stuff.pug mindflow.pug about.pug // guestbook.pug //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer rss.pug //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer articles/hardening_mikrotik.pug //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer articles/nginx_recipes_and_tips.pug //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer articles/rpi_root_on_external_drive.pug //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer articles/setting_up_a_mail_server.pug //go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -stdbuf -stdlib -writer articles/setting_up_a_tor_proxy_relay_hiddenserv.pug //go:embed assets var assetsDir embed.FS func Assets() http.FileSystem { f, _ := fs.Sub(assetsDir, "assets") return http.FS(f) } func AssetsGetFile(path string) ([]byte, error) { return assetsDir.ReadFile("assets/" + path) }