-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
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
Changes from 1 commit
673e347
2daceae
3a768df
32e27f6
7cc87b3
e536574
d2c895c
5313650
4e4d9b3
2171f71
6472b68
722fb00
c64723b
a8d8a6e
85dc4b4
a6a0537
9ccbd62
280d274
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> | ||
|
Comment on lines
+15
to
+42
Member
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
Member
Author
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.
|
||
|
|
||
| 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
|
||
|
|
||
| - 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. | ||
|
Member
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. Just a little note, I think mentioning the contribution agreement here may scare away people, as it does not explain much about it, and does not pop up when they edit the page.
Member
Author
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. Yes, I was torn about putting it here, we can drop it if needed.
Member
Author
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. I changed it to "open a pull request and begin the contribution process." to at least hint at the idea that there will be steps needed. |
||
Uh oh!
There was an error while loading. Please reload this page.