You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/commands.rst
+15-18Lines changed: 15 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,42 +20,37 @@ To preview the docs:
20
20
21
21
2. Open http://127.0.0.1:5500/ with your preferred browser.
22
22
23
-
You can pass custom options to increase or decrease verbosity. For a list of all the available options, refer to the `Sphinx documentation <https://www.sphinx-doc.org/en/master/man/sphinx-build.html>`_.
24
-
For example:
23
+
.. tip:: You can pass custom options to increase or decrease verbosity. For a list with all the available options, refer to the `Sphinx documentation <https://www.sphinx-doc.org/en/master/man/sphinx-build.html>`_.
24
+
25
+
To increase verbosity, use the option ``-v``:
25
26
26
27
.. code:: console
27
28
28
29
make preview SPHINXOPTS=-v
29
30
30
-
Preview multiversion
31
-
--------------------
32
-
The multiversionpreview generates a local instance of the docs site with all specified versions available for navigation. You can view the rendering in a sandbox environment on your local browser.
33
-
To preview multiple versions:
34
-
35
-
1. Build the docs.
31
+
To decrease verbosity, use the option ``-Q``:
36
32
37
33
.. code:: console
38
34
39
-
cd docs
40
-
make previewmultiversion
41
-
42
-
2. Open http://0.0.0.0:5500/ with your preferred browser.
35
+
make preview SPHINXOPTS=-Q
43
36
44
-
If the version drop-down menu does not contain the all of the listed versions, try to run ``git fetch --tags`` to download the latest tags from remote.
45
37
46
-
Build HTML for the current branch
47
-
---------------------------------
38
+
Preview multiversion
39
+
--------------------
48
40
49
-
To generate an HTML version:
41
+
The multiversionpreview command generates a local instance of the docs site with all :doc:`specified versions <../configuration/multiversion>` available for navigation.
42
+
You can view the rendering in a sandbox environment on your local browser.
43
+
To preview multiple versions:
50
44
51
45
1. Build the docs.
52
46
53
47
.. code:: console
54
48
55
49
cd docs
56
-
make dirhtml
50
+
make multiversionpreview
51
+
52
+
2. Open http://0.0.0.0:5500/ with your preferred browser.
57
53
58
-
2. The previous command should generate HTML docs under the ``docs/_build/dirhtml`` directory.
59
54
60
55
Build HTML for multiple versions
61
56
--------------------------------
@@ -73,6 +68,8 @@ To generate multiple versions of the documentation:
73
68
74
69
2. The previous command should generate HTML docs under the ``docs/_build/dirhtml`` directory.
75
70
71
+
.. tip:: If the command raises an error, see :doc:`Troubleshooting <configuration/troubleshooting>` for help.
By default, the command builds the documentation that is available on GitHub (remote repository).
14
+
15
+
To build multiversion docs for the local branches:
16
+
17
+
1. In ``conf.py``, set ``smv_remote_whitelist`` to ``None``:
18
+
19
+
.. code:: console
20
+
21
+
smv_remote_whitelist = None
22
+
23
+
2. Follow `Syncing a Fork <https://docs.github.com/es/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork>`_ for every branch not updated in your fork.
24
+
25
+
3. Run ``make multiversionpreview`` again.
26
+
27
+
.. _Preview_Production:
28
+
29
+
I want to preview the documentation published in production
1. Follow `these steps <https://docs.github.com/es/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork>`_ to configure a remote that points to the upstream repository in Git.
33
+
34
+
2. Download the latest tags and branches from upstream:
35
+
36
+
.. code:: console
37
+
38
+
git fetch --all
39
+
40
+
3. Edit the setting ``smv_remote_whitelist`` in the file `conf.py` to build the docs from upstream as follows:
41
+
42
+
.. code:: console
43
+
44
+
smv_remote_whitelist = r"^upstream$"
45
+
46
+
4. Run the command ``make multiversionpreview`` again.
47
+
48
+
No matching refs found!
49
+
^^^^^^^^^^^^^^^^^^^^^^^
50
+
51
+
If the console raises the error "No matching refs found!", most likely your fork is not updated with the upstream repository.
52
+
53
+
In this case, you can:
54
+
55
+
* Build multiversion docs for the upstream repository. See :ref:`Preview documentation published in production <Preview_Production>` (recommended)
56
+
* Sync the fork with the upstream repository. See :ref:`Preview latest local changes <Sync_Fork>`
57
+
58
+
Another frequent mistake that raises the error message is to have typos in the configuration file. Make sure that the version names listed in ``TAGS`` and ``BRANCHES`` settings from ``conf.py`` match the repository's branch and tags names on Git.
Copy file name to clipboardExpand all lines: docs/source/contribute/contribute-docs.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ Submit a pull request (PR)
216
216
217
217
We expect that you are aware of how to submit a PR to GitHub. If you are not, please look at this `tutorial <https://guides.github.com/activities/hello-world/>`_.
218
218
Every repository handles PRs differently. Some require you to use a template for submissions and some do not.
219
-
Make sure to speak with your project’s maintainer before submitting the PR to avoid any misunderstanding or issues.
219
+
Make sure to speak with the project’s maintainer before submitting the PR to avoid any misunderstanding or issues.
220
220
221
221
If you are writing new content it is **highly recommended** to set your PR to a draft state.
222
222
For Documentation PRs, the following guidelines should be applicable to all Scylla projects:
Copy file name to clipboardExpand all lines: docs/source/getting-started/installation.rst
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
Installation
3
3
============
4
4
5
-
This guide explains how to install Sphinx and this theme in a ScyllaDB project.
5
+
This guide explains how to add the documentation toolchain to a project hosted on GitHub.
6
6
7
7
1. Copy the ``docs`` and ``.github`` directories from the repository `scylladb/sphinx-scylladb-theme <https://github.com/scylladb/sphinx-scylladb-theme>`_
8
8
to the project root directory where you want to set up docs. The directory structure should look like this:
@@ -34,4 +34,3 @@ to the project root directory where you want to set up docs. The directory struc
34
34
35
35
6. From the command line, run ``make preview`` within the ``docs`` folder. Fix any warnings raised by Sphinx. Once the docs build without errors, open ``http://127.0.0.1:5500/`` to preview the generated site.
Copy file name to clipboardExpand all lines: docs/source/github-pages.rst
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,16 @@ When :doc:`multiversion <../configuration/multiversion>` is enabled, GitHub Page
9
9
Enabling GitHub Pages
10
10
---------------------
11
11
12
-
#. Create a file named ``.github/pages.yaml`` in your project's root repository.
12
+
#. Create a file named ``.github/pages.yaml`` in the project's root repository.
13
13
14
14
#. Copy the contents from `this file <https://github.com/scylladb/sphinx-scylladb-theme/blob/master/.github/workflows/pages.yml>`_ into ``.github/pages.yaml``.
15
15
16
-
#. (Optional) If your repository default branch is not ``master``, edit the configuration file to use the default branch name instead.
16
+
#. (Optional) If the repository default branch is not ``master``, edit the configuration file to use the default branch name instead.
17
17
18
18
#. Commit and push the changes to GitHub (default branch).
19
19
20
20
#. Wait a couple of minutes; it might take a while until GitHub builds the site. If everything goes well, you will see the docs published under ``https://scylladb.github.io/<repository-slug>``.
21
21
22
-
23
22
Setting up a custom domain
24
23
--------------------------
25
24
@@ -38,3 +37,14 @@ Disabling GitHub Pages
38
37
39
38
To disable the docs deployment temporarily, see `Unpublishing a GitHub Pages Site <https://help.github.com/en/github/working-with-github-pages/unpublishing-a-github-pages-site#unpublishing-a-project-site>`_.
40
39
40
+
Triggering builds manually
41
+
---------------------------
42
+
43
+
Re-running workflows is useful when:
44
+
45
+
- The theme received an update. By running the last build manually, the documentation project will receive the latest version. Otherwise, the theme will be automatically updated when the default branch gets an update.
46
+
47
+
- A previous version (branch or a tag) received a patch. Otherwise, the changes will not be reflected in production until the master branch gets an update.
48
+
49
+
To re-run a workflow see, `Re-running a workflow <https://docs.github.com/en/actions/managing-workflow-runs/re-running-a-workflow>`_.
0 commit comments