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-181.mta0.migadu.com (out-181.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b5]) by mail-a.sr.ht (Postfix) with ESMTPS id 6B5FE200BD for <~johnnyrichard/olang-devel@lists.sr.ht>; Fri, 16 Feb 2024 15:25:54 +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=1708097154; 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=JZ5kYT2sWO45tBUJcVE2hjrF56JtlVLL2l/SX7fiDqI=; b=bJ6y+/fG3sIdnJCXx57NNsZYFoG91zyGHiFU2ySmZwLb/sJyAdoGXMm/xJS8LVucBRBToy z1jTyEBoOhfveV8dSSSKf91l+y0D6GN/YMyjKLkmzkUO8Jk+4fp7SsxBcuyLQjHkCPLj8f +shLvjejQIDTraWhGf4AemKee9p3Nie7kegjr2rqeZVHCJIwCYWNylM9gIMoCv2bs0/o7i wCcM5k2rIJ8JA3ATpsr0bAFULLCCO2MZx6pU/VLKwDoipHtahvHE/X1PWQN4bQOfwJGeo3 Qdm/1XIrMAo61u0XlURycTjxLO0AluC+flFH7dFQ2x7V4r+bOAtBpsdwoAo72A== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v2] docs: add sphinx documentation support Date: Fri, 16 Feb 2024 17:24:53 +0100 Message-ID: <20240216162757.44461-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-TUID: Is3Yke9D3v14 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 --- This version: - Removes make.bat (we don't plan to run it on Windows). - Removes modindex on index page. It was responding 404 and we are not sure if it works with C project. .gitignore | 1 + docs/Makefile | 20 ++++++++++++++++++++ docs/conf.py | 28 ++++++++++++++++++++++++++++ docs/index.rst | 13 +++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/index.rst 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 ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _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 documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'olang' +copyright = '2024, olang maintainers' +author = 'olang maintainers' +release = '0.0.1' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [] + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..4ad0971 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,13 @@ +Welcome to olang's documentation! +================================= + +.. toctree:: + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` -- 2.42.0