- go 1.12 or better
- make if you want to the Makefile to build the project.
- pkgassets for generating a new assets.go
- Caltech Library Go Packages
- github.com/caltechlibrary/cli
- github.com/caltechlibrary/tmplfn
- github.com/caltechlibrary/rss2
- 3rd Party Go packages used by mkpage project
- github.com/gomarkdown/markdown
- github.com/gomarkdown/markdown/parser
- github.com/gomarkdown/markdown/html
- github.com/mmarkdown/mmark
Using go get
go get -u github.com/caltechlibrary/pkgassets/...
go get -u github.com/caltechlibrary/mkpage/...
Manual using only the go command
for PNAME in byline mkpage mkrss mkslides reldocpath sitemapper titleline urldecode urlencode ws; do
go build -o "bin/${PNAME}" "cmds/${PNAME}/${PNAME}.go"
done
assets.go holds the go source code for a map containing the contents of the defaults directory (e.g. templates/page.tmpl and templates/slides.tmpl). If you modify those files you'll need to recreate assets.go. You can do so with the pkgassets tool.
pkgassets -o assets.go -p mkpage Defaults defaults
If you're not modifying the contents of the defaults directory you do not need to regenerate assets.go.