Sphinx documentation for Panda3D
This repository contains the source code for the documentation of the Panda3D game engine.
The resulting documentation can be found at: https://docs.panda3d.org/
The documentation is built upon Sphinx, and several extensions are required. The easiest way to install Sphinx and the extensions into an existing Python installation is using pip:
pip install -r requirements.txt
You can then build the manual in the desired format. For example, you can build it in the HTML format by executing this command in your command prompt:
make html
If the command was successful, the resulting documentation can be found in the
_build/html
folder. Other formats are also possible, such as make latexpdf
for producing a .pdf file. Consult the Sphinx manual for other options.
On Windows, if you receive an error like the following:
The 'sphinx-build' command was not found. Make sure you have Sphinx
installed, then set the SPHINXBUILD environment variable to point
to the full path of the 'sphinx-build' executable. Alternatively you
may add the Sphinx directory to PATH.
It may be the case that your Python Scripts folder is not on the PATH. The easiest way to deal with this is by setting your SPHINXBUILD variable something like so (adjust for the location of your Python build):
set SPHINXBUILD=C:\Panda3D-1.10.13-x64\python\python.exe -m sphinx
To make changes, simply edit the .rst files in a code editor and rerun the
make html
command to rebuild only the files that have changed.
To propose changes, push the changes to a local branch on a fork of the GitHub repository and open a Pull Request. For more information on how to do this, refer to this guide:
https://opensource.guide/how-to-contribute/#opening-a-pull-request
When editing the documentation, please try to conform to the following guidelines:
.. literalinclude::
block.bullet/tutorial.rst
over the-bullet-integration/bullet-tutorial.rst
.===
, sections with ---
, and finally,
sub-sections with ^^^
, and the underline should be as wide as the title.:class:`.NodePath`
and
to a method with :meth:`.NodePath.reparent_to()`
if you want to include
the class prefix, or :meth:`~.NodePath.reparent_to()`
if you just want to
show the name of the method, like reparent_to()
. You can use custom text as
well, like :meth:`myNodePath.reparentTo(render) <.NodePath.reparent_to>`
._static/redirects.json
file to create
a redirect to a page that contains similar content. There is nothing more
frustrating to a user than having existing bookmarks, links from other sites,
and links from Google turn up 404 pages. The redirect file is processed by a
custom 404 handler on the server, so you need to really delete the page for
the redirect to work. If there is no obvious redirect target (eg. if the page
was split up into multiple pages), you can leave a disambiguation page marked
with :orphan:
on the first line.