Advanced site configuration
The site build is configured by the publican.config.js file. It contains JavaScript code to:
- load and parse values set in the
.env.devand.env.prodconfiguration files - modify page slugs to remove the initial number or date
- set the number of pages and sort order for directory and tag index pages
- copy static files such as images and icons
- run event hook functions to examine and modify data
- append custom global values and functions to the
tacsobject - define replacement strings such as
−−ROOT−− - minify HTML in production mode
- clean the build directory
- start the build
- watch for file changes in development mode
- start a development mode server
You can add your own Publican customisations as necessary.
Function libraries #
The theme provides the following code libraries in the lib directory.
hooks.js: Publican event hook functionsformat.js: date, number, and similar formatting functionsnav.js: navigation generation functions for menus, breadcrumbs, pagination, etc.