GitHub button on doc pages

Hi everyone,

In order to make doc fixes easier, I wonder if we could add an “Edit on GitHub” button at the top of all HTML doc pages that would link to the corresponding source file on GitHub. Apparently, there is a sphinx extension that does this:

An example of a project that uses this:

All pages on have an “Edit on GitHub button” at the top right-hand corner. It links to the corresponding source file, so it is useful even if you do not use the GitHub interface to edit it: you get the source file name and its complete path in the openturns tree.

1 Like

I have investigated this a little since my original post and have concluded this technology is not mature enough to use.

  • Big projects (numpy, scipy, pandas, scikit-learn) do not use it.
  • In smaller projects that do use it, links are often broken.
  • The feature requires a very simple documentation tree. It parses the HTML URL and expects the path to the source file to match the path in the URL. OpenTURNS has more than 3 different documentation trees, and none of them fit this requirement.
  • API doc pages are often made from several source files. The technology is not smart enough to figure out which is the main source file.