Skip to content

Commit a2da3ce

Browse files
author
Drew Yang
committed
docs: 📝 improve README
1 parent 30c6175 commit a2da3ce

File tree

1 file changed

+47
-17
lines changed

1 file changed

+47
-17
lines changed

README.md

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,62 @@
22

33
This is the home for DataJoint software documentation as hosted at https://datajoint.com/docs
44

5-
## Test Locally
6-
7-
To run locally, ensure you have `Docker` and `Docker Compose` installed.
8-
9-
Then run the following:
10-
11-
`MODE="LIVE" HOST_UID=$(id -u) docker compose up --build`
12-
13-
Navigate to `http://localhost/` to preview the changes.
14-
15-
This setup supports live-reloading so all that is needed is to save the markdown files
16-
and/or `mkdocs.yaml` file to trigger a reload.
17-
18-
## Linters and Settings
5+
## VSCode Linter Extensions and Settings
196

207
The following extensions were used in developing these docs, with the corresponding
218
settings files:
229

23-
- [MarkdownLinter](https://github.com/DavidAnson/markdownlint):
10+
- Recommended extensions are already specified in `.vscode/extensions.json`, it will ask you to install them when you open the project if you haven't installed them.
11+
- settings in `.vscode/settings.json`
12+
- [MarkdownLinter](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint):
2413
- `.markdownlint.yaml` establishes settings for various
2514
[linter rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md)
2615
- `.vscode/settings.json` formatting on save to fix linting
2716

28-
- [CSpell](https://github.com/streetsidesoftware/vscode-spell-checker): `cspell.json`
17+
- [CSpell](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker): `cspell.json`
2918
has various ignored words.
3019

31-
- [ReWrap](https://github.com/stkb/Rewrap/): `.vscode/settings.json` allows toggling
20+
- [ReWrap](https://marketplace.visualstudio.com/items?itemName=stkb.rewrap): `.vscode/settings.json` allows toggling
3221
automated hard wrapping for files at 88 characters. This can also be keymapped to be
3322
performed on individual paragraphs, see documentation.
23+
24+
## With Virtual Environment
25+
26+
conda
27+
```bash
28+
conda create -n djdocs -y
29+
conda activate djdocs
30+
```
31+
venv
32+
```bash
33+
python -m venv .venv
34+
source .venv/bin/activate
35+
```
36+
37+
Then install the required packages:
38+
```bash
39+
pip install -r pip_requirements.txt
40+
```
41+
42+
Run mkdocs at http://127.0.0.1:8000/docs/:
43+
```bash
44+
# It will automatically reload the docs when changes are made
45+
mkdocs serve --config-file ./mkdocs.yaml
46+
```
47+
48+
## With Docker
49+
50+
> We mostly use Docker to simplify docs deployment
51+
52+
Ensure you have `Docker` and `Docker Compose` installed.
53+
54+
Then run the following:
55+
```bash
56+
# It will automatically reload the docs when changes are made
57+
MODE="LIVE" docker compose up --build
58+
```
59+
60+
Navigate to http://127.0.0.1:8000/docs/ to preview the changes.
61+
62+
This setup supports live-reloading so all that is needed is to save the markdown files
63+
and/or `mkdocs.yaml` file to trigger a reload.

0 commit comments

Comments
 (0)