Skip to content

Commit

Permalink
Package name fixes (#26)
Browse files Browse the repository at this point in the history
* Provide package name in `rootFileTitle`

So, instead of `library_api`, the root file title will read
`{package_name}_api` instead.

"C++ API" -> "Package API"

"C++ API" rests on the assumption that `rosdoc2` was invoked on a
package with C++ documentation, which may not be accurate.

Signed-off-by: Abrar Rahman Protyasha <[email protected]>
  • Loading branch information
Abrar Rahman Protyasha authored Aug 2, 2021
1 parent 77854b6 commit fa887cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rosdoc2/verbs/build/builders/sphinx_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def ensure_global(name, default):
# These arguments are required.
"containmentFolder": "{user_sourcedir}/api",
"rootFileName": "library_root.rst",
"rootFileTitle": "Library API",
"rootFileTitle": "{package_name} API",
"doxygenStripFromPath": "..",
# Suggested optional arguments.
"createTreeView": True,
Expand Down Expand Up @@ -248,8 +248,8 @@ def ensure_global(name, default):
{package.description}
C++ API
=======
Package API
===========
.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -474,6 +474,7 @@ def generate_wrapping_rosdoc2_sphinx_project_into_directory(
breathe_projects.append(
f' "{package.name} Doxygen Project": "{self.doxygen_xml_directory}"')
template_variables = {
'package_name': package.name,
'user_sourcedir': os.path.abspath(user_sourcedir),
'user_conf_py_filename': os.path.abspath(os.path.join(user_sourcedir, 'conf.py')),
'breathe_projects': ',\n'.join(breathe_projects) + '\n ',
Expand Down

0 comments on commit fa887cb

Please sign in to comment.