Skip to content

Commit

Permalink
Make docs build cleanly and add links (#6)
Browse files Browse the repository at this point in the history
* Fix docstring typo

* Use RTD theme locally

* Comment html static path

* Update docs index page

* Remove docs modules

* Clean up
  • Loading branch information
MartinHjelmare authored Apr 4, 2018
1 parent 1685f4a commit 4a98aeb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
11 changes: 9 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# on_rtd is whether we are on readthedocs.org, this line of code
# grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -131,7 +138,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
13 changes: 12 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,15 @@
leicacam API reference
==========================================

.. include:: leicacam.rst
- `Project source at GitHub`_
- `Releases at PyPI`_

.. _`Project source at GitHub`: https://github.com/arve0/leicacam
.. _`Releases at PyPI`: https://pypi.org/project/leicacam/

Contents:

.. toctree::
:maxdepth: 2

leicacam
7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Sphinx>=1.7.2
sphinx_rtd_theme>=0.2.5b2
4 changes: 2 additions & 2 deletions leicacam/cam.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def flush(self):
def send(self, commands):
"""Send commands to LASAF through CAM-socket.
Paramenters
-----------
Parameters
----------
commands : list of tuples or bytes string
Commands as a list of tuples or a bytes string. cam.prefix is
allways prepended before sending.
Expand Down

0 comments on commit 4a98aeb

Please sign in to comment.