Skip to content

Commit

Permalink
feat: update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Akiff Manji <[email protected]>
  • Loading branch information
amanji committed Aug 10, 2024
1 parent a0ca7a2 commit cbbc5f7
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 409 deletions.
65 changes: 58 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,88 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
### Installation

```
$ yarn
$ npm run
```

### Local Development

```
$ yarn start
$ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
<!-- GitHub Actions have been set up for this therefore using the CLI is discouraged -->
<!-- ### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
$ USE_SSH=true npm run deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
$ GIT_USER=<Your GitHub username> npm run deploy
```
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.
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. -->


### Autogenerating Links

This site is configured to automatically generate the navbar and main page links based on the top-level folders in the `docs` directory. To ensure that the links render correctly, each folder must have an `index.md` file. Alternatively, you can use `_index.md` (with an underscore) to prevent Docusaurus from rendering the markdown.

For example, consider the following directory structure in `docs`:

```
docs
├── delivery-manual
│ └── index.md
├── experience-patterns
│ └── index.md
├── foundations
│ └── index.md
└── resources
├── index.md
```

Based on this structure, the following navbar and main page links will be generated:

![](static/img/dtt-autogenerated-links.png)

To add another link to the navbar and main page, simply create a new folder in the `docs` directory with an index file. The new link will be automatically generated.

#### Ordering

You can customize the ordering of the links by adding an `order` property in the front matter of the index files:

```yaml
---
order: 1
---
```

For example, if you want the links to appear in the following order:

1. Foundations
2. Experience Patterns
3. Delivery Manual
4. Resources

You would add the front matter accordingly to the index files. The links will be displayed in ascending order. Index files without an order property will appear alphabetically after the ordered links. If multiple index files have the same order, they will be sorted alphabetically in place.

#### Main page link descriptions

You can further add a `description` to the front matter of the index files, and the main links will display it. In the following example, links have a custom order and have descriptions applied to them:

![](static/img/dtt-autogenerated-links-ordered-descriptions.png)
20 changes: 0 additions & 20 deletions docs/index.md

This file was deleted.

Binary file removed static/img/docusaurus-social-card.jpg
Binary file not shown.
Binary file removed static/img/docusaurus.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/dtt-autogenerated-links.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion static/img/logo.svg

This file was deleted.

Loading

0 comments on commit cbbc5f7

Please sign in to comment.