Skip to content

Commit 022c8d1

Browse files
committed
setup docs folder
1 parent 6199adb commit 022c8d1

File tree

5 files changed

+77
-10
lines changed

5 files changed

+77
-10
lines changed

docs/_static/favicon.ico

4.31 KB
Binary file not shown.

api.rst renamed to docs/api.rst

File renamed without changes.

conf.py renamed to docs/conf.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
import os
2020
import sys
21-
sys.path.insert(0, os.path.abspath('.'))
21+
sys.path.insert(0, os.path.abspath('..'))
2222

2323
# -- General configuration ------------------------------------------------
2424

@@ -36,29 +36,32 @@
3636
'sphinx.ext.intersphinx'
3737
]
3838

39-
autodoc_mock_imports = []
39+
# Uncomment the below if you use native CircuitPython modules such as
40+
# digitalio, micropython and busio. List the modules you use. Without it, the
41+
# autodoc module docs will fail to generate with a warning.
42+
autodoc_mock_imports = ["micropython", "adafruit_bus_device", "adafruit_register"]
4043

4144
# Mock out micropython ourselves.
42-
import imp
43-
m = imp.new_module("micropython")
44-
m.const = lambda x: x
45-
sys.modules["micropython"] = m
45+
#import imp
46+
#m = imp.new_module("micropython")
47+
#m.const = lambda x: x
48+
#sys.modules["micropython"] = m
4649

4750
# Add any paths that contain templates here, relative to this directory.
4851
templates_path = ['_templates']
4952

5053
# The suffix(es) of source filenames.
5154
# You can specify multiple suffix as a list of string:
5255
#
53-
source_suffix = ['.rst', '.md']
54-
# source_suffix = '.rst'
56+
#source_suffix = ['.rst', '.md']
57+
source_suffix = '.rst'
5558

5659
# The encoding of source files.
5760
#
5861
# source_encoding = 'utf-8-sig'
5962

6063
# The master toctree document.
61-
master_doc = 'README'
64+
master_doc = 'index'
6265

6366
# General information about the project.
6467
project = u'Adafruit\'s CCS811 Library'
@@ -93,7 +96,7 @@
9396
# List of patterns, relative to source directory, that match files and
9497
# directories to ignore when looking for source files.
9598
# This patterns also effect to html_static_path and html_extra_path
96-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
99+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md']
97100

98101
# The reST default role (used for this markup: `text`) to use for all
99102
# documents.
@@ -126,6 +129,9 @@
126129
# If true, `todo` and `todoList` produce output, else they produce nothing.
127130
todo_include_todos = True
128131

132+
# If this is True, todo emits a warning for each TODO entries. The default is False.
133+
todo_emit_warnings = True
134+
129135

130136
# -- Options for HTML output ----------------------------------------------
131137

@@ -179,6 +185,12 @@
179185
# so a file named "default.css" will overwrite the builtin "default.css".
180186
html_static_path = ['_static']
181187

188+
# The name of an image file (relative to this directory) to use as a favicon of
189+
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
190+
# pixels large.
191+
#
192+
html_favicon = '_static/favicon.ico'
193+
182194
# Add any extra paths that contain custom files (such as robots.txt or
183195
# .htaccess) here, relative to this directory. These files are copied
184196
# directly to the root of the documentation.

docs/examples.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Simple test
2+
------------
3+
4+
Ensure your device works with this simple test.
5+
6+
.. literalinclude:: ../examples/ccs811_simpletest.py
7+
:caption: examples/ccs811_simpletest.py
8+
:linenos:

docs/index.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. include:: ../README.rst
2+
3+
Table of Contents
4+
=================
5+
6+
.. toctree::
7+
:maxdepth: 4
8+
:hidden:
9+
10+
self
11+
12+
.. toctree::
13+
:caption: Examples
14+
15+
examples
16+
17+
.. toctree::
18+
:caption: API Reference
19+
:maxdepth: 3
20+
21+
api
22+
23+
.. toctree::
24+
:caption: Tutorials
25+
26+
.. toctree::
27+
:caption: Related Products
28+
29+
Adafruit CCS811 Air Quality Sensor Breakout - VOC and eCO2 <https://www.adafruit.com/product/3566>
30+
31+
.. toctree::
32+
:caption: Other Links
33+
34+
Download <https://github.com/adafruit/Adafruit_CircuitPython_CCS811/releases/latest>
35+
CircuitPython Reference Documentation <https://circuitpython.readthedocs.io>
36+
CircuitPython Support Forum <https://forums.adafruit.com/viewforum.php?f=60>
37+
Discord Chat <https://adafru.it/discord>
38+
Adafruit Learning System <https://learn.adafruit.com>
39+
Adafruit Blog <https://blog.adafruit.com>
40+
Adafruit Store <https://www.adafruit.com>
41+
42+
Indices and tables
43+
==================
44+
45+
* :ref:`genindex`
46+
* :ref:`modindex`
47+
* :ref:`search`

0 commit comments

Comments
 (0)