lzdanski commented on code in PR #36287: URL: https://github.com/apache/airflow/pull/36287#discussion_r1433143899
########## docs/README.rst: ########## @@ -25,44 +25,110 @@ Development documentation preview Documentation from the development version is built and automatically published: `s.apache.org/airflow-docs <https://s.apache.org/airflow-docs>`_ +Working with Sphinx +=================== + +Airflow Documentation uses `Sphinx <https://www.sphinx-doc.org/>`__, a reStructure Text (.rst) markup language that was developed to document Python and Python projects, to build the docs site. + +For most Docs writing purposes, the `reStructured Text Primer <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`__ provides a quick reference of common formatting and syntax. + +A general docs workflow +----------------------- +When you make changes to the docs, it follows roughly the same process as creating and testing code changes. However, for docs, instead of unit tests and integration tests, you run pre-commit checks, spell checks, and visual inspection of your changes in a documentation build. + +1. **Decide to edit in GitHub UI or locally** - Depending on the size and type of docs update you want to make, it might be easier to work in the UI or to make your edits in a local fork. +2. **Find the source files to edit** - While you can access most of the docs source files using the **Suggest a change on this page** button or by searching for a string in the ``/docs/`` file directory, in some cases, the source strings might be located in different provider docs or in the source code itself. +3. **If editing locally, run spellcheck and the build to identify any blocking errors** - Docs require build, spellcheck, and precommit CI/CD tests to pass before they can merge. This means that if you have a pull request with docs changes, a docs build error can prevent your code merge. Checking the build and spelling locally first can help speed up reviews. If you made formatting changes, checking a local build of your docs allows you to make sure you correctly formatted elements like tables, text styling, and line breaks. +4. **Make your pull request** - When you make a PR, Github automatically assigns reviewers and runs CI/CD tests. +5. **Fix any build errors or spelling mistakes** - Your PR can't be merged if there are any spelling or build errors. Check to see which builds are failing and click **Show details**. The output of the tests share the errors, location of the problems, and suggest resolutions. Common Docs failures occur due to incorrect formatting and whitespace. + +Editing in GitHub or locally +---------------------------- + +You have two options for editing Airflow docs: + +1. Through the online GitHub Editor by clicking **Suggest a change on this page** in the `docs <https://airflow.apache.org/docs/>`_, or by selecting a file in `GitHub <https://github.com/apache/airflow/tree/main/docs>`__. + +2. Locally with a forked copy of the Airflow repo, where you can run local builds and tests prior to making a pull request. + ++--------------------------------------+------------------+-------------------------------------------------+ +| Type of Docs update | Suggested Editor | Explanation | ++======================================+==================+=================================================+ +| I need to edit multiple files. | Local Editor | It's easier to batch-edit files in an editor, | +| | | than make multiple PRs or changes to individual | +| | | files in a GitHub editor. | ++--------------------------------------+------------------+-------------------------------------------------+ +| I want to fix a quick typo or a | GitHub Editor | Allows you to quickly edit without any local | +| broken link. | | installation or build required. | ++--------------------------------------+------------------+-------------------------------------------------+ +| My edits contain tables or | Local Editor | GitHub can provide Markdown previews, but might | +| other formatting changes. | | change ``.rst``` styling. Use a local build. | Review Comment: ```suggestion | other formatting changes. | | change ``.rst`` styling. Use a local build. | ``` ########## docs/README.rst: ########## @@ -25,44 +25,110 @@ Development documentation preview Documentation from the development version is built and automatically published: `s.apache.org/airflow-docs <https://s.apache.org/airflow-docs>`_ +Working with Sphinx Review Comment: Add some more welcoming copy as an intro -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
