Skip to content

Commit 2171f71

Browse files
committed
A nojs version of the page
1 parent 4e4d9b3 commit 2171f71

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

Doc/improve-page-nojs.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:orphan:
2+
3+
****************************
4+
Improve a documentation page
5+
****************************
6+
7+
.. only:: html and not epub
8+
9+
We are always interested to hear ideas about improvements to the documentation.
10+
11+
.. only:: translation
12+
13+
If the bug or suggested improvement concerns the translation of this
14+
documentation, open an issue or edit the page in
15+
`translation's repository <TRANSLATION_REPO_>`_ instead.
16+
17+
You have a few ways to ask questions or suggest changes:
18+
19+
- You can start a discussion about the page on the Python discussion forum.
20+
This link will start a topic in the Documentation category:
21+
`New Documentation topic <https://discuss.python.org/new-topic?category=documentation>`_.
22+
23+
- You can open an issue on the Python GitHub issue tracker. This link will
24+
create a new issue with the "docs" label:
25+
`New docs issue <https://github.com/python/cpython/issues/new?labels=docs>`_.

Doc/improve-page.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. _improve-a-page:
4-
53
****************************
64
Improve a documentation page
75
****************************

Doc/tools/templates/customsourcelink.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const elements = document.querySelectorAll('.improvepage');
66
const pageurl = window.location.href.split('?')[0];
77
elements.forEach(element => {
8-
const url = new URL(element.href.split('?')[0]);
8+
const url = new URL(element.href.split('?')[0].replace("-nojs", ""));
99
url.searchParams.set('pagetitle', title);
1010
url.searchParams.set('pageurl', pageurl);
1111
url.searchParams.set('pagesource', "{{ pagename }}.rst");
@@ -17,7 +17,7 @@
1717
<h3>{{ _('This page') }}</h3>
1818
<ul class="this-page-menu">
1919
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a bug{% endtrans %}</a></li>
20-
<li><a class="improvepage" href="{{ pathto('improve-page') }}">{% trans %}Improve this page{% endtrans %}</a></li>
20+
<li><a class="improvepage" href="{{ pathto('improve-page-nojs') }}">{% trans %}Improve this page{% endtrans %}</a></li>
2121
<li>
2222
<a href="https://github.com/python/cpython/blob/main/Doc/{{ pagename }}.rst?plain=1"
2323
rel="nofollow">{{ _('Show source') }}

0 commit comments

Comments
 (0)