pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.76k stars 317 forks source link

Create edit online button and add documentation #346

Closed thecharlesjenkins closed 2 years ago

thecharlesjenkins commented 2 years ago

Add button to edit source code by providing base url in conf.py. This enables people to be able to add this button if they are not using ReadTheDocs, or they just want a more integrated button.

Here is what it would look like when the toc is visible: image

When toc is hidden: image

I had a problem testing this with my own documentation. When using the demo page it works fine, but when running pip install . after adding the new template for the button I run into the error:

Theme error:
An error happened in rendering the page index.
Reason: TemplateNotFound()
make: *** [Makefile:20: html] Error 2

Is there a different way I am supposed to package this for development purposes aside from pip?

pradyunsg commented 2 years ago

Thanks for this PR @thecharlesjenkins! ^>^

I ended up forgetting that I should check for open PRs and implemented this in a different way in https://github.com/pradyunsg/furo/commit/76b7e73e00ff15743b51ba14e3daabbf2931e390.

Screenshot 2022-02-13 at 18 03 52 Screenshot 2022-02-13 at 18 03 36
pradyunsg commented 2 years ago

Closing, since this is implemented in a slightly different way. Thanks @thecharlesjenkins for filing this! ^.^