From 0290f53b849b2316d839c1d1534ed09c068bed39 Mon Sep 17 00:00:00 2001 From: Eliott Dumeix Date: Sat, 11 Feb 2023 19:26:02 +0100 Subject: [PATCH] fix doc and add instructions, fix #23 --- README.rst | 11 +++++++++++ doc/Makefile | 2 +- doc/requirements.txt | 3 +++ doc/source/conf.py | 7 +++++-- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index b296d7e..60192c3 100644 --- a/README.rst +++ b/README.rst @@ -267,3 +267,14 @@ Will output: } } } + +Command line +============================================================================== + +Documentation can be built with Sphinx: + +.. code-block:: + + $ cd doc + $ pip install -r requirements.txt + $ make html diff --git a/doc/Makefile b/doc/Makefile index d7b2eda..77f788a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = python3.6 -msphinx +SPHINXBUILD = python3 -msphinx SPHINXPROJ = luaparser SOURCEDIR = source BUILDDIR = build diff --git a/doc/requirements.txt b/doc/requirements.txt index e69de29..53de3b4 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx +sphinx_rtd_theme +sphinxcontrib-napoleon diff --git a/doc/source/conf.py b/doc/source/conf.py index 4754c9e..caee557 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -20,6 +20,9 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ------------------------------------------------ @@ -63,7 +66,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -93,7 +96,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'] # Custom sidebar templates, must be a dictionary that maps document names # to template names.