Skip to content

Commit 8cbc205

Browse files
author
Drew Yang
committed
docs: πŸ“ add comments and docs for the next contributor
1 parent 80d41fc commit 8cbc205

File tree

7 files changed

+56
-8
lines changed

7 files changed

+56
-8
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Then install the required packages:
3939
pip install -r pip_requirements.txt
4040
```
4141

42-
Run mkdocs at http://127.0.0.1:8000/docs/:
42+
Run mkdocs at: http://127.0.0.1:8000/docs/
4343
```bash
4444
# It will automatically reload the docs when changes are made
4545
mkdocs serve --config-file ./mkdocs.yaml
@@ -61,3 +61,32 @@ Navigate to http://127.0.0.1:8000/docs/ to preview the changes.
6161

6262
This setup supports live-reloading so all that is needed is to save the markdown files
6363
and/or `mkdocs.yaml` file to trigger a reload.
64+
65+
## Mkdocs Warning Explanation
66+
67+
> TL;DR: We need to do it this way for hosting, please keep it as is.
68+
69+
```log
70+
WARNING - A reference to 'core/datajoint-python/' is included in the 'nav' configuration, which is not found
71+
in the documentation files.
72+
INFO - Doc file 'index.md' contains an unrecognized relative link './core/datajoint-python/', it was left
73+
as is.
74+
```
75+
76+
- We use reverse proxy to proxy our docs sites, here is the proxy flow:
77+
- You hit `datajoint.com/*` on your browser
78+
- It'll bring you to the reverse proxy server first, that you wouldn't notice
79+
- when your URL ends with:
80+
- `/` is the company page
81+
- `/docs/` is the landing/navigation page hosted by datajoint/datajoint-docs's github pages
82+
- `/docs/core/datajoint-python/` is the actual docs site hosted by datajoint/datajoint-python's github pages
83+
- `/docs/elements/element-*/` is the actual docs site hosted by each element's github pages
84+
85+
86+
```log
87+
WARNING - Doc file 'partnerships/openephysgui.md' contains a link
88+
'../../images/community-partnerships-openephysgui-logo.png', but the target
89+
'../images/community-partnerships-openephysgui-logo.png' is not found among documentation files.
90+
Did you mean '../images/community-partnerships-openephysgui-logo.png'?
91+
```
92+
- We use Github Pages to host our docs, the image references needs to follow the mkdocs's build directory structure, under `site/` directory once you run mkdocs.

β€Žmkdocs.yamlβ€Ž

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ repo_name: datajoint/datajoint-docs
66
repo_url: https://github.com/datajoint/datajoint-docs
77
nav:
88
- Welcome: index.md
9+
# relative site url, not pointing to any docs in the repo
10+
# it's for reverse proxy to proxy datajoint-python docs
911
- DataJoint Python: core/datajoint-python/
1012
- DataJoint Elements:
1113
- elements/index.md
@@ -69,9 +71,10 @@ theme:
6971
plugins:
7072
- search
7173
- section-index
72-
- redirects:
73-
redirect_maps:
74-
"index.md": "welcome.md"
74+
# There is no welcome.md anymore
75+
# - redirects:
76+
# redirect_maps:
77+
# "index.md": "welcome.md"
7578
- exclude:
7679
glob:
7780
- archive/*
@@ -85,8 +88,8 @@ markdown_extensions:
8588
options:
8689
custom_icons:
8790
- .overrides/.icons
88-
emoji_index: !!python/name:materialx.emoji.twemoji
89-
emoji_generator: !!python/name:materialx.emoji.to_svg
91+
emoji_index: !!python/name:material.extensions.emoji.twemoji
92+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
9093
- mdx_truly_sane_lists
9194
- pymdownx.superfences:
9295
custom_fences:
@@ -103,8 +106,9 @@ markdown_extensions:
103106
custom_checkbox: true
104107
extra:
105108
generator: false # Disable watermark
106-
version:
107-
provider: mike
109+
# There is no version for this doc
110+
# version:
111+
# provider: mike
108112
social:
109113
- icon: main/company-logo
110114
link: https://www.datajoint.com

β€Žsrc/partnerships/dandi.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sustainability Roadmap between DataJoint Elements and DANDI Archive
22

33
<figure markdown>
4+
<!-- mkdocs will complain about this -->
5+
<!-- since we will host on github pages, the relative ref needs to follow the structure in -->
6+
<!-- the mkdocs's build dir $PROJ_DIR/site/images/, which is two directories above the html -->
47
![datajoint](../../images/company-logo-black.svg){: style="height:50px; padding-right:25px"}
58
![dandi](../../images/community-partnerships-dandi-logo.png){: style="height:83px"}
69
</figure>

β€Žsrc/partnerships/facemap.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sustainability Roadmap between DataJoint Elements and Facemap
22

33
<figure markdown>
4+
<!-- mkdocs will complain about this -->
5+
<!-- since we will host on github pages, the relative ref needs to follow the structure in -->
6+
<!-- the mkdocs's build dir $PROJ_DIR/site/images/, which is two directories above the html -->
47
![datajoint](../../images/company-logo-black.svg){: style="height:50px; padding-right:25px"}
58
![facemap](../../images/community-partnerships-facemap-logo.png){: style="width:100px"}
69
</figure>

β€Žsrc/partnerships/nwb.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sustainability Roadmap between DataJoint Elements and Neurodata Without Borders
22

33
<figure markdown>
4+
<!-- mkdocs will complain about this -->
5+
<!-- since we will host on github pages, the relative ref needs to follow the structure in -->
6+
<!-- the mkdocs's build dir $PROJ_DIR/site/images/, which is two directories above the html -->
47
![datajoint](../../images/company-logo-black.svg){: style="height:50px; padding-right:25px"}
58
![NWB](../../images/community-partnerships-nwb-logo.png){: style="width:300px"}
69
</figure>

β€Žsrc/partnerships/openephysgui.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sustainability Roadmap between DataJoint Elements and Open Ephys GUI
22

33
<figure markdown>
4+
<!-- mkdocs will complain about this -->
5+
<!-- since we will host on github pages, the relative ref needs to follow the structure in -->
6+
<!-- the mkdocs's build dir $PROJ_DIR/site/images/, which is two directories above the html -->
47
![datajoint](../../images/company-logo-black.svg){: style="height:50px; padding-right:25px"}
58
![openephysgui](../../images/community-partnerships-openephysgui-logo.png){: style="height:87px"}
69
</figure>

β€Žsrc/partnerships/suite2p.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sustainability Roadmap between DataJoint Elements and Suite2p
22

33
<figure markdown>
4+
<!-- mkdocs will complain about this -->
5+
<!-- since we will host on github pages, the relative ref needs to follow the structure in -->
6+
<!-- the mkdocs's build dir $PROJ_DIR/site/images/, which is two directories above the html -->
47
![datajoint](../../images/company-logo-black.svg){: style="height:50px; padding-right:25px"}
58
![suite2p](../../images/community-partnerships-suite2p-logo.png){: style="height:70px"}
69
</figure>

0 commit comments

Comments
Β (0)