Integrating Sphinx-generated Python API Documentation into Hugo Website

Hello HUGO Support Team,

We manage a project website built with HUGO and utilizing the Google/Docsy theme, currently live on our domain via Netlify. To enhance the usability of our project, we have decided to integrate our project documentation generated by Sphinx into our website.

We require guidance on integrating Sphinx with our HUGO website. Specifically, we would appreciate assistance with:

  1. Steps to integrate Sphinx-generated documentation into our existing HUGO website seamlessly.
  2. Any recommended best practices or considerations for this integration?
  3. Any potential conflicts or issues we should be aware of when integrating Sphinx with HUGO.

Anything you put into the “static” directory on a Hugo site is copied as is when you run the build command.

If you direct the Sphinx output to e.g. /path/to/hugo/site/static/docs/ and then run the hugo build command the documentation will be part of the Hugo site.

If you set up the Sphinx site to have the correct url structure for this and add links to both sites menus allowing visitors to navigate between them it should work quite well.

1 Like