This is the repository holding the technical documentation for GC Notify, https://notification.canada.ca.
Content is largely based on GOV.UK's Notify REST API Documentation and Australia's Notify Documentation by the Digital Transformation Agency. It is being adapted to the Canadian context.
This repository holds documentation in various Markdown files:
The VuePress configuration is in src/.vuepress/config.js
. We use the default theme and the associated documentation can be seen online.
The sidebar is defined in src/.vuepress/config.js
. It's different in English and in French.
If you want to add pages or groups of pages, you should tweak the sidebar
object.
This example sidebar defines a menu for 3 pages: callbacks.md
, limits.md
and then api.md
in the en
folder. If you created a new Markdown file and want to see it in the menu, it should be added in this object.
This example code also defines a group of pages, under the name "Clients" that is collapsable. The order of pages and their name works the same way.
sidebar: {
'/en/': [
'/en/',
'/en/callbacks',
'/en/limits',
'/en/api',
{
title: 'Clients',
collapsable: true,
children: [
'/en/python',
'/en/java',
]
}
]
}
For quick editing and hot reload a light-weight solution is to use VuePress. Listed below are instructions to run a local server for viewing the documentation content.
- Download packages and their dependencies
npm install
- Run the VuePress
npm run dev
A Dockerfile
is provided to anyone that wants to leverage Docker for deploying a webserver nginx
for serving the documentation content.
Prerequisites
- Install Docker from https://www.docker.com
Instructions
- Launch a terminal and navigate to the notification-documentation project root directory
- Build the container with a tag, an example is listed below
docker build -t cds/notification-documentation:0.1 .
- Check that the image has been built successfully
docker images
- Launch the image on your local machine, the example below serves the pages at port 8000
docker run -p 8000:80 cds/notification-documentation:0.1
- Open up a web browser and navigate to http://localhost:8000 to view the content