Skip to content

Commit

Permalink
Fix Sphinx documentation
Browse files Browse the repository at this point in the history
For some reason the Read the Docs does not generate the
module documentation. This change fixes at least fix
possible reasons for this. The 'snippy_import_hook' had
incorrect syntax for 'Args'. The autodoc extension was
missing for Sphinx configuration and the configuration
had the HTML theme setting twice.

Signed-off-by: Heikki Laaksonen <laaksonen.heikki.j@gmail.com>
  • Loading branch information
heilaaks committed Jun 23, 2019
1 parent d4e5ec9 commit 70cc875
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
9 changes: 1 addition & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,9 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# 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']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'sphinx==1.8.5 ; python_version<="3.4"',
'sphinx==2.1.1 ; python_version>"3.4"',
"sphinx_rtd_theme==0.4.3",
'sphinx-autobuild==0.7.1'
)

EXTRAS_TEST = (
Expand Down
10 changes: 5 additions & 5 deletions snippy_tldr/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@


def snippy_import_hook(logger, uri):
"""Import content for Snippy.
"""Import content for Snippy tool.
This is an import hook that must return an iterator object. The iterator
must be iterable class that implements ``next`` and ``len`` methods. The
returned JSON must pass the ``snippy.plugins.Schema.validate()`` method.
returned JSON must pass the ``validate`` method in ``snippy.plugins.Schema``
The ``snippy.plugins.Parser`` class may be used to parse the source data
to a JSON content for Snippy.
Expand Down Expand Up @@ -81,13 +81,13 @@ def snippy_import_hook(logger, uri):
*translation* | A tldr man page page translation like ``pages.it`` or ``pages.zh``.
*tldr file* | A single tldr man page Markdown file. The term ``tldr man page`` is not used in order to
| avoid confusion with term ``page``.
*tldr file* | A single tldr man page Markdown file. The term ``tldr man page`` is not used in order
| to avoid confusion with term ``page``.
*tldr files* | All tldr man page Markdown files under one page.
============= ======================================================================
Args
Args:
logger (obj): Logger to be used with the plugin.
uri (str): URI or path where the data is imported.
Expand Down

0 comments on commit 70cc875

Please sign in to comment.