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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global_substitutions to fix github links #85

Merged

Conversation

christophfroehlich
Copy link
Contributor

The "Edit on Github" link does not work on the cloned repositories into docs folder, like mentioned in #58

As a workaround, one can override the github_url on top of every included rst file

:github_url: https://github.com/ros-controls/ros2_controllers/blob/master/joint_trajectory_controller/doc/userdoc.rst

To let this be maintainable, I suggest using sphinxcontrib.globalsubs to replace the branch name in the URL automatically.

:github_url: https://github.com/ros-controls/ros2_controllers/blob/|github_branch|/joint_trajectory_controller/doc/userdoc.rst

I create a PR to ros2_controllers to demonstrate this.

@christophfroehlich christophfroehlich merged commit fed3b2a into ros-controls:master May 12, 2023
3 checks passed
@christophfroehlich christophfroehlich deleted the global_substition branch May 12, 2023 08:19
christophfroehlich added a commit to christophfroehlich/control.ros.org that referenced this pull request May 22, 2023
christophfroehlich added a commit that referenced this pull request Jun 8, 2023
* Revert "Add global_substitutions to fix github links (#85)"

This reverts commit fed3b2a.

* Use branch name substitution for all links
@christophfroehlich
Copy link
Contributor Author

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Jun 12, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 12, 2023
(cherry picked from commit fed3b2a)

# Conflicts:
#	conf.py
mergify bot pushed a commit that referenced this pull request Jun 12, 2023
* Revert "Add global_substitutions to fix github links (#85)"

This reverts commit fed3b2a.

* Use branch name substitution for all links

(cherry picked from commit 45005b5)

# Conflicts:
#	conf.py
#	doc/getting_started/getting_started.rst
christophfroehlich added a commit that referenced this pull request Jun 12, 2023
(cherry picked from commit fed3b2a)

# Conflicts:
#	conf.py

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
christophfroehlich added a commit that referenced this pull request Jun 12, 2023
* Revert "Add global_substitutions to fix github links (#85)"

This reverts commit fed3b2a.

* Use branch name substitution for all links

(cherry picked from commit 45005b5)
christophfroehlich added a commit that referenced this pull request Jun 12, 2023
* Revert "Add global_substitutions to fix github links (#85)"

This reverts commit fed3b2a.

* Use branch name substitution for all links

(cherry picked from commit 45005b5)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants