|
| 1 | +How to edit this Documentation |
| 2 | +============================== |
| 3 | + |
| 4 | +Edit locally |
| 5 | +------------ |
| 6 | + |
| 7 | +Requirements |
| 8 | +............ |
| 9 | + |
| 10 | +- Python >= 3.9 |
| 11 | +- `Poetry`_ >= 2.0 |
| 12 | + |
| 13 | +Preparations |
| 14 | +............ |
| 15 | + |
| 16 | +1. Clone Repository: |
| 17 | + |
| 18 | +.. code-block:: bash |
| 19 | +
|
| 20 | + git clone https://github.com/exasol/developer-documentation.git |
| 21 | +
|
| 22 | +2. Create Branch: |
| 23 | + |
| 24 | +.. code-block:: bash |
| 25 | +
|
| 26 | + git switch -C documentation/my_awesome_branch |
| 27 | +
|
| 28 | +3. Create Poetry Environment: |
| 29 | + |
| 30 | +.. code-block:: bash |
| 31 | +
|
| 32 | + poetry install |
| 33 | +
|
| 34 | +Edit documentation |
| 35 | +.................. |
| 36 | + |
| 37 | +1. Edit documentation in `doc` directory using `Sphinx reStructuredText`_ |
| 38 | + |
| 39 | +2. Build the Documentation locally: |
| 40 | + |
| 41 | +.. code-block:: bash |
| 42 | +
|
| 43 | + poetry run nox -s doc:builds |
| 44 | +
|
| 45 | +3. Open the locally built Documentation in your Browser: |
| 46 | + |
| 47 | +.. code-block:: bash |
| 48 | +
|
| 49 | + poetry run nox -s doc:open |
| 50 | +
|
| 51 | +4. When finished editing |
| 52 | + |
| 53 | +.. code-block:: bash |
| 54 | +
|
| 55 | + git commit -m "My awesome change" |
| 56 | + git push origin documentation/my_awesome_branch |
| 57 | +
|
| 58 | +And finally create a PR on GitHub. |
| 59 | + |
| 60 | +Edit in GitHub Codespaces |
| 61 | +------------------------- |
| 62 | + |
| 63 | +Preparations |
| 64 | +............ |
| 65 | + |
| 66 | +1. Start a Codespace on GitHub |
| 67 | + |
| 68 | +.. image:: images/codespace/start_codespace.png |
| 69 | + :alt: Start a Codespace on GitHub |
| 70 | + |
| 71 | +2. Wait for Codespace to start (can take a few minutes) |
| 72 | + |
| 73 | +.. image:: images/codespace/codespace.png |
| 74 | + :alt: Wait for Codespace to start (can take a few minutes) |
| 75 | + |
| 76 | +3. Select the Terminal in Codespace, if not already selected |
| 77 | + |
| 78 | +.. image:: images/codespace/terminal_codespace.png |
| 79 | + :alt: Select the Terminal in Codespace, if not already selected |
| 80 | + |
| 81 | +4. Wait for the installation of poetry |
| 82 | + |
| 83 | +.. image:: images/codespace/poetry_installation.png |
| 84 | + :alt: Wait for the installation of poetry |
| 85 | + |
| 86 | +5. Create Branch: |
| 87 | + |
| 88 | +.. code-block:: bash |
| 89 | +
|
| 90 | + git switch -C documentation/my_awesome_branch |
| 91 | +
|
| 92 | +6. Create Poetry Environment: |
| 93 | + |
| 94 | +.. code-block:: bash |
| 95 | +
|
| 96 | + poetry install |
| 97 | +
|
| 98 | +Edit documentation |
| 99 | +.................. |
| 100 | + |
| 101 | +4. Edit Documentation in `doc` directory using `Sphinx reStructuredText`_ |
| 102 | + |
| 103 | +5. Build the Documentation: |
| 104 | + |
| 105 | +.. code-block:: bash |
| 106 | +
|
| 107 | + poetry run nox -s doc:builds |
| 108 | +
|
| 109 | +6. Serve the Documentation: |
| 110 | + |
| 111 | +.. code-block:: bash |
| 112 | +
|
| 113 | + poetry run nox -s doc:serve &> /dev/null & |
| 114 | +
|
| 115 | +6. Forward port on Codespace and open the served Documentation: |
| 116 | + |
| 117 | +.. image:: images/codespace/forward_port.png |
| 118 | + :alt: Forward port on Codespace and open the served Documentation |
| 119 | + |
| 120 | +7. When finished editing |
| 121 | + |
| 122 | +.. code-block:: bash |
| 123 | +
|
| 124 | + git commit -m "My awesome change" |
| 125 | + git push origin documentation/my_awesome_branch |
| 126 | +
|
| 127 | +And finally create a PR on GitHub. |
| 128 | + |
| 129 | +Stopping or deleting a Codespace |
| 130 | +................................ |
| 131 | + |
| 132 | +Codespace can cause costs, so stoping or deleting them after use is a good idea. |
| 133 | + |
| 134 | +1. Go to the `Codespace page <https://github.com/codespaces/>`_ |
| 135 | + |
| 136 | +2. Stopping or deleting a Codespace |
| 137 | + |
| 138 | +.. image:: images/codespace/stop_codespace.png |
| 139 | + :alt: Stopping or deleting a Codespace |
| 140 | + |
| 141 | +.. _Poetry: https://python-poetry.org/docs/#installing-with-pipx |
| 142 | +.. _Sphinx reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html |
0 commit comments