-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Docs: a start on an 'improve this page' feature #136246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
673e347
2daceae
3a768df
32e27f6
7cc87b3
e536574
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
:orphan: | ||
|
||
.. _improve-a-page: | ||
|
||
**************************** | ||
Improve a documentation page | ||
**************************** | ||
|
||
.. only:: html and not epub | ||
|
||
.. raw:: html | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const params = new URLSearchParams(window.location.search); | ||
document.body.innerHTML = document.body.innerHTML | ||
.replace(/PAGETITLE/g, params.get('pagetitle')) | ||
.replace(/PAGEURL/g, params.get('pageurl')) | ||
.replace(/PAGESOURCE/g, params.get('pagesource')); | ||
}); | ||
</script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we avoid inline JS? Ideally both here and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are already two instances of inline script, and tbh, for small one-off chunks like this it might be more understandable to have them on the page where they are used. But in any case, would it be OK to land this feature first and then decide on centralization? |
||
|
||
We are always interested to hear about ways to improve the documentation. | ||
|
||
You were reading "PAGETITLE" at `<PAGEURL>`_. The source for that page is on | ||
`GitHub <https://github.com/python/cpython/blob/main/Doc/PAGESOURCE?plain=1>`_. | ||
hugovk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
You have a few options for asking questions or suggesting changes: | ||
|
||
- You can start a discussion about the page on the Python discussion forum. | ||
This link will start a pre-populated topic: | ||
`Question about "PAGETITLE" <https://discuss.python.org/new-topic?category=documentation&title=Question+about+%22PAGETITLE%22&body=About+the+page+at+PAGEURL%3A>`_. | ||
StanFromIreland marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
- You can open an issue on the Python GitHub issue tracker. This link will | ||
create a new issue pre-populated with some information for you: | ||
`Docs: problem with "PAGETITLE" <https://github.com/python/cpython/issues/new?title=Docs%3A+problem+with+%22PAGETITLE%22&labels=docs&body=The+page+at+PAGEURL+has+a+problem%3A>`_. | ||
|
||
- You can `edit the page on GitHub <https://github.com/python/cpython/blob/main/Doc/PAGESOURCE?plain=1>`_ | ||
and open a pull request, though you will need to have signed a contributor agreement before it can be merged. | ||
|
Uh oh!
There was an error while loading. Please reload this page.