We aim to provide clear, consistent and compelling guidance which will inspire teams and help support them with how to design and deliver great digital services.
https://govau.github.io/service-manual/docs/
- url: https://service-manual.apps.y.cld.gov.au/
- branch:
develop
- status:
All pull requests should be compared against develop
It's good to use NVM
nvm use
Install dependencies
npm install
Build the static assets
npm run build
Start the development server
npm run watch
All content for the Service Manual is in the /content
folder. We use Cuttlebelle as static site generator
as to cleanly separate content from layout.
Images for content pages can be stored in the /content/assets
folder.
Metadata can be stored on pages within the index.yml
file. All fields except for pagetitle
are optional.
Fields
pagetitle (string required)
- the page title
description (string optional)
- the meta description
keywords (string, comma delimited list, optional)
- for search engine
created_by (string optional)
- is displayed on pages using intro_with_nav
published_date (ISO date yyyy-mm-dd optional)
- is displayed on pages using intro_with_nav
- make sure to form as a string e.g. "2018-05-12"
reviewed_date (ISO date yyyy-mm-dd optional)
- is displayed on pages using intro_with_nav
- make sure to form as a string e.g. "2018-05-12"
boost (integer optional)
- influences the search engine results
hidden (boolean optional)
- hides the page if set to true
weight (integer optional)
- influences the ordering of menu items
Search is provided by the Lunr javascript search engine.
Weight to search scoring is in the following descending order:
keywords
(boost = 30)title
(boost = 10)description
(boost = 5)body
(no boost)
The content is indexed at build time, and can be influenced with the optional metadata fields keywords
and boost
.
Boost
Use small values, like 0.5 - 1 until your desired search result is attained.
Keywords
Keywords can be added in a comma delimited list.
Federated pages
External pages can be federated by adding data to scripts/federate.js
Search data (json)
Search data and indexes are stored in the following static files, which are deployed with the site:
- documents.json (the site document data)
- pathmap.json (lookup table for the SERP)
- search_index.json (lunr's serialised index)
Rebuilding the search index in development
When experimenting with search tuning in development it is necessary to rebuild the search index after changing content or metadata. This can be done hot in another terminal window with Cuttlebelle running.
npm run build:search