Skip to content

Commit a7aa51c

Browse files
author
Néstor Salceda
authored
docs: Add some structure to documentation (#176)
* docs: Simplify structure and work with left bars * fix: Fix a couple of issues on documentation * fix: Use the Read the docs theme This was just to read how to use it with left bars
1 parent 856a2ee commit a7aa51c

File tree

9 files changed

+44
-202
lines changed

9 files changed

+44
-202
lines changed

docs/conf.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#
1919
import os
2020
import sys
21+
from datetime import datetime
2122

2223
sys.path.insert(0, os.path.abspath('..'))
2324

@@ -32,7 +33,7 @@
3233
# ones.
3334
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosectionlabel', 'sphinx.ext.graphviz',
3435
'sphinx.ext.inheritance_diagram', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary',
35-
'sphinx.ext.githubpages', 'sphinx.ext.napoleon']
36+
'sphinx.ext.githubpages', 'sphinx.ext.napoleon', 'sphinx_rtd_theme']
3637

3738
# Add any paths that contain templates here, relative to this directory.
3839
templates_path = ['_templates']
@@ -48,7 +49,7 @@
4849

4950
# General information about the project.
5051
project = u'Sysdig SDK for Python'
51-
copyright = u'2016, Sysdig Inc.'
52+
copyright = f'2016-{datetime.now().year}, Sysdig Inc.'
5253
author = u'Sysdig Inc.'
5354

5455
# The version info for the project you're documenting, acts as replacement for
@@ -83,23 +84,13 @@
8384
# The theme to use for HTML and HTML Help pages. See the documentation for
8485
# a list of builtin themes.
8586
#
86-
html_theme = 'sphinx_material'
87+
html_theme = 'sphinx_rtd_theme'
8788

8889
# Theme options are theme-specific and customize the look and feel of a theme
8990
# further. For a list of options available for each theme, see the
9091
# documentation.
9192
#
92-
html_theme_options = {
93-
'nav_title': 'Sysdig SDK for Python',
94-
'base_url': 'https://sysdiglabs.github.io/sysdig-sdk-python',
95-
'color_primary': 'blue',
96-
'color_accent': 'light-blue',
97-
'repo_url': 'https://github.com/sysdiglabs/sysdig-sdk-python/',
98-
'repo_name': 'Sysdig SDK for Python',
99-
'globaltoc_depth': 3,
100-
'globaltoc_collapse': False,
101-
'globaltoc_includehidden': False,
102-
}
93+
html_theme_options = {}
10394

10495
# Add any paths that contain custom static files (such as style sheets) here,
10596
# relative to this directory. They are copied after the builtin static files,

docs/index.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
.. python-sdc-client documentation master file, created by
2-
sphinx-quickstart on Thu Dec 22 11:59:02 2016.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
61
Sysdig SDK for Python
72
=====================
83

94
This module is a wrapper around the Sysdig Monitor/Sysdig Secure APIs.
105
It exposes most of the sysdig REST API functionality as an easy to use and easy to
116
install Python interface.
127

13-
.. toctree::
14-
:maxdepth: 2
8+
Having troubles? We would like to help you!
9+
10+
* Looking for specific information? Try the :ref:`genindex`
11+
* Check out the `Sysdig Documentation`_.
12+
* Ask a question in the `Sysdig Slack`_.
1513

16-
install
17-
usage
18-
monitor
19-
secure
14+
.. _Sysdig Documentation: https://docs.sysdig.com
15+
.. _Sysdig Slack: https://sysdig.slack.com
2016

2117

22-
.. autosummary::
18+
.. toctree::
19+
:caption: Quick start
20+
21+
quickstart/install
22+
quickstart/usage
2323

24+
.. toctree::
25+
:caption: API Core Reference
2426

27+
reference/monitor
28+
reference/secure
File renamed without changes.

docs/usage.rst renamed to docs/quickstart/usage.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,3 @@ They can be instantiated like this:
2222
2323
# Instantiate the Sysdig Monitor client
2424
client = SdMonitorClient(api_token)
25-
26-
27-
* :ref:`genindex`
28-
* :ref:`search`
29-

docs/monitor.rst renamed to docs/reference/monitor.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.. automodule:: sdcclient
2-
31
Sysdig Monitor
4-
=====================
2+
==============
3+
54
.. inheritance-diagram:: SdMonitorClient
5+
.. automodule:: sdcclient
66
.. autoclass:: SdMonitorClient
77
:members:
88
:inherited-members:

docs/secure.rst renamed to docs/reference/secure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. automodule:: sdcclient
21
Sysdig Secure
3-
====================
2+
=============
43

4+
.. automodule:: sdcclient
55
.. autoclass:: SdSecureClient
66
:members:
77
:inherited-members:

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sphinx==3.3.1
2-
sphinx-material==0.0.32
2+
sphinx-rtd-theme==0.5.0

0 commit comments

Comments
 (0)