Skip to content

Commit 6f1741b

Browse files
committed
Add README and CONTRIBUTING guides
1 parent 280137e commit 6f1741b

File tree

2 files changed

+82
-26
lines changed

2 files changed

+82
-26
lines changed

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# How to contribute to this site
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/) and is hosted on GitHub Pages using GitHub Actions to build and publish.
4+
5+
6+
## Getting set up
7+
8+
### Prerequisites
9+
10+
You'll need the following to run the site locally and make changes easily:
11+
12+
1. Modern Node (check the `node-version` in [the deployment pipeline](./.github/workflows/deploy.yml) to see what we're targeting).
13+
2. [EditorConfig](https://editorconfig.org/) configured for your editor (optional). EditorConfig ensures your changes are consistent with the repository standards before you raise a pull request.
14+
15+
> ℹ️ For VSCode there's an official [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) plugin.
16+
17+
18+
### Install dependencies
19+
20+
```bash
21+
npm install
22+
```
23+
24+
## Local Development
25+
26+
```bash
27+
npm start
28+
```
29+
30+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
31+
32+
> ⚠️ The local development server doesn't build the search index. To test this locally, you'll need to build and serve the site (see below).
33+
34+
## Build
35+
36+
```bash
37+
npm run build
38+
```
39+
40+
This command generates static content into the `build` directory and can be served using any static contents hosting service or using:
41+
42+
```bash
43+
npm run serve
44+
```
45+
46+
## Deployment
47+
48+
Deployment is done automatically through GitHub Actions to GitHub Pages.
49+
50+
### Break-glass deployment steps
51+
52+
Using SSH:
53+
54+
```bash
55+
USE_SSH=true npm run deploy
56+
```
57+
58+
Not using SSH:
59+
60+
```bash
61+
GIT_USER=<Your GitHub username> npm run deploy
62+
```

README.md

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
1-
# Website
1+
# Hackney Development System
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
The [Hackney Development System](https://playbook.hackney.gov.uk/) is the home of the Hackney development team's documentation, and details how we work as well as technical and architectural documentation.
44

5-
### Installation
5+
Project-specific documentation doesn't generally live here, and will be found alongside the code in the relevant repositories. There are exceptions, for example the API specifications section seeks to provide a central directory of Hackney's APIs.
66

7-
```
8-
$ yarn
9-
```
7+
## Architecture
108

11-
### Local Development
9+
This website is built using [Docusaurus](https://docusaurus.io/) and is hosted on GitHub Pages using GitHub Actions to build and publish.
1210

13-
```
14-
$ yarn start
15-
```
11+
Before 2024 this site was built and deployed as a series of small static sites with independent repositories, build tooling, and styling.
1612

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
13+
The site is now a single repository and build pipeline, which reduces the maintenance burden to upgrade dependencies and gives us more flexibility to alter and add to the structure.
1814

19-
### Build
15+
### Local search
2016

21-
```
22-
$ yarn build
23-
```
17+
This site provides a search bar provided by an in-browser JavaScript library. This differs from the Docusaurus-supported default which relies on an Algolia account. We choose local-only search so we don't have to manage the Algolia account or rely on a third party service.
2418

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
19+
### Google Analytics
2620

27-
### Deployment
21+
In order to measure the effectiveness of our documentation and identify stale or ineffective content we use Google Analytics, which records to a property in our Google Workspace.
22+
23+
### Ownership
2824

29-
Using SSH:
25+
Most of the content on this site belongs to Hackney's development community as a whole. Some sections, for example the Data Platform Playbook, belong to another group
3026

31-
```
32-
$ USE_SSH=true yarn deploy
33-
```
27+
We use [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) to ensure the relevant owner approves a change before it can be merged.
28+
29+
### Deployment
3430

35-
Not using SSH:
31+
The default branch of the repository is automatically built and deployed as a GitHub Pages site, using GitHub Actions. The deployment and test workflows are in [`.github/workflows/`](.github/workflows/).
3632

37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
33+
## Contributing
4034

41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
35+
Pull requeststs are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to run the site locally and make changes.

0 commit comments

Comments
 (0)