Skip to content

Commit ac90cbb

Browse files
committed
reorganize docs
1 parent a0c3740 commit ac90cbb

23 files changed

+108
-129
lines changed

docs/source/_exts/autogen_api_docs.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
HERE = Path(__file__).parent
1010
PACKAGE_SRC = HERE.parent.parent.parent / "src"
1111

12-
AUTO_DIR = HERE.parent / "auto"
13-
AUTO_DIR.mkdir(exist_ok=True)
12+
REFERENCES_DIR = HERE.parent / "references"
13+
REFERENCES_DIR.mkdir(exist_ok=True)
1414

15-
PUBLIC_API_REFERENCE_FILE = AUTO_DIR / "api-reference.rst"
16-
PRIVATE_API_REFERENCE_FILE = AUTO_DIR / "developer-apis.rst"
15+
PUBLIC_API_REFERENCE_FILE = REFERENCES_DIR / "user-apis.rst"
16+
PRIVATE_API_REFERENCE_FILE = REFERENCES_DIR / "developer-apis.rst"
1717

1818

19-
PUBLIC_TITLE = "API Reference\n=============\n"
19+
PUBLIC_TITLE = "User API\n=============\n"
2020
PUBLIC_MISC_TITLE = "Misc Modules\n------------\n"
21-
PRIVATE_TITLE = "Developer APIs\n==============\n"
21+
PRIVATE_TITLE = "Developer API\n==============\n"
2222
PRIVATE_MISC_TITLE = "Misc Dev Modules\n----------------\n"
2323

2424
AUTODOC_TEMPLATE = ".. automodule:: {module}\n :members:\n"
File renamed without changes.
File renamed without changes.

docs/source/examples.rst

-98
This file was deleted.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Basic Dashboard
2+
---------------
3+
4+
Try interacting with the sliders 📈
5+
6+
.. example:: simple_dashboard

docs/source/guides/making-a-game.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Making a Game
2+
=============
3+
4+
Click to start playing and use the arrow keys to move 🎮
5+
6+
Slow internet may cause inconsistent frame pacing 😅
7+
8+
.. example:: snake_game
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Matplotlib Plot
2+
===============
3+
4+
Pick the polynomial coefficients (separate each coefficient by a space) 🔢:
5+
6+
.. example:: matplotlib_plot

docs/source/getting-started.rst renamed to docs/source/guides/simple-examples.rst

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
Getting Started
1+
Simple Examples
22
===============
33

4+
Simple Slideshow
5+
----------------
6+
47
Let's break down the following example:
58

69
.. example:: slideshow
@@ -93,3 +96,16 @@ WebSocket. To display the layout we can navigate to http://localhost:8765/client
9396
.. _VDOM mimetype specification: https://github.com/nteract/vdom/blob/master/docs/mimetype-spec.md
9497
.. _ReactJS: https://reactjs.org/docs/faq-internals.html
9598
.. _React Hooks: https://reactjs.org/docs/hooks-overview.html
99+
100+
101+
Click Counter
102+
-------------
103+
104+
.. example:: click_count
105+
106+
To Do List
107+
==========
108+
109+
Try typing in the text box and pressing 'Enter' 📋
110+
111+
.. example:: todo
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Using 3rd Party Javascript
2+
==========================
3+
4+
Material UI Button
5+
------------------
6+
7+
Click the button to change the indicator 👇
8+
9+
.. example:: material_ui_switch
10+
11+
12+
Pigeon Maps
13+
-----------
14+
15+
Click the map to create pinned location 📍:
16+
17+
.. example:: pigeon_maps
18+
19+
20+
Cytoscape Notework Graph
21+
------------------------
22+
23+
You can move the nodes in the graph 🕸️:
24+
25+
.. example:: network_graph
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Writing Your Own Javascript
2+
===========================
3+
4+
Shows a very simple chart implemented in vanilla Javascript:
5+
6+
.. example:: super_simple_chart

docs/source/index.rst

+29-19
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,48 @@ IDOM
33

44
.. toctree::
55
:hidden:
6-
:caption: User Guide
6+
:caption: Tutorials
77

8-
installation
9-
getting-started
10-
handling-events
11-
life-cycle-hooks
12-
auto/api-reference
13-
examples
14-
faq
8+
tutorials/installation
9+
tutorials/breaking-down-an-example
10+
tutorials/handling-events
11+
tutorials/javascript-components
1512

1613
.. toctree::
1714
:hidden:
18-
:caption: Advanced Topics
15+
:caption: Guides
1916

20-
core-abstractions
21-
javascript-components
22-
architectural-patterns
23-
specifications
17+
guides/simple-examples
18+
guides/making-a-game
19+
guides/matplotlib-plot
20+
guides/basic-dashboard
21+
guides/using-3rd-party-js
22+
guides/writing-your-own-js
23+
24+
.. toctree::
25+
:hidden:
26+
:caption: References
27+
28+
references/life-cycle-hooks
29+
references/core-abstractions
30+
references/architectural-patterns
31+
references/user-apis
32+
references/specifications
33+
references/faq
2434

2535
.. toctree::
2636
:hidden:
2737
:caption: Development
2838

29-
contributing
30-
developer-guide
31-
auto/developer-apis
32-
changelog
33-
roadmap
39+
development/contributing
40+
development/developer-guide
41+
references/developer-apis
42+
development/changelog
43+
development/roadmap
3444

3545
.. toctree::
3646
:hidden:
37-
:caption: External Resources
47+
:caption: Resources
3848

3949
Source Code <https://github.com/idom-team/idom>
4050
Community <https://github.com/idom-team/idom/discussions>

docs/source/auto/developer-apis.rst renamed to docs/source/references/developer-apis.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Developer APIs
1+
Developer API
22
==============
33

44
.. automodule:: idom._option

docs/source/faq.rst renamed to docs/source/references/faq.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FAQ
2-
===
1+
Common Questions
2+
================
33

44
See our `Discussion Forum <https://github.com/idom-team/idom/discussions>`__ for more
55
questions and answers.

docs/source/auto/api-reference.rst renamed to docs/source/references/user-apis.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
API Reference
1+
User API
22
=============
33

44
.. automodule:: idom.config
File renamed without changes.

noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def docs(session: Session) -> None:
6666
# watch python source too
6767
"--watch=src/idom",
6868
# for some reason this matches absolute paths
69-
"--ignore=**/auto/*",
69+
"--ignore=**/references/*-apis.rst",
7070
"--ignore=**/_static/custom.js",
7171
"--ignore=**/node_modules/*",
7272
"--ignore=**/package-lock.json",

0 commit comments

Comments
 (0)