Skip to content

Latest commit

 

History

History
117 lines (78 loc) · 3.37 KB

README.md

File metadata and controls

117 lines (78 loc) · 3.37 KB

Digital Guides

https://guides.service.gov.au/

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.

Layout documentation

https://govau.github.io/service-manual/docs/

Staging

Development

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

Content

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

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 engine

Search is provided by the Lunr javascript search engine.

Weight to search scoring is in the following descending order:

  1. keywords (boost = 30)
  2. title (boost = 10)
  3. description (boost = 5)
  4. 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:

  1. documents.json (the site document data)
  2. pathmap.json (lookup table for the SERP)
  3. 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