Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

Commit e11ddfc

Browse files
cdeckerrustyrussell
authored andcommitted
docs: Add configuration for the sphinx documentation generator
This just takes the existing documentation, and generates a nice HTML version we can point users to. The documentation is automatically generated on every commit to `master` and will be deployed here: https://lightning.readthedocs.io/ Signed-off-by: Christian Decker <[email protected]>
1 parent 8867004 commit e11ddfc

File tree

4 files changed

+278
-0
lines changed

4 files changed

+278
-0
lines changed

doc/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

doc/conf.py

+246
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# c-lightning documentation build configuration file, created by
5+
# sphinx-quickstart on Thu Feb 1 00:24:47 2018.
6+
#
7+
# This file is execfile()d with the current directory set to its
8+
# containing dir.
9+
#
10+
# Note that not all possible configuration values are present in this
11+
# autogenerated file.
12+
#
13+
# All configuration values have a default; values that are commented out
14+
# serve to show the default.
15+
16+
# If extensions (or modules to document with autodoc) are in another directory,
17+
# add these directories to sys.path here. If the directory is relative to the
18+
# documentation root, use os.path.abspath to make it absolute, like shown here.
19+
#
20+
# import os
21+
# import sys
22+
# sys.path.insert(0, os.path.abspath('.'))
23+
24+
# -- General configuration ------------------------------------------------
25+
26+
# If your documentation needs a minimal Sphinx version, state it here.
27+
#
28+
# needs_sphinx = '1.0'
29+
30+
# Add any Sphinx extension module names here, as strings. They can be
31+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32+
# ones.
33+
extensions = [
34+
'sphinx.ext.mathjax',
35+
'sphinx.ext.githubpages',
36+
'sphinx.ext.graphviz',
37+
'sphinx.ext.autodoc',
38+
]
39+
40+
source_parsers = {
41+
'.md': 'recommonmark.parser.CommonMarkParser',
42+
}
43+
44+
# Add any paths that contain templates here, relative to this directory.
45+
templates_path = ['_templates']
46+
47+
# The suffix(es) of source filenames.
48+
# You can specify multiple suffix as a list of string:
49+
#
50+
# source_suffix = ['.rst', '.md']
51+
source_suffix = ['.rst', '.md']
52+
53+
# The encoding of source files.
54+
#
55+
# source_encoding = 'utf-8-sig'
56+
57+
# The master toctree document.
58+
master_doc = 'index'
59+
60+
# General information about the project.
61+
project = 'c-lightning'
62+
copyright = '2019, c-lightning dev community'
63+
author = 'c-lightning Developers'
64+
65+
# The version info for the project you're documenting, acts as replacement for
66+
# |version| and |release|, also used in various other places throughout the
67+
# built documents.
68+
#
69+
# The short X.Y version.
70+
version = '0.6.3'
71+
# The full version, including alpha/beta/rc tags.
72+
release = '0.6.3pre'
73+
74+
# The language for content autogenerated by Sphinx. Refer to documentation
75+
# for a list of supported languages.
76+
#
77+
# This is also used if you do content translation via gettext catalogs.
78+
# Usually you set "language" from the command line for these cases.
79+
language = None
80+
81+
# There are two options for replacing |today|: either, you set today to some
82+
# non-false value, then it is used:
83+
#
84+
# today = ''
85+
#
86+
# Else, today_fmt is used as the format for a strftime call.
87+
#
88+
today_fmt = '%B %d, %Y'
89+
90+
# List of patterns, relative to source directory, that match files and
91+
# directories to ignore when looking for source files.
92+
# This patterns also effect to html_static_path and html_extra_path
93+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'release-notes']
94+
95+
# The reST default role (used for this markup: `text`) to use for all
96+
# documents.
97+
#
98+
# default_role = None
99+
100+
# If true, '()' will be appended to :func: etc. cross-reference text.
101+
#
102+
# add_function_parentheses = True
103+
104+
# If true, the current module name will be prepended to all description
105+
# unit titles (such as .. function::).
106+
#
107+
# add_module_names = True
108+
109+
# If true, sectionauthor and moduleauthor directives will be shown in the
110+
# output. They are ignored by default.
111+
#
112+
# show_authors = False
113+
114+
# The name of the Pygments style to use.
115+
pygments_style = 'sphinx'
116+
117+
# A list of ignored prefixes for module index sorting.
118+
# modindex_common_prefix = []
119+
120+
# If true, keep warnings as "system message" paragraphs in the built documents.
121+
# keep_warnings = False
122+
123+
# If true, `todo` and `todoList` produce output, else they produce nothing.
124+
todo_include_todos = False
125+
126+
127+
# -- Options for HTML output ----------------------------------------------
128+
129+
# The theme to use for HTML and HTML Help pages. See the documentation for
130+
# a list of builtin themes.
131+
#
132+
html_theme = 'sphinx_rtd_theme'
133+
134+
# Theme options are theme-specific and customize the look and feel of a theme
135+
# further. For a list of options available for each theme, see the
136+
# documentation.
137+
#
138+
# html_theme_options = {}
139+
140+
# Add any paths that contain custom themes here, relative to this directory.
141+
# html_theme_path = []
142+
143+
# The name for this set of Sphinx documents.
144+
# "<project> v<release> documentation" by default.
145+
#
146+
html_title = 'c-lightning ' + version
147+
148+
# A shorter title for the navigation bar. Default is the same as html_title.
149+
#
150+
html_short_title = html_title
151+
152+
# The name of an image file (relative to this directory) to place at the top
153+
# of the sidebar.
154+
#
155+
# html_logo = None
156+
157+
# The name of an image file (relative to this directory) to use as a favicon of
158+
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
159+
# pixels large.
160+
#
161+
# html_favicon = None
162+
163+
# Add any paths that contain custom static files (such as style sheets) here,
164+
# relative to this directory. They are copied after the builtin static files,
165+
# so a file named "default.css" will overwrite the builtin "default.css".
166+
html_static_path = ['_static']
167+
168+
# Add any extra paths that contain custom files (such as robots.txt or
169+
# .htaccess) here, relative to this directory. These files are copied
170+
# directly to the root of the documentation.
171+
#
172+
# html_extra_path = []
173+
174+
# If not None, a 'Last updated on:' timestamp is inserted at every page
175+
# bottom, using the given strftime format.
176+
# The empty string is equivalent to '%b %d, %Y'.
177+
#
178+
html_last_updated_fmt = '%b %d, %Y'
179+
180+
# If true, SmartyPants will be used to convert quotes and dashes to
181+
# typographically correct entities.
182+
#
183+
# html_use_smartypants = True
184+
185+
# Custom sidebar templates, maps document names to template names.
186+
#
187+
# html_sidebars = {}
188+
189+
# Additional templates that should be rendered to pages, maps page names to
190+
# template names.
191+
#
192+
# html_additional_pages = {}
193+
194+
# If false, no module index is generated.
195+
#
196+
# html_domain_indices = True
197+
198+
# If false, no index is generated.
199+
#
200+
# html_use_index = True
201+
202+
# If true, the index is split into individual pages for each letter.
203+
#
204+
# html_split_index = False
205+
206+
# If true, links to the reST sources are added to the pages.
207+
#
208+
html_show_sourcelink = False
209+
210+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
211+
#
212+
# html_show_sphinx = True
213+
214+
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
215+
#
216+
# html_show_copyright = True
217+
218+
# If true, an OpenSearch description file will be output, and all pages will
219+
# contain a <link> tag referring to it. The value of this option must be the
220+
# base URL from which the finished HTML is served.
221+
#
222+
# html_use_opensearch = ''
223+
224+
# This is the file name suffix for HTML files (e.g. ".xhtml").
225+
# html_file_suffix = None
226+
227+
# Language to be used for generating the HTML full-text search index.
228+
# Sphinx supports the following languages:
229+
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
230+
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
231+
#
232+
# html_search_language = 'en'
233+
234+
# A dictionary with options for the search language support, empty by default.
235+
# 'ja' uses this config value.
236+
# 'zh' user can custom change `jieba` dictionary path.
237+
#
238+
# html_search_options = {'type': 'default'}
239+
240+
# The name of a javascript file (relative to the configuration directory) that
241+
# implements a search results scorer. If empty, the default will be used.
242+
#
243+
# html_search_scorer = 'scorer.js'
244+
245+
# Output file base name for HTML help builder.
246+
htmlhelp_basename = 'c-lightningdoc'

doc/index.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
c-lightning Documentation
2+
=========================
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
:caption: User Documentation
7+
8+
INSTALL.md
9+
TOR.md
10+
11+
.. toctree::
12+
:maxdepth: 2
13+
:caption: Integrator Documentation
14+
15+
Writing plugins <PLUGINS.md>
16+
17+
.. toctree::
18+
:maxdepth: 1
19+
:caption: Developer Documentation
20+
21+
HACKING.md
22+
Coding Style Guideline <STYLE.md>
23+
MAKING-RELEASES.md
24+
CHANGELOG.md

doc/requirements.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sphinx-rtd-theme==0.4.2
2+
sphinxcontrib-websupport==1.1.0
3+
m2r==0.2.1
4+
Sphinx==1.8.4
5+
commonmark==0.8.1
6+
commonmark==0.8.1
7+
recommonmark==0.5.0

0 commit comments

Comments
 (0)