Installing Nerdamer on a Hugo Project
If your Hugo webpage is maintained as a Git repository, the easiest method of installing Nerdamer is to use Git submodules. At the base directory, run
$ git submodule add https://github.com/jiggzson/nerdamer assets/js/nerdamer/ $ git submodule init
to attach the Nerdamer depository to
assets/js/nerdamer/. Note that we are putting the files under the Assets folder, not the Static folder, because you would want to minify the files first with Hugo Pipes.
/ ├───.github ├───archetypes ├───assets │ └───js │ └───nerdamer │ ├───spec │ ├───Algebra.js │ ├───Calculus.js │ ├───Extra.js │ ├───nerdamer.core.js │ └───Solve.js ├───config ├───content ├───static └───themes
nerdamer.core.js contains the core functionality of Nerdamer, and the four other ‘add-ons’ provide some extra features (the full list of functions each add-on provides on the documentation page). Create a partial that minifies and loads the necessary files:
and attach it to the site’s head:
If you want to load Nerdamer in a specific page, simply set
nerdamer: true in the page’s YAML.