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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build documentation using Sphinx #441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Build documentation using Sphinx #441

wants to merge 1 commit into from

Conversation

azeey
Copy link
Contributor

@azeey azeey commented May 15, 2024

馃帀 New feature

Partially resolves #412

Summary

Uses sphinx to build the documentation contained in this repository. While the goal is to migrate all of gazebosim.org to a static site, for now, we'll have the landing page, the "features" and "showcase" pages be served by https://github.com/gazebo-web/gazebosim-web-frontend as is currently and the /docs endpoint be directed to the output of sphinx. This is similar to how the /api endpoint is directed to the output of doxygen.

Since sphinx has its own of organizing files and structuring the table of contents, a custom script (build_multiversion.py) is needed to take our existing metadata files (index.yaml) and make the necessary changes to the markdown files. For this, it is necessary to copy the files to a temporary directory. The script also handles differences in URL endpoints and markdown files, which must match in Sphinx. Lastly, for version switching and searching to work properly, each version of Gazebo is built independently by the build_multiversion.py script.

Inspired by https://github.com/ros2/ros2_documentation

Needs pydata/pydata-sphinx-theme#1795 for the version switcher to work properly.

Screenshots

Light theme:
image

Dark theme:
image

Test it

Follow updated README to build the docs

Preview

cc @nuclearsandwich

TODO:

  • Handle latest and all links
  • Add "Edit this page" link
  • Handle warnings related to external links (e.g. /libs/math). Maybe create /libs via sphinx.
  • Handle ionic so it shows up as (dev)
  • Add GitHub workflow to build and deploy automatically
  • Deploy doxygen generated content to GitHub pages.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@github-actions github-actions bot added 馃幍 harmonic Gazebo Harmonic 馃敭 dome Ignition Dome labels May 15, 2024
@azeey azeey added documentation Improvements or additions to documentation and removed 馃敭 dome Ignition Dome 馃幍 harmonic Gazebo Harmonic labels May 15, 2024
@azeey
Copy link
Contributor Author

azeey commented Jun 6, 2024

Preview: https://addisu.taddese.com/docs/ deployed by https://github.com/azeey/docs/actions/workflows/deploy.yml. It has both the frontend and the docs.

@azeey azeey marked this pull request as ready for review June 6, 2024 05:26
@azeey azeey requested a review from mabelzhang as a code owner June 6, 2024 05:26
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. I was able to build and view the doc following the README.md instructions.

@azeey azeey mentioned this pull request Jun 13, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

Use a static site generator for gazebosim.org
2 participants