Skip to content

Conversation

@nickva
Copy link
Contributor

@nickva nickva commented Sep 12, 2022

"Edit on Github" link wasn't working and pointing to a non-existent "index" file. This was most likely because we override the index.html template, so the source renderer doesn't know what to link it to. Instead opt to make the top level "Edit on Github" point the docs readme page. Individual doc pages will point to their respective source pages.

In addition, we were quite a bit behind on on the sphinx version 1.5 vs 5.1.1 this has caused quite a bit of headaches over the years as we had to pin jinja2, docutils and other libraries versions to avoid breaking things.

The main issue after the upgrade was that the http domain became a bit more strict. After vendoring it in, we had to make a few multipart http examples use plaintext. On the positive side, it found broken references in the admin guide, so those were fixed. Since we're using the latest 5.1.1 opt to just use a python3 venv with a short setup.sh script. That should make it easier for contributors to build docs locally.

@nickva nickva force-pushed the try-to-fix-docs-edit-link branch 7 times, most recently from 72bb766 to 9eaabe0 Compare September 12, 2022 22:32
@nickva nickva changed the title Try to fix edit docs link Upgrade to latest Sphinx 5.1.1 and fix the top Edit on Github link Sep 12, 2022
@nickva nickva marked this pull request as ready for review September 12, 2022 22:33
@nickva nickva force-pushed the try-to-fix-docs-edit-link branch 4 times, most recently from aa128cc to 9235c30 Compare September 12, 2022 22:55
@nickva
Copy link
Contributor Author

nickva commented Sep 12, 2022

The rendered example of this PR is at https://docs.couchdb.org/en/try-to-fix-docs-edit-link/

@nickva nickva requested a review from big-r81 September 12, 2022 22:57
@nickva nickva force-pushed the try-to-fix-docs-edit-link branch from 9235c30 to bafd420 Compare September 12, 2022 23:03
Copy link
Contributor

@big-r81 big-r81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent @nickva 👍🏼🫶

only a small question: could we add httpdomain from sphinxcontrib over pip to easier update this extension?

@nickva
Copy link
Contributor Author

nickva commented Sep 13, 2022

only a small question: could we add httpdomain from sphinxcontrib over pip to easier update this extension?

good idea, @big-r81, I'll give that a try

"Edit on Github" link wasn't working and pointing to a non-existent "index"
file. This was most likely because we override the index.html template, so the
source renderer doesn't know what to link it to. Instead opt to make the top
level "Edit on Github" point the docs readme page. Individual doc pages will
point to their respective source pages.

In addition, we were quite a bit behind on on the sphinx version 1.5 vs 5.1.1
this has caused quite a bit of headaches over the years as we had to pin
jinja2, docutils and other libraries versions to avoid breaking things.

The main issue after the upgrade was that the http domain became a bit more
strict. After vendoring it in, we had to make a few multipart http examples use
plaintext. On the positive side, it found broken references in the admin guide,
so those were fixed. Since we're using the latest 5.1.1 opt to just use a
python3 venv with a short setup.sh script. That should make it easier for
contributors to build docs locally.
@nickva nickva force-pushed the try-to-fix-docs-edit-link branch from bafd420 to c0c9829 Compare September 13, 2022 02:17
@nickva
Copy link
Contributor Author

nickva commented Sep 13, 2022

@big-r81 great suggestion! httpcontrib now comes from pip

(Also updated https://docs.couchdb.org/en/try-to-fix-docs-edit-link/)

@nickva nickva merged commit f1b7ce6 into main Sep 13, 2022
@nickva nickva deleted the try-to-fix-docs-edit-link branch September 13, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants