-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove links to unfinished pages
- Loading branch information
Showing
13 changed files
with
774 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,98 @@ | ||
# Contribute to Documentation | ||
|
||
We use [Sphinx][] and [ReStructuredText][] to write the documentation. | ||
We use [Sphinx] to build the documentation. Historically, this has used | ||
[reStructuredText] `.rst` as the syntax. You may see some pages written in | ||
[Markdown] `.md` if the `myst-parser` dependency has been added to | ||
the project. Docstrings in code must always use rST. | ||
|
||
[Sphinx]: https://sphinx-doc.org | ||
[reStructuredText]: https://docutils.sourceforge.io/rst.html | ||
[Markdown]: https://commonmark.org | ||
|
||
## Work on the `stable` Branch | ||
|
||
**If you are fixing or improving existing docs, or writing about existing | ||
features, you want to branch off of the `stable` branch, as well as target the | ||
`stable` branch in the PR.** | ||
|
||
If you use GitHub's UI to quickly edit a file, remember to select the `stable` | ||
branch from the dropdown first. Otherwise, you'll end up submitting the fix | ||
against `main`, and a maintainer will have to do extra work to retarget it. | ||
|
||
Changes to `stable` docs will show up within minutes of being merged. Changes to | ||
`main` will be unavailable until the next feature release. You'll rarely want to | ||
work off of `main` for docs, unless you're working on docs for a new unreleased | ||
feature. | ||
|
||
## Building Docs | ||
|
||
To build the docs locally, run `tox r -e docs`. To serve the docs locally, run | ||
`python -m http.server docs/_build/dirhtml`. Then go to <https://localhost:8000> | ||
in your browser to view the docs. | ||
|
||
Documentation is hosted by Read the Docs. They are built and deployed for any | ||
changes to the `main` and `A.B.x` feature branches. Each PR also generates a | ||
test build. | ||
Documentation is hosted by Read the Docs. It is deployed on every change to the | ||
`stable` branch. Each PR also generates a test build, which can be viewed by | ||
clicking the "readthedocs" build check in the PR. | ||
|
||
[Sphinx]: https://sphinx-doc.org | ||
[reStructuredText]: https://docutils.sourceforge.io/rst.html | ||
## Writing Docs | ||
|
||
Writing about how to write documentation is surprisingly hard! We generally like | ||
the ideas presented in [Diátaxis], which is a way of thinking about and doing | ||
documentation. | ||
|
||
[Diátaxis]: https://diataxis.fr | ||
|
||
It can be very hard to assess whether a change is _better_ rather than only | ||
_different_. Keep this in mind when deciding if you want to change something. If | ||
a sentence is clear and understandable, even if you would say it differently, | ||
then it should probably be left as-is. | ||
|
||
The most common type of docs contribution is a typo fix. Check if the typo | ||
happened in multiple places, and fix it everywhere. Don't submit typo fixes to | ||
code comments that aren't visible in the deployed docs, unless you're also | ||
working on that code. If you find multiple different typos, you can fix them in | ||
separate commits to one PR, rather than multiple PRs. Make sure the typo is | ||
really a typo, and not a correct sentence with a different meaning. | ||
|
||
The libraries' docs have been written by many people over more than a decade. | ||
This has introduced inconsistencies in style, focus, and technical level across | ||
different parts of documentation over time. We recognize that there are many | ||
ways in which documentation can be rewritten and improved. However, avoid huge | ||
rewrites unless you have already checked with maintainers. If you're changing | ||
more than a few sentences of text, and haven't received prior approval, you're | ||
probably doing too much at once. It is very hard to review such changes, | ||
especially from unknown users who we have not established trust with. | ||
|
||
### Style, Spelling, and Grammar | ||
|
||
Avoid referring to "you" or "we" outside of tutorials. State things directly; | ||
"to do X, use Y" rather than "if you want to do X, then you should use Y." | ||
|
||
Avoid phrases that might imply something is implicitly easy, such as "just do X" | ||
or "the reason is obviously Y". Users are coming to the docs because something | ||
wasn't obvious or easy for them at that moment. | ||
|
||
The documentation is in English. If you are not a native English speaker, that's | ||
OK, learners often catch issues that native speakers overlook. However, if a | ||
maintainer would have to alter a significant portion of your PR, that's not a | ||
great use of time. We also have a translation project, explained in the next | ||
section. | ||
|
||
Prefer [American spelling]. Use the [serial comma]; ("a, b, and c" rather than | ||
"a, b and c"). That said, do not create a PR that tries to make everything | ||
consistent, it's ok that existing docs use alternate spellings. | ||
|
||
[American spelling]: https://www.oxfordinternationalenglish.com/differences-in-british-and-american-spelling/ | ||
[serial comma]: https://www.grammarly.com/blog/punctuation-capitalization/what-is-the-oxford-comma/ | ||
|
||
## Translating Docs | ||
|
||
Currently, the community is working on translating Flask's documentation. We may | ||
add other projects in the future. | ||
|
||
You can find the translation project and instructions on how to contribute here: | ||
<https://github.com/pallets-eco/flask-docs-translations>. We use [Weblate] to | ||
manage translations. You'll need an account there. Then you can use the UI to navigate | ||
to a language and find strings to translate. | ||
|
||
[Weblate]: https://weblate.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
# Request a Feature | ||
|
||
If you feel that one of our libraries is missing something, you should request | ||
a new feature for it on the GitHub Issues tab. For example, Flask's is here: | ||
<https://github.com/pallets/flask/issues/>. | ||
|
||
The bar for accepting new features into many of our libraries is high. Our | ||
general philosophy is to provide a solid base framework that other libraries can | ||
extend, rather than blessing specific implementations in the core library. A | ||
feature request may be more successful if: | ||
|
||
- If it's not possible to implement as an extension without changes to the | ||
core. | ||
- If there is one "correct" way to implement something. | ||
- If the request is similar to or complements existing behavior. | ||
|
||
Before requesting a feature, try to determine if it has already been requested | ||
or implemented. Search existing issues and PRs, including closed issues and | ||
merged PRs. Requests that were previously rejected are likely to be rejected | ||
again unless (or even if) significant new reasoning is presented. | ||
|
||
Click the green "New issue" button at the top right to start. Include the | ||
following information in your post: | ||
|
||
- Write a short, descriptive title. | ||
- Do not include prefixes such as "\[feature]"; maintainers will apply | ||
real tags as needed. | ||
- Describe what the feature should do. | ||
- Include details such as links to relevant specs or previous discussions. | ||
- Provide an example of a problem this feature would resolve. Consider if this | ||
is problem solvable without changes to the library, such as by subclassing | ||
or using an extension. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
# Report an Issue | ||
|
||
Include the following information in your post: | ||
If you encounter an unexpected issue when using our libraries, you should report | ||
it on the GitHub Issues tab. For example, Flask's is here: | ||
<https://github.com/pallets/flask/issues/>. | ||
|
||
- Describe what you expected to happen. | ||
- Include a [minimal reproducible example][] to help us identify the issue. This | ||
also helps check that the issue is not with your own code. | ||
- Describe what actually happened. Include the full traceback if there was an exception. | ||
- List the version of Python and the Pallets library you're using. Check if this | ||
issue is already fixed in the latest release or the latest code in the repository. | ||
If you have questions about your own code or how to use the libraries, read | ||
[how to ask questions](questions.md). Don't use the issue tracker to ask | ||
questions. | ||
|
||
[minimal reproducible example]: https://stackoverflow.com/help/minimal-reproducible-example | ||
Before reporting an issue, try to determine if it has already been reported or | ||
fixed. Search existing issues and PRs, including closed issues and merged PRs. | ||
Search for similar phrases, code, and errors. Check that you're using the latest | ||
release. | ||
|
||
You don't need to report typos in documentation, unless you're unsure. Instead, | ||
submitting a PR would probably be faster. This is _only_ the case for typos, for | ||
everything else open an issue. | ||
|
||
Click the green "New issue" button at the top right to start. Include the | ||
following information in your post: | ||
|
||
- Write a short, descriptive title. | ||
- Do not include prefixes such as "\[bug]" or "\[docs]"; maintainers will | ||
apply real tags as needed. | ||
- Do not include a version number in the title. | ||
- Describe what you expected to happen. | ||
- Include a [minimal reproducible example] to help us identify the issue. This | ||
also helps check that the issue is not with your own code. | ||
- Describe what actually happened. Include the full traceback if there was an | ||
exception. | ||
- List the version of Python and the project you're using. Check if this issue | ||
is already fixed in the latest release, or in `stable` or `main`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.