Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use new sphinx file structure #94

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ dist/
.archive/
.tags/
.misc/
.py*/
docs/source/xml/
docs/build/

# Ignore JetBrains and Eclipse IDE metadata and default build directories
.vscode/
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ MKINDEX = makeindex
PRINTF = printf
GIT = git

BUILD_DIR = build
ARCHIVE_DIR = .archive
TAGS_DIR = .tags
BUILD_DIR = build
DOXYGEN_XML_DIR = docs/source/xml
DOCS_BUILD_DIR = docs/build
ARCHIVE_DIR = .archive
TAGS_DIR = .tags

MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(abspath $(dir $(MAKEFILE_PATH)))
Expand Down Expand Up @@ -112,6 +114,8 @@ taglist:
cleanall:
@$(PRINTF) "Clean the distribution package and temp files...\n"
@$(RM) $(BUILD_DIR)
@$(RM) $(DOXYGEN_XML_DIR)
@$(RM) $(DOCS_BUILD_DIR)


.PHONY: githead
Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ amalgamation distribution under the build directory.
Documentation
-------------

To learn how to use the Argtable3 API, you can see the documentation on the web
To learn how to use the Argtable3 API, you can read the documentation on the web
site, study examples in the `examples` directory, or even check the unit tests
in the `tests` directory.

Expand All @@ -199,24 +199,40 @@ tools:

* [Sphinx](https://www.sphinx-doc.org): A documentation generator based on the
reStructuredText markup format.
* [Read the Docs Sphinx Theme](https://sphinx-rtd-theme.readthedocs.io): A
Sphinx theme designed to look modern and be mobile-friendly.
* [Furo Theme](https://pradyunsg.me/furo/quickstart/): A Sphinx theme designed
to look modern and be mobile-friendly.
* [Breathe](https://breathe.readthedocs.io): A bridge between the Sphinx and
Doxygen documentation systems.
* [Doxygen](http://www.doxygen.nl/): A documentation generator for C/C++
sources.
* [MyST Parser](https://myst-parser.readthedocs.io): A Sphinx extension to parse
MyST, a rich and extensible flavour of Markdown for authoring technical and
scientific documentation.

Go to the `docs` directory and run the `doxygen` command to generate Doxygen XML
output, which will be saved in the `docs/xml` directory:
Except Doxygen, all the document generation tools are Python-based, so you can
install the tools in a Python virtual environment:

```
$ doxygen
$ python --version
Python 3.11.5

$ python -m venv .py311
$ .py311\Scripts\activate.bat

(.py311) $ pip install --upgrade sphinx
(.py311) $ pip install --upgrade furo
(.py311) $ pip install --upgrade breathe
(.py311) $ pip install --upgrade myst-parser
```

Run the `make` batch script and you will see the documentation in the
`docs/_build/html` directory.
After installing the tools, go to the `docs` directory and run the `doxygen`
command to generate the Doxygen XML output, which should be generated in the
`docs/source/xml` directory. Finally, run `make html` to generate the
documentation in the `docs/build/html` directory.

```
$ cd docs
$ doxygen
$ make html
```

Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT_NAME = "argtable"
XML_OUTPUT = xml
XML_OUTPUT = source/xml
INPUT = ../src
GENERATE_LATEX = NO
GENERATE_MAN = NO
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
3 changes: 0 additions & 3 deletions docs/_static/custom.css

This file was deleted.

76 changes: 0 additions & 76 deletions docs/conf.py

This file was deleted.

198 changes: 0 additions & 198 deletions docs/index.rst

This file was deleted.

Loading
Loading