Skip to content

Commit cfb23cf

Browse files
committed
Updated readme for tags / development notes
1 parent 529e039 commit cfb23cf

File tree

3 files changed

+53
-11
lines changed

3 files changed

+53
-11
lines changed

Development.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Development
2+
3+
## Plugins
4+
5+
The plugins in use include
6+
7+
* [Material Theme for mkdocs](https://squidfunk.github.io/mkdocs-material/)
8+
* [MkdocsTagPlugin - Support for Tags](https://github.com/srymh/MkdocsTagPlugin)
9+
10+
## Build System
11+
12+
For most folks they only want to add pages or images via Github so are not interested in how the main page is built.
13+
However for those interested the documentation pages are built into a site using mkdocs and the mkdocs material theme using a ci script
14+
[.github/workflows/ci.yml](.github/workflows/ci.yml)
15+
16+
This is typically automatic as soon as a new commit is pushed
17+
18+
### Manual Build
19+
20+
If you want to experiment manually building the documentation for experimenting with plugins etc.
21+
There's a script in the root directory called **build.py** which can be used with python 3.8 / mkdocs / mkdocs material / any other plugins required.
22+
There's also a **virtenv** directory that can be used to setup a virtual python environment.
23+
24+
To have the site built locally and visible on [http://127.0.0.1:8000] on your own machine
25+
You can ether run
26+
27+
* build.py serve
28+
* mkdocs serve --livereload

README.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,35 @@
22
# Documentation
33

44
This repo contains the official documentation for Hackspace Manchester.
5-
65
All members can push edits or new documentation to this repo and it will automatically build and will be available at https://docs.hacman.org.uk
7-
86
This uses Github Actions and MKDocs
97

10-
## Build Process
8+
The syntax in use is markdown, for editing pages it is suggested to use an online markdown editor such as
9+
https://stackedit.io/app#
10+
11+
## Tags
1112

12-
### Automated Build
13+
This repo now has support for tags within the documentation.
14+
To add a tag to a page as an example
1315

14-
For most folks they only want to add pages or images via Github so are not interested in how the main page is built.
15-
However for those interested the documentation pages are built into a site using mkdocs and the mkdocs material theme using a ci script
16-
[.github/workflows/ci.yml](.github/workflows/ci.yml)
16+
Add something like this to the top of the page to add a tag
17+
**docs/Tools_Equipment/Wood_Working/Table_Saw_ts2500.md**
18+
```
19+
---
20+
tags:
21+
- Equipment
22+
---
23+
```
1724

18-
## Manual Build
25+
Next if the Tag is a new tag we need to create a page for it
26+
to show all pages that are a member of this tag
27+
**docs/tags/Equipment.md**
28+
```
29+
---
30+
pagetype: tagpage
31+
---
1932
20-
If you want to experiment manually building the documentation for experimenting with plugins etc. There's a script in the root directory called **build.py** which can be used with python 3.8 / mkdocs / mkdocs material / any other plugins required.
33+
# Tag: Equipment
2134
22-
There's also a **virtenv** directory that can be used to setup a virtual python environment.
35+
Equipment related pages
36+
```

build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def publish(self):
5555

5656
def serve(self):
5757
print("Starting MkDocs Server http://127.0.0.1:8000")
58-
cmdopts = ["mkdocs", "serve"]
58+
cmdopts = ["mkdocs", "serve", "--livereload"]
5959
self.run_cmd(cmdopts, self.MKDOCSDIR)
6060
print ("Server Closed.")
6161

0 commit comments

Comments
 (0)