12.2.1. Introduction#
This documentation describes about how to write, generate and manage Groonga documentation.
12.2.1.1. How to fork and clone Groonga repository#
Contributing to Groonga’s documentation begins with forking and cloning the Groonga repository. These actions are essential first steps that enable personal modifications and experimentation in your personal repository. And also, it enables you to submit them as your contributions to the Groonga repository. Follow these steps.
Go to groonga/groonga on GitHub
Click the
Fork
button to create a copy of the repositoryClone your Groonga repository with the following command
% git clone --recursive git@github.com:${YOUR_GITHUB_ACCOUNT}/groonga.git
12.2.1.2. Install depended software#
Groonga uses Sphinx as documentation tool.
Here are command lines to install Sphinx.
Debian GNU/Linux, Ubuntu:
% ./setup.sh
% sudo pip install -r doc/requirements.txt
% (cd doc && bundle install)
AlmaLinux, Fedora:
% sudo dnf install -y python-pip gettext
% sudo pip install -r doc/requirements.txt
% (cd doc && bundle install)
macOS:
% brew bundle
% export PATH=$(brew --prefix gettext)/bin:$PATH
% pip install -r doc/requirements.txt
% (cd doc && bundle install)
12.2.1.3. Run cmake
with --preset=doc
#
Groonga disables documentation generation by default. You need to
enable it explicitly by adding --preset=doc
option to
cmake
:
% cmake -S . -B ../groonga.doc --preset=doc
Now, your Groonga build is documentation ready.
12.2.1.4. Generate HTML#
You can generate HTML by the following command:
% cmake --build ../groonga.doc
You can find generated HTML documentation at ../groonga.doc/doc/en/html/
.
12.2.1.5. Update#
You can find sources of documentation at doc/source/
. The sources
should be written in English. See I18N about how to translate
documentation.
You can update the target file when you update the existing documentation file.