You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using autosummary, the .rst files are only stubs, and can be autogenerated (which would make them volatile and ideally not under version control).
it would be much more useful to link to the actual source code. i created this to achieve that (GitHub specific but easily generalizable).
we should include this as an option in the readthedocs extension. fortunately, injecting the template directory from the gist between autosummary’s default template dir and the user’s template dir will work perfectly, and just add the :github_url: field list entry.
as an aside: sadly i had to use a hack, and add a filter to jinja2.defaults.DEFAULT_FILTERS. this is because the environment of the autosummary templates has no potential for extension (e.g. html_context is not used). this should be fixed in sphinx.
The text was updated successfully, but these errors were encountered:
An alternative approach to solve this problem might be to check with git whether the source file is checked into Git (if not, it was likely auto-generated locally).
This extension un-defines the sourcename context value for files that are not versioned by Git. I'm not sure whether this would work for readthedocs-sphinx-ext, but you might want to give it a try.
When using autosummary, the .rst files are only stubs, and can be autogenerated (which would make them volatile and ideally not under version control).
it would be much more useful to link to the actual source code. i created this to achieve that (GitHub specific but easily generalizable).
we should include this as an option in the readthedocs extension. fortunately, injecting the template directory from the gist between autosummary’s default template dir and the user’s template dir will work perfectly, and just add the
:github_url:
field list entry.as an aside: sadly i had to use a hack, and add a filter to
jinja2.defaults.DEFAULT_FILTERS
. this is because the environment of the autosummary templates has no potential for extension (e.g.html_context
is not used). this should be fixed in sphinx.The text was updated successfully, but these errors were encountered: