Title: Improve Sphinx role usage, including linking Git manpages by EliahKagan · Pull Request #1879 · gitpython-developers/GitPython · GitHub
Open Graph Title: Improve Sphinx role usage, including linking Git manpages by EliahKagan · Pull Request #1879 · gitpython-developers/GitPython
X Title: Improve Sphinx role usage, including linking Git manpages by EliahKagan · Pull Request #1879 · gitpython-developers/GitPython
Description: This makes various improvements to how docstrings use Sphinx roles (and a bit of other related cleanup), detailed in the individual commit messages. The most significant, which motivated this pull request, is using the :manpage: role for references to Git subcommands and other Git topics for which there is a manual page. The effect, when reading the built HTML documentation, is to make it so mentions of specific Git commands are linked references to their manpages in Git's official online reference. This was achieved by a combination of two changes: c5a29a9: Setting manpages_url = "https://git-scm.com/docs/{page}" in doc/source/conf.py so that reStructuredText such as :manpage:`git-clone(1)`, when rendered in HTML, links to the corresponding online manpage (for that example, https://git-scm.com/docs/git-clone). This was feasible because there were no manual page references, attempts to make them, or areas where it would be useful to make them, other than to Git manual pages. So that the Git website doesn't have documentation for commands that aren't part of Git is not a problem for setting manpages_url this way. d8ab99c: Turn all mentions of specific Git subcommands and other Git topics that have a manpage into that form. For subcommands the existing forms were mostly like git-clone or like ``git clone`` (the latter of which was mainly present due to my having used it in some places in earlier revisions). In both cases it seems the context is preserved or enhanced by turning them into :manpage:`git-clone(1)`. There were a small number of cases where a full URL had been used. Note that when URLs linked to specific sections (and meant to), I did not replace those, since this syntax does not support that. Also, when more of a command was shown, e.g., ``git remote set-url``, I of course did not replace that, which would lose information about the more specific action (sub-sub command?) of set-url. (Of course, git-clone(1) is just one example, and this is in no way limited to the clone subcommand specifically.) One example of what this looks like can be seen in the rendered Commit.iter_items docstring from the pull request preview build. Others can be identified by looking at the changes adding the :manpage: role in d8ab99c (and then looked up in the PR preview build if desired).
Open Graph Description: This makes various improvements to how docstrings use Sphinx roles (and a bit of other related cleanup), detailed in the individual commit messages. The most significant, which motivated this pull ...
X Description: This makes various improvements to how docstrings use Sphinx roles (and a bit of other related cleanup), detailed in the individual commit messages. The most significant, which motivated this pull ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1879
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:71bfeff5-1ee9-1528-dc8e-6c583f3b6921 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | D8A2:AE141:48A167:666FA8:6968B7B2 |
| html-safe-nonce | dc1a68519b6401b8fbd74044c82c4e0be424ec4ce2fc0e8714f09bef25c558da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEEyOkFFMTQxOjQ4QTE2Nzo2NjZGQTg6Njk2OEI3QjIiLCJ2aXNpdG9yX2lkIjoiNzY1MTAwNzg1NzczNjIzMjE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c110d25c6adb8f04c386e8e110f697b5a557f823f86276e4f2a52d89b94b9697 |
| hovercard-subject-tag | pull_request:1775320130 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1879/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | This makes various improvements to how docstrings use Sphinx roles (and a bit of other related cleanup), detailed in the individual commit messages. The most significant, which motivated this pull ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3223a6503d318917691422cdadfbe16cd8fb21e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width