Skip to content

Commit 9198b96

Browse files
authored
Add Sphinx documentation and Getting Started guide (#620)
* Add an initial skeleton for Sphinx documentation * Onboard existing documentation to new docs/ * Update getting started guide * Update Getting Started for nox-based development
1 parent 23c67ac commit 9198b96

17 files changed

+294
-14
lines changed

docs/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SOURCEDIR = source
8+
BUILDDIR = build
9+
10+
# Put it first so that "make" without argument is like "make help".
11+
help:
12+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
14+
.PHONY: help Makefile
15+
16+
# Catch-all target: route all unknown targets to Sphinx using the new
17+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+
%: Makefile
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

docs/source/conf.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
project = 'Junction'
2+
copyright = '2019, Junction Developers'
3+
author = 'Junction Developers'
4+
5+
6+
# -- General configuration ---------------------------------------------------
7+
8+
# Add any Sphinx extension module names here, as strings. They can be
9+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
10+
# ones.
11+
extensions = ['recommonmark']
12+
13+
# Add any paths that contain templates here, relative to this directory.
14+
templates_path = ['_templates']
15+
16+
# List of patterns, relative to source directory, that match files and
17+
# directories to ignore when looking for source files.
18+
# This pattern also affects html_static_path and html_extra_path.
19+
exclude_patterns = []
20+
21+
# The suffix of source filenames.
22+
source_suffix = {
23+
'.rst': 'restructuredtext',
24+
'.md': 'markdown',
25+
}
26+
27+
# -- Options for HTML output -------------------------------------------------
28+
29+
# The theme to use for HTML and HTML Help pages. See the documentation for
30+
# a list of builtin themes.
31+
#
32+
html_theme = 'alabaster'
33+
34+
# Add any paths that contain custom static files (such as style sheets) here,
35+
# relative to this directory. They are copied after the builtin static files,
36+
# so a file named "default.css" will overwrite the builtin "default.css".
37+
html_static_path = ['_static']
38+
39+
# -- Recommonmark/Markdown stuff ---------------------------------------------
40+
# NOTE: This entire section should be removed once the old/ folder is removed
41+
# from the docs/ directory.
42+
43+
from recommonmark.parser import CommonMarkParser
44+
from recommonmark.transform import AutoStructify
45+
46+
47+
def setup(app):
48+
app.add_config_value('recommonmark_config', {
49+
'enable_auto_toc_tree': True,
50+
}, True)
51+
app.add_transform(AutoStructify)

0 commit comments

Comments
 (0)