Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Latest commit

 

History

History
47 lines (34 loc) · 1.43 KB

DEVELOPERS.md

File metadata and controls

47 lines (34 loc) · 1.43 KB

Notes on compile mkpage

Requirements

  • 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

Compiling from source

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

regenerating assets.go

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.