From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail-a.sr.ht; dkim=pass header.d=johnnyrichard.com header.i=@johnnyrichard.com Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b0]) by mail-a.sr.ht (Postfix) with ESMTPS id E709D2010C for <~johnnyrichard/olang-devel@lists.sr.ht>; Fri, 16 Feb 2024 08:00:50 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1708070450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WZLSF851tM5FnKqMCVi2FwwbFO3ujPVsKbTYkHEWrNA=; b=YAbmgWvWQCkXnUDspreUf3nEHMkxBe6g502VHImD57whPaCHMqUtUDkPNJMy5oHHbjB4SF pWGOMy0RuGrFouYk6aZ8M3WM/w1HMzb8QuZLsC28Ipd8lkDJ4VRK8am+0TrJ9MlrmnWtRb y/u6S07w2qN1Uh5H31k/J/px0F4uvFM9EcMFQj7lFZ4UL/feA/q47kdOPItfYE+f0cjQTT DWuWOQIKEACXoYHbnSAs5omPGzH6yA5E+wF6wdqN6o9Fbk+WxW0pJu8R6bnIsLl6FIcm8G CbEUm79glWP/UF0zeUdVkZVd8AhzRbhL7Q5XA/A5zjAgDqj0y9ZXdCZsVTp2Bw== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang] docs: add sphinx documentation support Date: Fri, 16 Feb 2024 09:59:38 +0100 Message-ID: <20240216090244.40241-2-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-TUID: gA7m3b99SafA This patch introduces an initial setup for our documentation build. As soon as we start writing docs, we can agree on which target should be added to the root Makefile. Signed-off-by: Johnny Richard --- Next step should be documenting the HACKING document and from there we can have engouh information about dependencies and how to build the docs. .gitignore | 1 + docs/Makefile | 20 ++++++++++++++++++++ docs/conf.py | 28 ++++++++++++++++++++++++++++ docs/index.rst | 20 ++++++++++++++++++++ docs/make.bat | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 104 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/make.bat diff --git a/.gitignore b/.gitignore index b140d08..77f3000 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ 0c build *.o +docs/_build diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?=3D +SPHINXBUILD ?=3D sphinx-build +SOURCEDIR =3D . +BUILDDIR =3D _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..ee7421a --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,28 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentatio= n: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information -------------------------------------------------= ---- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-in= formation + +project =3D 'olang' +copyright =3D '2024, olang maintainers' +author =3D 'olang maintainers' +release =3D '0.0.1' + +# -- General configuration -----------------------------------------------= ---- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-co= nfiguration + +extensions =3D [] + +templates_path =3D ['_templates'] +exclude_patterns =3D ['_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ---------------------------------------------= ---- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-fo= r-html-output + +html_theme =3D 'alabaster' +html_static_path =3D ['_static'] diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..447f3af --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. olang documentation master file, created by + sphinx-quickstart on Fri Feb 16 09:48:43 2024. + You can adapt this file completely to your liking, but it should at lea= st + contain the root `toctree` directive. + +Welcome to olang's documentation! +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..32bb245 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF=0D +=0D +pushd %~dp0=0D +=0D +REM Command file for Sphinx documentation=0D +=0D +if "%SPHINXBUILD%" =3D=3D "" (=0D + set SPHINXBUILD=3Dsphinx-build=0D +)=0D +set SOURCEDIR=3D.=0D +set BUILDDIR=3D_build=0D +=0D +%SPHINXBUILD% >NUL 2>NUL=0D +if errorlevel 9009 (=0D + echo.=0D + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx= =0D + echo.installed, then set the SPHINXBUILD environment variable to point=0D + echo.to the full path of the 'sphinx-build' executable. Alternatively you= =0D + echo.may add the Sphinx directory to PATH.=0D + echo.=0D + echo.If you don't have Sphinx installed, grab it from=0D + echo.https://www.sphinx-doc.org/=0D + exit /b 1=0D +)=0D +=0D +if "%1" =3D=3D "" goto help=0D +=0D +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%=0D +goto end=0D +=0D +:help=0D +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%=0D +=0D +:end=0D +popd=0D --=20 2.42.0