Skip to content

Improvements to edit_on_github extension #6

Description

@astrofrog

Originally requested by @embray in astropy/astropy-helpers#211

In astropy/astropy#4361 (comment) I suggested a few fixes to the edit_on_github Sphinx extension that might be worth making:

  • If the doctree argument passed to html_page_content is None, this implies an HTML page that was not generated from an actual rst document. Usually this implies that there is no page to edit on GitHub, though I suppose a static HTML page that lives in the repository is also possible. In either case, the case of doctree is None should be handled in some appropriate way. Currently if doctree is None for a page that is not skipped, the extension crashes.
  • The default for edit_on_github_skip_regex should be updated, probably to include api.* pages for compatibility with automodapi. Better yet, maybe the extension can check if automodapi is being used, and automatically skip anything that starts with the value for the automodapi_toctreedirnm config option used by automodapi.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions