Skip to content

Commit a069d88

Browse files
authored
Fix build issues for docs and added notes about nav (#24)
1 parent 4541205 commit a069d88

File tree

5 files changed

+66
-105
lines changed

5 files changed

+66
-105
lines changed

docs/mkdocs-base.yml

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -44,46 +44,44 @@ nav:
4444
- Code of Conduct: about/code-of-conduct.md
4545
- Running Instances: about/running-instances.md
4646
- Users:
47-
- Overview:
48-
- Quickstart:
49-
- user/index.md
50-
- user/quickstart/index.md
51-
- Guide:
52-
- user/guide/index.md
53-
- Disclaimer: about/disclaimer.md
54-
- License: about/license.md
55-
- Manual:
56-
- user/manual/index.md
57-
- Home Page: user/manual/home.md
47+
- user/index.md
48+
- Quick Start:
49+
- user/quickstart/index.md
50+
- Guide:
51+
- user/guide/index.md
52+
- Disclaimer: about/disclaimer.md
53+
- License: about/license.md
54+
- Manual:
55+
- user/manual/index.md
56+
- Home Page: user/manual/home.md
5857
- Administrators:
59-
- Guide:
60-
- administrator/index.md
61-
- Manual:
62-
- administrator/guide/index.md
63-
- administrator/manual/index.md
58+
- administrator/index.md
59+
- Guide:
60+
- administrator/guide/index.md
61+
- Manual:
62+
- administrator/manual/index.md
6463
- Developers:
65-
- developer/index.md
66-
- developer/api/index.md
67-
- API:
68-
- Reference: developer/api/manual/index.md
69-
- Guide: developer/api/guide/index.md
70-
- Guide:
71-
- Overview: developer/guide/index.md
72-
- Architecture: developer/guide/architecture.md
73-
- Prerequisites: developer/guide/prerequisites.md
74-
- Design: developer/guide/design.md
75-
- IDE Setup: developer/guide/ide-setup.md
76-
- Cloning: developer/guide/checking-out-the-code.md
77-
- Configuration: developer/guide/configuration.md
78-
- Building: developer/guide/building.md
79-
- Road Map: developer/guide/roadmap.md
80-
- Workflows: developer/guide/developer-workflows.md
81-
- "": developer/guide/templates/pull-request-template.md
82-
- "": developer/guide/templates/commit-message-convention.md
83-
- Documentation: developer/documentation/index.md
84-
- Manual:
85-
- developer/manual/index.md
86-
- License: about/license.md
64+
- developer/index.md
65+
- API:
66+
- developer/api/index.md
67+
- Reference: developer/api/manual/index.md
68+
- Guide: developer/api/guide/index.md
69+
- Guide:
70+
- Overview: developer/guide/index.md
71+
- Architecture: developer/guide/architecture.md
72+
- Prerequisites: developer/guide/prerequisites.md
73+
- Design: developer/guide/design.md
74+
- IDE Setup: developer/guide/ide-setup.md
75+
- Cloning: developer/guide/cloning.md
76+
- Configuration: developer/guide/configuration.md
77+
- Building: developer/guide/building.md
78+
- Road Map: developer/guide/roadmap.md
79+
- Workflows: developer/guide/workflows.md
80+
- "": developer/guide/templates/pull-request-template.md
81+
- "": developer/guide/templates/commit-message-convention.md
82+
- Documentation: developer/documentation/index.md
83+
- Manual: developer/manual/index.md
84+
- License: about/license.md
8785
- DevOps:
8886
- devops/index.md
8987
- Guide: devops/guide/index.md

docs/python_manual_hook.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ def on_startup(command, dirty):
2222
"migrations",
2323
"tests"]
2424
for root, dirs, files in os.walk("../django_project"):
25-
file = os.path.join(root, file)
26-
ignored = False;
27-
if file.endswith(".py"):
28-
for item in ignore_list:
29-
if item in file:
30-
ignored = True;
31-
#print (item, file, ignored)
32-
if not ignored:
33-
file = file.replace("../django_project/", "::: ")
34-
file = file.replace("/", ".")
35-
file = file.replace(".py", "")
36-
template = template + file + "\n"
25+
for file in files:
26+
file = os.path.join(root, file)
27+
ignored = False;
28+
if file.endswith(".py"):
29+
for item in ignore_list:
30+
if item in file:
31+
ignored = True;
32+
#print (item, file, ignored)
33+
if not ignored:
34+
file = file.replace("../django_project/", "::: ")
35+
file = file.replace("/", ".")
36+
file = file.replace(".py", "")
37+
template = template + file + "\n"
38+
file = open("src/developer/manual/index.md","wt")
3739
file.write(template)
38-
file = open("docs/src/developer/manual/index.md","wt")
3940
file.close()

docs/src/developer/documentation/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ Once your pull request is opened you need to wait for it to be merged before you
304304

305305
## Creating new files
306306

307+
### Page metadata
307308
Whenever you create a new file, you should add the standard header to the top of the file:
308309

309310
```
@@ -324,6 +325,21 @@ The summary can be updated to include your name for documents you contribute to.
324325

325326
The context_id is used to create a unique permalink to this document, and is optional. See further down in this document for more details.
326327

328+
### Navigation
329+
330+
All pages need to be added to the 'Nav' section of the `mkdocs-base.yml` file. This will ensure that it is available in the menus and that mkdocs renders without errors. For example, if you wish to add a new page to the User Guide area, in Nav you would add a line like this:
331+
332+
333+
`- "Navigating the map": users/guide/map-navigation.md`
334+
335+
Sometimes you may not wish to have the new page displayed in the menu system (this can be useful when, for example, it is accessed via a link in another page. In these cases, leave the menu entry part blank e.g.
336+
337+
`- "": users/guide/map-navigation.md`
338+
339+
340+
Mkdocs will still generate the page but it will not be added to the menu.
341+
342+
327343
## Technical notes
328344

329345
### Working locally

docs/src/developer/guide/checking-out-the-code.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/src/developer/guide/developer-workflows.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)