Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.45 KB

DEVELOPERS.md

File metadata and controls

48 lines (35 loc) · 1.45 KB

Notes on compile mkpage

Requirements

  • Pandoc needs to be installed, it is used to convert markup formats to HTMLand as the template engine for HTML output.
  • go 1.19 or better
  • make if you want to the Makefile to build the project.
  • pkgassets from cli for generating a new assets.go
  • Caltech Library Go Packages
    • github.com/caltechlibrary/cli
    • github.com/caltechlibrary/rss2
  • Website and documentation generation
    • mkpage 1.0.2 or better
    • datatools' codemeta2cff

Compiling from source

Using go get

    go get -u github.com/caltechlibrary/cli/...
    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.