-
Notifications
You must be signed in to change notification settings - Fork 12
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a custom index.rst.jinja #164
Support a custom index.rst.jinja #164
Conversation
Signed-off-by: R Kent James <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggested change, but otherwise this would be great to enable.
And could we add a quick reference to this capability in the documentation. I'm not sure exactly where would be best. But at least mentioning the capability if people search for index.rst.jinja they'll get a hit.
template_jinja = template_path.read_text() | ||
|
||
# Did the user provide index.rst.jinja? | ||
user_jinja_path = os.path.join(wrapped_sphinx_directory, 'index.rst.jinja') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're using the more modern pathlib via resources below this could be symmetric and the read_text()
method could be pulled outside the if block and avoid the with open ... read()
Then the if block is just picking the template path and printing to say which it will use.
Signed-off-by: R Kent James <[email protected]>
Signed-off-by: R Kent James <[email protected]>
I added changes to address your issues. Concerning documentation, I did a fairly comprehensive documentation patch for rosdoc2 in my development branch, but that is 14 commits ahead of where we are now. At one point I had hoped that I could get all of my work on rosdoc2 landed fairly quickly, and we could point package authors to the "new" rosdoc2 and its documentation, but that does not seem to be possible. Anyway I pulled out the index.rst documentation from that, updated it, and landed it on this PR's branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pulling the docs out. I know it will cause extra effort to do the merge.
We use a standard index.rst.jinja to specify the main output of rosdoc2. This PR allows the user to specify a custom version of that.