Skip to content

Commit 5a778e9

Browse files
readme for codespaces (#20)
* readme for codespaces * Spelling. * Section on re opening codespaces.
1 parent 68d71aa commit 5a778e9

File tree

16 files changed

+97
-75
lines changed

16 files changed

+97
-75
lines changed

README.md

Lines changed: 97 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -3,116 +3,138 @@
33
[![CI/CD Pull Request](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml)
44
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=repository-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=repository-template)
55

6-
Start with an overview or a brief description of what the project is about and what it does. For example -
6+
## About this project
77

8-
Welcome to our repository template designed to streamline your project setup! This robust template provides a reliable starting point for your new projects, covering an essential tech stack and encouraging best practices in documenting.
8+
- This site includes the content for the public NHS Notify web site
9+
- It uses Jekyll to generate static web HTML files from markdown content
10+
- the source code for the web site is in /docs folder
11+
- page content is inside the `/docs/pages` folder
12+
- page css is inside `/docs/_sass` folder
913

10-
This repository template aims to foster a user-friendly development environment by ensuring that every included file is concise and adequately self-documented. By adhering to this standard, we can promote increased clarity and maintainability throughout your project's lifecycle. Bundled within this template are resources that pave the way for seamless repository creation. Currently supported technologies are:
14+
## Getting Started - First time setup
1115

12-
- Terraform
13-
- Docker
16+
This is only needed once.
1417

15-
Make use of this repository template to expedite your project setup and enhance your productivity right from the get-go. Enjoy the advantage of having a well-structured, self-documented project that reduces overhead and increases focus on what truly matters - coding!
18+
To get started, please create a new GitHub workspace from the main branch.
1619

17-
## Table of Contents
20+
This will setup a development environment for you to edit the web site in. The first time this runs, it will take approximately 10 minutes. You do not need to install ANY tools on your local computer.
1821

19-
- [NHS Notify Web CMS Repository](#nhs-notify-web-cms-repository)
20-
- [Table of Contents](#table-of-contents)
21-
- [Documentation](#documentation)
22-
- [Setup](#setup)
23-
- [Prerequisites](#prerequisites)
24-
- [Configuration](#configuration)
25-
- [Usage](#usage)
26-
- [Testing](#testing)
27-
- [Design](#design)
28-
- [Diagrams](#diagrams)
29-
- [Modularity](#modularity)
30-
- [Contributing](#contributing)
31-
- [Contacts](#contacts)
32-
- [Licence](#licence)
22+
### Pre-requisites
3323

34-
## Documentation
24+
- A GitHub account
25+
- For submitting changes, code must be signed.
26+
- To sign code using GitHub code spaces, please configure GPG signing for the repository, from your Settings page.
3527

36-
- [Built](/)
37-
- [Source](/docs/README.md)
28+
### 1. From a web browser, visit the Web CMS GitHub Repository page
3829

39-
## Setup
30+
[https://github.com/NHSDigital/nhs-notify-web-cms](https://github.com/NHSDigital/nhs-notify-web-cms)
4031

41-
By including preferably a one-liner or if necessary a set of clear CLI instructions we improve user experience. This should be a frictionless installation process that works on various operating systems (macOS, Linux, Windows WSL) and handles all the dependencies.
32+
### 2. Click Code
4233

43-
Clone the repository
34+
Click the green `<> Code` button.
4435

45-
```shell
46-
git clone https://github.com/nhs-england-tools/repository-template.git
47-
cd nhs-england-tools/repository-template
48-
```
36+
![alt text](assets/img/image.png)
4937

50-
### Prerequisites
38+
### 3. Create Codespace on main
5139

52-
The following software packages, or their equivalents, are expected to be installed and configured:
40+
Click create code space on main
5341

54-
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/),
55-
- [asdf](https://asdf-vm.com/) version manager,
56-
- [GNU make](https://www.gnu.org/software/make/) 3.82 or later,
57-
- [GNU coreutils](https://www.gnu.org/software/coreutils/) and [GNU binutils](https://www.gnu.org/software/binutils/) may be required to build dependencies like Python, which may need to be compiled during installation. For macOS users, this has been scripted and automated by the `dotfiles` project; please see this [script](https://github.com/nhs-england-tools/dotfiles/blob/main/assets/20-install-base-packages.macos.sh) for details,
58-
- [Python](https://www.python.org/) required to run Git hooks,
59-
- [`jq`](https://jqlang.github.io/jq/) a lightweight and flexible command-line JSON processor.
42+
![alt text](assets/img/image-1.png)
6043

61-
> [!NOTE]<br>
62-
> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [Homebrew](https://brew.sh/) installed, then to install `make`, like so:
63-
>
64-
> ```shell
65-
> brew install make
66-
> ```
67-
>
68-
> You will then see instructions to fix your `$PATH` variable to make the newly installed version available. If you are using [dotfiles](https://github.com/nhs-england-tools/dotfiles), this is all done for you.
44+
### 4. Wait
6945

70-
### Configuration
46+
- a new browser tab should open
47+
- you will need to wait around 5 - 10 minutes
7148

72-
Installation and configuration of the toolchain dependencies
49+
When it first starts it will look something like this. At it will say opening remote at the bottom left.
7350

74-
```shell
75-
make config
76-
```
51+
![alt text](assets/img/image-2.png)
7752

78-
## Usage
53+
### 5. Launch workspace
7954

80-
After a successful installation, provide an informative example of how this project can be used. Additional code snippets, screenshots and demos work well in this space. You may also link to the other documentation resources, e.g. the [User Guide](./docs/user-guide.md) to demonstrate more use cases and to show more features.
55+
You will see a box pop up bottom right notifying you there is a workspace file.
8156

82-
### Testing
57+
- click the Green button to `Open Workspace`
8358

84-
There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline.
59+
![alt text](assets/img/image-3.png)
8560

86-
## Design
61+
### 6 . Open parent git repository
8762

88-
### Diagrams
63+
Another box will pop up saying a parent git repository has been found. Click the Green `Yes` button to open it.
8964

90-
The [C4 model](https://c4model.com/) is a simple and intuitive way to create software architecture diagrams that are clear, consistent, scalable and most importantly collaborative. This should result in documenting all the system interfaces, external dependencies and integration points.
65+
![alt text](assets/img/image-4.png)
9166

92-
![Repository Template](./docs/diagrams/Repository_Template_GitHub_Generic.png)
67+
An option should appear at the top of the screen, select the `nhs-notify-web-cms` repository.
9368

94-
### Modularity
69+
![alt text](assets/img/image-5.png)
9570

96-
Most of the projects are built with customisability and extendability in mind. At a minimum, this can be achieved by implementing service level configuration options and settings. The intention of this section is to show how this can be used. If the system processes data, you could mention here for example how the input is prepared for testing - anonymised, synthetic or live data.
71+
### 5. Test it works
9772

98-
## Contributing
73+
You should be able to run a live version of your changes before you submit them (via a Pull request) for updating the live content.
9974

100-
Describe or link templates on how to raise an issue, feature request or make a contribution to the codebase. Reference the other documentation files, like
75+
To do this, click the Run and Debug button, and then click the "Play" icon. Alternatively you can press F5 (warning, if you are not "clicked" in the window, it will refresh your page instead of launching the site).
10176

102-
- Environment setup for contribution, i.e. `CONTRIBUTING.md`
103-
- Coding standards, branching, linting, practices for development and testing
104-
- Release process, versioning, changelog
105-
- Backlog, board, roadmap, ways of working
106-
- High-level requirements, guiding principles, decision records, etc.
77+
- click the run and debug button:
10778

108-
## Contacts
79+
![alt text](assets/img/image-6.png)
10980

110-
Provide a way to contact the owners of this project. It can be a team, an individual or information on the means of getting in touch via active communication channels, e.g. opening a GitHub discussion, raising an issue, etc.
81+
- click the green "Play" button to the left of where it says `Attatch (NHS Notify`
11182

112-
## Licence
83+
![alt text](assets/img/image-7.png)
11384

114-
> The [LICENCE.md](./LICENCE.md) file will need to be updated with the correct year and owner
85+
- after a few seconds, you should see moving text at the bottom of the screen and it say `server running`
11586

116-
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
87+
![alt text](assets/img/image-8.png)
11788

118-
Any HTML or Markdown documentation is [© Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/) and available under the terms of the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
89+
- a box should appear bottom right saying your application is running. Click the green `Open in browser button`
90+
91+
![alt text](assets/img/image-9.png)
92+
93+
- a new browser tab will open (with a random address), this is live updating as you change the content of the site.
94+
95+
![alt text](assets/img/image-10.png)
96+
97+
### 6. Make a preview change
98+
99+
- In the previous browser tab, click on the file `Explorer` button to show the file list.
100+
101+
![alt text](assets/img/image-11.png)
102+
103+
- Click on the `pages` folder, and then `index.md`. This will open the content of the home page.
104+
105+
![alt text](assets/img/image-12.png)
106+
107+
- you can now edit this page. To see a basic preview side by side, click the markdown preview button
108+
109+
![alt text](assets/img/image-13.png)
110+
111+
- this will open a preview to the right
112+
113+
![alt text](assets/img/image-14.png)
114+
115+
- If you now edit some text in the left, it will update in the basic preview on the right in real time. If you click `File` - `Save` (or `Ctrl-S`) this will save the file.
116+
117+
- Saving the file will update the Full preview site in the other browser tab.
118+
119+
- Open the other tab, and Press `F5` to refresh the page.
120+
121+
### 7. Making a change permanent and live
122+
123+
You must:
124+
125+
- create a new branch in your workspace
126+
- commit the changes to your new branch
127+
- push (publish) the new branch to your remote
128+
- create a Pull Request for requesting that your remote branch is merged into main
129+
- await approval
130+
131+
## Making further changes
132+
133+
### Open existing CodeSpaces
134+
135+
- You can reuse existing CodeSpaces that have been setup.
136+
- Visit [https://github.com/codespaces](https://github.com/codespaces) to see a list of code spaces
137+
- Active code spaces are charged. Everyone gets 150 hours free per month.
138+
- Click on the `three dots` and then click `stop codespace` to change it to inactive
139+
- A stopped code space does not loose data
140+
- You can delete a CodeSpace, but this will loose any data that you have not pushed (published) to a remote git branch.

assets/img/image-1.png

245 KB
Loading

assets/img/image-10.png

240 KB
Loading

assets/img/image-11.png

397 KB
Loading

assets/img/image-12.png

258 KB
Loading

assets/img/image-13.png

281 KB
Loading

assets/img/image-14.png

309 KB
Loading

assets/img/image-2.png

64.8 KB
Loading

assets/img/image-3.png

268 KB
Loading

assets/img/image-4.png

51.2 KB
Loading

0 commit comments

Comments
 (0)