Skip to content

Commit 4cb0e1a

Browse files
committed
add ToC to pages & refactor docxyfile path
also updates CSS for sphinx and doxygen
1 parent 4d0d1ba commit 4cb0e1a

File tree

10 files changed

+82
-905
lines changed

10 files changed

+82
-905
lines changed

Doxyfile renamed to docs/Doxyfile

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,17 @@ PROJECT_LOGO =
4949
# entered, it will be relative to the location where doxygen was started. If
5050
# left blank the current directory will be used.
5151

52-
OUTPUT_DIRECTORY = ./docs
52+
OUTPUT_DIRECTORY = ./
53+
54+
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
55+
# Stripping is only done if one of the specified strings matches the left-hand part
56+
# of the path. The tag can be used to show relative paths in the file list.
57+
# If left blank the directory from which doxygen is run is used as the path to strip.
58+
# Note that you can specify absolute paths here, but also relative paths, which will
59+
# be relative from the directory where doxygen is started.
60+
#
61+
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
62+
STRIP_FROM_PATH = ../
5363

5464
# Doxygen selects the parser to use depending on the extension of the files it
5565
# parses. With this tag you can assign which parser to use for a given
@@ -159,8 +169,8 @@ WARN_AS_ERROR = YES
159169
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
160170
# Note: If this tag is empty the current directory is searched.
161171

162-
INPUT = . \
163-
./docs
172+
INPUT = .. \
173+
./
164174

165175
# If the value of the INPUT tag contains directories, you can use the
166176
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
@@ -176,8 +186,8 @@ EXCLUDE_PATTERNS = bcm2835* \
176186
# that contain example code fragments that are included (see the \include
177187
# command).
178188

179-
EXAMPLE_PATH = examples \
180-
examples_RPi
189+
EXAMPLE_PATH = ../examples \
190+
../examples_RPi
181191

182192
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
183193
# searched for input files to be used with the \include or \dontinclude commands
@@ -190,14 +200,14 @@ EXAMPLE_RECURSIVE = YES
190200
# that contain images that are to be included in the documentation (see the
191201
# \image command).
192202

193-
IMAGE_PATH = images
203+
IMAGE_PATH = ../images
194204

195205
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
196206
# is part of the input, its contents will be placed on the main page
197207
# (index.html). This can be useful if you have a project on for instance GitHub
198208
# and want to reuse the introduction page also for the doxygen output.
199209

200-
USE_MDFILE_AS_MAINPAGE = ./docs/main_page.md
210+
USE_MDFILE_AS_MAINPAGE = main_page.md
201211

202212
#---------------------------------------------------------------------------
203213
# Configuration options related to the HTML output
@@ -216,6 +226,24 @@ USE_MDFILE_AS_MAINPAGE = ./docs/main_page.md
216226

217227
HTML_EXTRA_STYLESHEET = doxygen-custom.css
218228

229+
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output should be rendered
230+
# with a dark or light theme.
231+
#
232+
# Possible values are:
233+
# - LIGHT always generate light mode output
234+
# - DARK always generate dark mode output
235+
# - AUTO_LIGHT automatically set the mode according to the user preference,
236+
# use light mode if no preference is set (the default)
237+
# - AUTO_DARK automatically set the mode according to the user preference,
238+
# use dark mode if no preference is set
239+
# - TOGGLE allow to user to switch between light and dark mode via a button.
240+
#
241+
# The default value is: AUTO_LIGHT.
242+
#
243+
# This tag requires that the tag GENERATE_HTML is set to YES.
244+
245+
HTML_COLORSTYLE = TOGGLE
246+
219247
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
220248
# page will contain the date and time when the page was generated. Setting this
221249
# to YES can help to show when doxygen was last run and thus if the

docs/addressing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Addressing Format: Understanding Addressing and Topology
2+
3+
@tableofcontents
4+
25
<!-- markdownlint-disable MD033 MD032 -->
36
An overview of addressing in RF24Network
47

docs/advanced_config.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Advanced Configuration
2+
3+
@tableofcontents
4+
25
<!-- markdownlint-disable MD033 -->
36
RF24Network offers many features, some of which can be configured by editing the RF24Network_config.h file
47

docs/doxygen-custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
table.markdownTable th {
2+
color: unset;
3+
}

docs/main_page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Network Layer for RF24 Radios
22

3+
@tableofcontents
4+
35
This class implements an [OSI Network Layer](http://en.wikipedia.org/wiki/Network_layer) using nRF24L01(+) radios driven
46
by the newly optimized [RF24 library fork](http://nRF24.github.com/RF24/).
57

Lines changed: 3 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,13 @@
1-
.md-typeset .admonition,
2-
.md-typeset details {
3-
font-size: 0.75rem;
4-
}
5-
6-
.md-typeset .admonition.tip>.admonition-title::before,
7-
.md-typeset .admonition.hint>.admonition-title::before {
8-
mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,3L1,9L12,15L21,10.09V17H23V9M5,13.18V17.18L12,21L19,17.18V13.18L12,17L5,13.18Z" /></svg>');
9-
}
10-
11-
.md-typeset .admonition.seealso>.admonition-title::before {
12-
mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"/></svg>');
13-
background-color: hsl(301, 100%, 63%);
14-
}
15-
16-
.md-typeset .admonition.seealso {
17-
border-left: .2rem solid hsl(301, 100%, 63%);
18-
}
19-
20-
.md-typeset .admonition.seealso>.admonition-title {
21-
background-color: hsla(287, 100%, 63%, 0.25);
22-
}
23-
24-
.md-typeset .admonition.important>.admonition-title::before {
25-
mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/></svg>');
26-
background-color: hsl(123, 100%, 63%);
27-
}
28-
29-
.md-typeset .admonition.important {
30-
border-left: .2rem solid hsl(123, 100%, 63%);
31-
}
32-
33-
.md-typeset .admonition.important>.admonition-title {
34-
background-color: hsla(123, 100%, 63%, 0.25);
35-
}
36-
37-
.md-typeset .admonition.warning>.admonition-title::before {
38-
background-color: hsl(0, 100%, 63%);
39-
}
40-
41-
.md-typeset .admonition.warning {
42-
border-left: .2rem solid hsl(0, 100%, 63%);
43-
}
44-
45-
.md-typeset .admonition.warning>.admonition-title {
46-
background-color: hsla(0, 100%, 63%, 0.25);
47-
}
48-
491
html .md-nav--primary .md-nav__title--site .md-nav__button {
502
top: 0;
513
left: 0;
524
width: inherit;
535
height: auto;
546
}
557

56-
.md-typeset table:not([class]) th {
57-
background-color: rgba(23, 35, 83, 0.8);
58-
}
59-
60-
.md-typeset table:not([class]) tr:hover {
61-
background-color: rgba(56, 2, 81, 0.8);
62-
box-shadow: inset 0 .05rem 0 #9515ff;
63-
}
64-
65-
[data-md-color-scheme="default"] {
66-
--md-code-bg-color: #e8e7e7;
8+
thead {
9+
background-color: var(--md-default-fg-color--light);
10+
color: var(--md-primary-bg-color);
6711
}
6812

6913
.md-nav__title .md-nav__button.md-logo img, .md-nav__title .md-nav__button.md-logo svg {
@@ -74,25 +18,3 @@ html .md-nav--primary .md-nav__title--site .md-nav__button {
7418
.md-header__button.md-logo img, .md-header__button.md-logo svg {
7519
width: auto;
7620
}
77-
78-
.linenos {
79-
background-color: var(--md-default-bg-color--light);
80-
margin-right: 0.5rem;
81-
}
82-
83-
/* CSS for Remark admonitions (translated by breathe from doxygen's @remark(s) cmd */
84-
:root {
85-
--md-admonition-icon--remark: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>')
86-
}
87-
.md-typeset .admonition.remark {
88-
border-color: rgb(116, 66, 255);
89-
}
90-
.md-typeset .remark > .admonition-title {
91-
background-color: rgba(116, 66, 255, 0.1);
92-
border-color: rgb(116, 66, 255);
93-
}
94-
.md-typeset .remark > .admonition-title::before {
95-
background-color: rgb(116, 66, 255);
96-
-webkit-mask-image: var(--md-admonition-icon--remark);
97-
mask-image: var(--md-admonition-icon--remark);
98-
}

docs/sphinx/conf.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
READTHEDOCS = os.environ.get("READTHEDOCS", None) == "True"
8282

8383
if READTHEDOCS:
84-
subprocess.call("cd ../..; doxygen", shell=True)
84+
subprocess.call("cd ..; doxygen", shell=True)
8585

8686
# -- Options for HTML output -------------------------------------------------
8787

@@ -136,6 +136,32 @@
136136
("cpp:function", dict(include_fields_in_toc=False)),
137137
]
138138

139+
sphinx_immaterial_custom_admonitions = [
140+
{
141+
"name": "warning",
142+
"color": (255, 66, 66),
143+
"icon": "octicons/alert-24",
144+
"override": True,
145+
},
146+
{
147+
"name": "note",
148+
"icon": "octicons/pencil-24",
149+
"override": True,
150+
},
151+
{
152+
"name": "seealso",
153+
"color": (255, 66, 252),
154+
"icon": "octicons/eye-24",
155+
"title": "See Also",
156+
"override": True,
157+
},
158+
{
159+
"name": "remark",
160+
"color": (116, 66, 255),
161+
"icon": "octicons/checklist-16",
162+
},
163+
]
164+
139165
# Set link name generated in the top bar.
140166
html_title = "RF24Network C++ library"
141167

docs/tuning.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Performance and Data Loss: Tuning the Network
2+
3+
@tableofcontents
4+
25
<!-- markdownlint-disable MD031-->
36
Tips and examples for tuning the network and general operation.
47

@@ -44,7 +47,7 @@ In RF24Network, the master is just `00`
4447

4548
## Multicast
4649

47-
Multicast is enabled by default, which limits the master node to 5 child pipes and other nodes to 4. Nodes are
50+
Multicast is enabled by default, which limits the master node to 5 child pipes and other nodes to 4. Nodes are
4851
arranged in multicast 'levels' with the master node being level 0, nodes 01-05 are level 1, nodes n1-n5 are level 2,
4952
and so on. The multicast level of each node can be configured as desired by the user, or multicast can be
5053
disabled by editing RF24Network_config.h. For example, if all nodes are in range of the master node, all nodes can

docs/zigabee.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Comparison to ZigBee
22

3+
@tableofcontents
4+
35
This network layer is influenced by the design of ZigBee, but does not implement it
46
directly.
57

0 commit comments

Comments
 (0)