pradyunsg / sphinx-basic-ng

A modernised skeleton for Sphinx themes.
https://sphinx-basic-ng.readthedocs.io/en/latest/
MIT License
31 stars 11 forks source link

Support for on-premise instance for edit link #35

Closed lalmeras closed 2 years ago

lalmeras commented 2 years ago

Edit link only supports SaaS instance (gitlab.com, github.com, bitbucket.org). github and gitlab (I don't know for bitbucket) allow on-premise instance, with custom urls.

Can we add a source_provider optional setting, with allowed values github|gitlab|bitbucket that override edit link building behavior and allow to use edit link with on-premise instance. If source_provider is missing, we can use startswith check to automatically handle gitlab.com/github.com/bitbucket.org cases.

I step into this issue as I use furo theme, and configuring edit link feature triggers Could not understand "source_repository" provided messages, and edit link is generated with an empty href.

lalmeras commented 2 years ago

I create #36 with a proposal.

lalmeras commented 2 years ago

My bad, @pradyunsg pointed that #34 already addresses this feature. I just tested this PR and it allows to customize edit link as expected.

pradyunsg commented 2 years ago

Merged that one, I'll cut a release and enable this in Furo sometime later in the week.