Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit ec516a6

Browse files
authored
fixed quickstart instruction and other small tweaks (#39)
1 parent 82ee658 commit ec516a6

File tree

2 files changed

+48
-26
lines changed

2 files changed

+48
-26
lines changed

docs/setup/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ This creates the following structure in the directory:
3737

3838
## Update mkdocs.yml
3939

40-
So that the template displays properly, in `mkdocs.yml` insert the relevant values for `site_name` and `repo_url`, and set the `theme` so that it uses our MkDocs tech docs template:
40+
So that the template displays properly, copy the following into `mkdocs.yml`:
4141

4242
```
43-
- site_name: <your-website-name>
44-
- repo_url: <your-website-url>
45-
- theme:
43+
repo_url: <your-website-url>
44+
repo_name: <your-repo-name>
45+
theme:
4646
name: tech_docs_template
4747
plugins:
4848
- material/search
4949
```
5050

51+
This sets the theme to use the MkDocs Tech Docs Template and enables the search bar plugin. After copying, insert the relevant values for `site_name`, `repo_url` and `repo_name`.
52+
5153
## Preview your documentation
5254

5355
MkDocs includes a live preview server that automatically rebuilds when you save a file, so you can preview your changes as you write. To start the server, in your terminal run:
@@ -60,11 +62,11 @@ To stop the server, in your terminal press Ctrl+C. If the page stops loading, ch
6062

6163
## Build your documentation
6264

63-
If you are using GitHub, you can use [GitHub Actions][gh_actions] to automate the deployment of your documentation to [GitHub Pages](https://pages.github.com/) when a commit is pushed to either the master or main branches. See the [Material for MKDocs documentation][material_publishing] for more details and alternatives.
65+
If you are using GitHub, you can use [GitHub Actions][gh_actions] to automate the deployment of your documentation to [GitHub Pages](https://pages.github.com/) whenever someone pushes a commit to the master or main branch. See the [Material for MKDocs documentation][material_publishing] for more details and alternatives.
6466

65-
## Customise your documentation
67+
## Configure page layout
6668

67-
We have provided some customisation options in [customise](customise.md), but we encourage you to read the [Material for MkDocs documentation][material_docs] for more detailed information on customisation.
69+
This template is flexible. For examples of how you can structure navigation and table of contents, as well as other customisation options, see [Customise](customise.md).
6870

6971
[gh_actions]: https://github.com/features/actions
7072
[gh_ssh]: https://docs.github.com/en/authentication/connecting-to-github-with-ssh

docs/setup/customise.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Customise your template
22

3-
This page explains the customisation used in the demo. You are encouraged to read the Material for MkDocs [guidance][material] for more detailed information on customisation.
3+
This page explains the different components we use to configure page layout for the demo site you are currently viewing. You can apply these to your template to make your site look similar.
44

5-
When customising, be mindful of your users. Make sure you do not overcomplicate things for them or anyone else who might contribute to your documentation.
5+
When customising, keep your users in mind. The template is flexible, but try not to complicate things for readers, or anyone contributing to your documentation.
6+
7+
For more information on customisation, see the [Material for MkDocs guidance][material].
68

79
## Page Layout
810

9-
The `nav` configuration setting in your `mkdocs.yml` file defines which pages are included in the global site navigation menu as well as the structure of that menu.
11+
The `nav` setting in your `mkdocs.yml` file defines which pages to include in your table of contents and their structure.
1012

11-
If not provided, the navigation will be automatically created by discovering all the Markdown files in the documentation directory. See [Configure Pages and Navigation][pageNav] for more details.
13+
If you do not define `nav`, the template automatically search for Markdown files in the docs directory and creates a table of contents. For more information on how this works, see the [MkDocs documentation on configuring pages and navigation][pageNav].
1214

1315
### Nesting pages
1416

15-
Parent items can either contain a single page or a nested list of child pages, but not both:
17+
Parent items can contain a single page or a nested list of child pages, but not both:
1618

1719
```
20+
nav:
1821
- Home: index.md
1922
- Parent:
2023
- 'Nested Page': 'somepage.md'
@@ -24,7 +27,7 @@ Parent items can either contain a single page or a nested list of child pages, b
2427

2528
### Top bar navigation
2629

27-
Top bar navigation tabs are disabled by default. To enable them, update `mkdocs.yml` with the following:
30+
Top bar navigation tabs do not display by default. To display them, update `mkdocs.yml` with the following:
2831
```
2932
theme:
3033
features:
@@ -35,21 +38,27 @@ theme:
3538

3639
### Right-hand navigation
3740

38-
By default, this template displays page sections on the right-hand table of contents. To merge the sections into the left-hand table of comments, in `mkdocs.yml`, uncomment `toc.integrate`.
41+
By default, this template displays page sections on the right-hand table of contents. To merge the sections into the left-hand table of comments, add `toc.integrate` in `mkdocs.yml`:
42+
43+
```
44+
theme:
45+
features:
46+
- toc.integrate
47+
```
3948

40-
For more information on how you can customise navigation, see [setting up navigation][navSetup].
49+
For more information on how you can customise navigation, see the [Material for MkDocs documentation on setting up navigation][navSetup].
4150

4251
## Logos and Images
4352

44-
To use your department's images you can use one of the provided [logos][logos] and [favicons][favicons] and specify the path in the `mkdocs.yml` for example:
53+
To use government images on your site you can use one of the provided [logos][logos] and [favicons][favicons] and specify the path in `mkdocs.yml`, for example:
4554

4655
```
4756
theme:
4857
logo: logos/moj.png
4958
favicon: favicons/moj.ico
5059
```
5160

52-
Alternatively you can add the images to the `docs/assets` directory in your own repository and specify the path for example:
61+
Alternatively, you can add images to the `docs/assets` directory in your own repository and specify the path, for example:
5362

5463
```
5564
theme:
@@ -59,14 +68,11 @@ theme:
5968

6069
## Admonitions
6170

62-
Admonitions, also known as call-outs, are an excellent choice for including side content without significantly interrupting the document flow. They can also be used to provide structure and coloured headings as in used on the [home page][home]. Please refer to [admonitions][admonitions] for more details. Do consider adding the images to the template for sharing with colleagues!
71+
[Admonitions][admonitions] (also known as call-outs) are a way of including content without interrupting the flow of your content. They can also help to provide structure and coloured headings, such as those on the [homepage][home].
6372

64-
## Footer
73+
## Social links
6574

66-
### Social links
67-
68-
Social links are rendered above the copyright notice as part of the
69-
footer of your project documentation. Add a list of social links in `mkdocs.yml`
75+
Social links are rendered above the copyright notice as part of the footer of your project documentation. Add a list of social links in `mkdocs.yml` using the following:
7076
with:
7177

7278
``` yaml
@@ -78,11 +84,25 @@ extra:
7884
7985
Please refer to [social links][social] for more details.
8086
81-
## Dark Mode
87+
## Dark Mode (experimental)
8288
83-
Use the sun icon in the top bar to switch between light and dark mode.
89+
To enable Dark Mode, add the following in `mkdocs.yml`
90+
91+
```
92+
palette:
93+
# Palette toggle for light mode
94+
- scheme: default
95+
toggle:
96+
icon: material/brightness-7
97+
name: Switch to dark mode
98+
# Palette toggle for dark mode
99+
- scheme: slate
100+
toggle:
101+
icon: material/brightness-4
102+
name: Switch to light mode
103+
```
84104
85-
See [Changing the colors](https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/) for more details.
105+
Use the sun icon in the top bar to switch between light and dark mode.
86106
87107
[material]: https://squidfunk.github.io/mkdocs-material/
88108
[pageNav]: https://www.mkdocs.org/user-guide/writing-your-docs/#configure-pages-and-navigation

0 commit comments

Comments
 (0)