Add initial How to edit the rst documentation and rst documentaion style guide docs

This commit is contained in:
qubedmaiska 2025-08-15 17:26:56 -04:00
parent b0395e618c
commit 367d5ca10f
No known key found for this signature in database
GPG key ID: 204BCE0FD52C0501
20 changed files with 1377 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

@ -55,6 +55,7 @@ redirects = {
highlight_language = 'none'
pygments_style = 'sphinx'
# -- -- Options for source files ---------------------------------------------

View file

@ -258,7 +258,7 @@ Consolidate troubleshooting guides
**Knowledge prerequisite**:
- `Markdown <https://daringfireball.net/projects/markdown/>`__
- `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`__
@ -284,7 +284,7 @@ Improve Getting Started page
- basic Qubes OS knowledge
- `Markdown <https://daringfireball.net/projects/markdown/>`__
- `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`__
@ -310,7 +310,7 @@ Rewrite qrexec documentation
**Knowledge prerequisite**:
- `Markdown <https://daringfireball.net/projects/markdown/>`__
- `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`__

View file

@ -0,0 +1,427 @@
=============================
How to edit the documentation
=============================
The Qubes OS documentation is stored as reStructuredText (rST) files in
the `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ repository.
We use `Sphinx <https://www.sphinx-doc.org/>`__ for building and
`Read The Docs <https://readsthedocs.com/>`__ for hosting.
.. figure:: /attachment/doc/rst-rtd-workflow.png
:alt: Qubes OS Documentation Workflow
By cloning and regularly pulling from this repo, users can maintain their
own up-to-date offline copy of the Qubes documentation rather than
relying solely on the web. EPUB or PDF versions of Qubes OS documenation can also
be downloaded from `doc.qubes-os.org <https://doc.qubes-os.org/en/latest/>`__.
The documentation is a volunteer community effort. People like you are
constantly working to make it better. If you notice something that can
be fixed or improved, please follow the steps below to open a pull
request!
If you wish to submit a PR for the website, please refer to `how to edit the Markdown pages <https://www.qubes-os.org/doc/how-to-edit-the-website/>`__.
How to submit a pull request
============================
We keep all the rST documentation in `qubes-doc <https://github.com/QubesOS/qubes-doc>`__,
a dedicated Git repository hosted on `GitHub <https://github.com/>`__. Thanks to
GitHubs easy web interface, you can edit the documentation even if
youre not familiar with Git or the command line! All you need is a free
GitHub account.
A few notes before we get started:
- Since Qubes is a security-oriented project, every documentation change will be :ref:`reviewed <developer/general/how-to-edit-the-documentation:security>` before its accepted. This allows us to maintain quality control and protect our users.
- To give your contribution a better chance of being accepted, please follow our :doc:`reStrucutredText Style Guide </developer/general/rst-documentation-style-guide/>`.
- We dont want you to spend time and effort on a contribution that we cant accept. If your contribution would take a lot of time, please :doc:`file an issue </introduction/issue-tracking>` for it first so that we can make sure were on the same page before significant works begins.
- Alternatively, you may already have written content that doesnt conform to these guidelines, but youd be willing to modify it so that it does. In this case, you can still submit it by following the instructions below. Just make a note in your pull request (PR) that youre aware of the changes that need to be made and that youre just asking for the content to be reviewed before you spend time making those changes.
- Finally, if youve written something that doesnt belong in qubes-doc but that would be beneficial to the Qubes community, please consider adding it to the :ref:`external documentation <developer/general/documentation-style-guide:core vs external documentation>`.
(**Advanced users:** If youre already familiar with GitHub or wish to
work from the command line, you can skip the rest of this section. All
you need to do to contribute is to `fork and clone <https://guides.github.com/activities/forking/>`__
the `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ repo, make your changes,
then `submit a pull request <https://help.github.com/articles/using-pull-requests/>`__.)
Ok, lets begin. Every documentation page has a “Edit on GitHub” link.
|page-source-button|
When you click on it, youll be taken to the source file — a reStructuredText (``.rst``) file — on GitHub. On this page, there will be a
button to edit the file.
|github-edit| (TODO will provide screenshot whenever main branch is rst)
Youll be prompted to sign in with your GitHub username and password (if
you arent already logged in). You can also create a free account from
here.
|github-sign-in|
If this is your first contribution to the documentation, you need to
“fork” the repository (make your own copy). Its easy — just click the
big green button on the next page. This step is only needed the first
time you make a contribution.
|fork|
Now you can make your modifications. You can also preview the changes to
see how theyll be formatted by clicking the “Preview changes” tab. If
you want to add images, please see :ref:`How to add images <developer/general/how-to-edit-the-rst-documentation:how to add images>`. 
Please see :ref:`how to render the documentation on your local machine <building-the-rst-documentation-locally>`
if you want to locally verify that everything looks correct before submitting any changes.
|edit|
Once youre finished, describe your changes at the bottom and click
“Propose file change”.
|commit|
After that, youll see exactly what modifications youve made. At this
stage, those changes are still in your own copy of the documentation
(“fork”). If everything looks good, send those changes to us by pressing
the “Create pull request” button.
|pull-request|
You will be able to adjust the pull request message and title there. In
most cases, the defaults are ok, so you can just confirm by pressing the
“Create pull request” button again. However, if youre not ready for
your PR to be reviewed or merged yet, please
`make a draft PR instead <https://github.blog/2019-02-14-introducing-draft-pull-requests/>`__.
|pull-request-confirm|
If any of your changes should be reflected in the :doc:`documentation index (a.k.a. table of contents) </index>` — for example, if youre adding a
new page, changing the title of an existing page, or removing a page —
please see :ref:`How to edit the documentation index <developer/general/how-to-edit-the-rst-documentation:how to edit the documentation index>`.
Thats all! We will review your changes. If everything looks good, well
pull them into the official documentation. Otherwise, we may have some
questions for you, which well post in a comment on your pull request.
(GitHub will automatically notify you if we do.) If, for some reason, we
cant accept your pull request, well post a comment explaining why we
cant.
|done|
How to edit the documentation index
===================================
The source file for the :doc:`documentation index (a.k.a. table of contents) </index>` is
`index.rst <https://github.com/QubesOS/qubes-doc/blob/rst/index.rst>`__ (TODO: main).
`index.rst` contains information about the hierarchy between the files in the documentation and/or
the connection between them. `toctree <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree>`__
is the rST directive which defines the table of contents.
If you want to add a newly created documentation file, do so as follows:
.. code-block:: rst
.. toctree:
old_doc_file_name
new_doc_file_name
Editing this file will change what appears on the documentation index.
If your pull request (PR) adds, removes, or edits anything that should
be reflected in the documentation index, please make sure you also
submit an associated pull request against this file.
Please always be mindful that rST syntax is sensitive to indentation (3 spaces)!
How to add images
=================
Images reside inside the `qubes-doc repository <https://github.com/QubesOS/qubes-doc/>`__ in the directory `attachment/doc <https://github.com/QubesOS/qubes-doc/tree/rst/attachment/doc>`__.
To add an image to a page, use the following syntax:
.. code-block:: rst
.. figure:: /attachment/doc/r4.0-snapshot12.png
:alt: Qubes desktop screenshot depicting <description>
If you want to add a caption to the image, you may do so using the ``caption`` option of the `figure directive <https://docutils.sourceforge.io/docs/ref/rst/directives.html#figure>`__.
Another way without a caption is to use the `image directive <https://docutils.sourceforge.io/docs/ref/rst/directives.html#image>`__.
Then, add your image(s) in a the `attachment/doc folder` in the `qubes-doc <https://github.com/QubesOS/qubes-doc>`__
repository using the same path and filename.
This is the only permitted way to include images. Do not link to images on other websites.
Cross-referencing
=================
When referencing to an existing RST file use the ``:doc:`` `role <https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc>`__ as in
.. code-block:: rst
how to :doc:`contribute code </introduction/contributing>` do [...]
When referencing to a section in an existing RST file use the ``:ref:`` `role <https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref>`__ as in
.. code-block:: rst
See the :ref:`USB Troubleshooting guide <user/troubleshooting/usb-troubleshooting:usb vm does not boot after creating and assigning usb controllers to it>` for [...]
Use the path to the file starting from the root of qubes-doc repository, without any leading slash ``/`` and without the ``.rst`` file ending. The section name is usually taken as is in small caps.
Some special cases are as follows (here the emphasis is on the ``"`` in the sections's title:
.. code-block:: rst
the :ref:`VM Troubleshooting <user/troubleshooting/vm-troubleshooting:"no match found" when trying to install a template>`.
which will point to :ref:`this section <user/troubleshooting/vm-troubleshooting:"no match found" when trying to install a template>`.
.. code:: rst
we :ref:`distrust the infrastructure <introduction/faq:what does it mean to "distrust the infrastructure"?>`
which will refer to :ref:`this section <introduction/faq:what does it mean to "distrust the infrastructure"?>`.
Viewing your pull request on RTD
======================================
To view your pull request, just head to the following url ``https://qubes-doc--<PR-NUMBER>.org.readthedocs.build/en/<PR-NUMBER>/``.
Building the rST documentation locally
======================================
In order to build the Qubes OS rST documentation locally clone the `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ repository
(or your forked one if you want to submit a pull request).
It is recommended to use a virtual environment, f.ex. venv or poetry.
In the following section there is a sample setup to prepare local environments
for building Qubes OS rST documentation.
Using venv
----------
Install needed packages and clone the repository.
.. code-block:: console
$ sudo apt install git python3-dev python3.11-venv
$ git clone https://github.com/QubesOS/qubes-doc.git
Install Sphinx Tools and Build Qubes OS Documentation
-----------------------------------------------------
To install Sphinx and perform linting and link checking for an existing project, follow these steps:
1. **Install Sphinx and Required Extensions**
Install Sphinx and the necessary extensions (`sphinx-autobuild`, `sphinx-lint`) using `pip`.
.. code-block:: console
$ python -m venv .q_env
$ source .q_env/bin/activate
$ pip install -r qubes-doc/requirements.txt
$ pip install sphinx sphinx-lint sphinx-autobuild
2. **Verify Installation**
.. code-block:: console
$ sphinx-build --version
3. **Build Documentation**
Use `sphinx-build` with the `-v` (verbose) flag to generate detailed output during the build process.
.. code-block:: console
$ sphinx-build -v -b html qubes-doc _build/html
The build command specifies the source directory (`qubes-doc`), the output directory (`_build/html`), and the builder (`html`)
and will process all source files in the `qubes-doc` directory,
generate HTML output in the `_build/html` directory, and print detailed build information to the console.
Pay attention to errors and warning in the output!
Please do not introduce any new warnings and fix all errors.
4. **Run Linting**
The `sphinx-lint` extension checks for common issues like missing references, invalid directives,
or formatting errors.
.. code-block:: console
$ sphinx-lint qubes-doc
5. **Run Link Checking**
The `sphinx-linkcheck` extension verifies the validity of all external and internal links.
The results will be written to the `_build/linkcheck` directory with a detailed report in `output.txt` or `output.json` files
of all checked links and their status (e.g., OK, broken).
.. code-block:: console
$ sphinx-build -b linkcheck qubes-doc _build/linkcheck
6. **Use sphinx-autobuild for development**
For an active development workflow, you can use `sphinx-autobuild` to automatically rebuild the documentation
and refresh browser whenever a file is saved. `sphinx-autobuild` starts a web server at `http://127.0.0.1:8000`,
automatically rebuilds the documentation and reloads the browser tab when changes are detected in the `qubes-doc` directory.
.. code-block:: console
$ sphinx-autobuild qubes-doc _build/html
Using poetry
------------
`Install poetry <https://python-poetry.org/docs/#installation>`__ and git and clone the repository.
A `pyproject.toml` file is provided.
.. code-block:: console
$ sudo apt install git
$ curl -sSL https://install.python-poetry.org | python3 -
$ git clone https://github.com/QubesOS/qubes-doc.git
1. **Build Documentation**
Use `sphinx-build` with the `-v` (verbose) flag to generate detailed output during the build process.
The build command specifies the source directory (`qubes-doc`), the output directory (`_build/html`), and the builder (`html`).
.. code-block:: console
$ poetry run sphinx-build -v -b html qubes-doc _build/html
This command will process all source files in the `qubes-doc` directory,
generate HTML output in the `_build/html` directory, and print detailed build information to the console.
Pay attention to errors and warning in the output!
Please do not introduce no new warning and fix all errors.
2. **Run Linting**
The `sphinx-lint` extension checks for common issues like missing references, invalid directives,
or formatting errors. Run the linting step using the `sphinx-lint` command.
.. code-block:: console
$ poetry run sphinx-lint qubes-doc
3. **Run Link Checking**
The `sphinx-linkcheck` extension verifies the validity of all external and internal links.
The results will be written to the `_build/linkcheck` directory with a detailed report in `output.txt` or `output.json` files
of all checked links and their status (e.g., OK, broken, timeout).
.. code-block:: console
$ poetry run sphinx-build -b linkcheck qubes-doc _build/linkcheck
4. **Use sphinx-autobuild for development**
For an active development workflow, you can use `sphinx-autobuild` to automatically rebuild the documentation
and refresh browser whenever a file is saved. `sphinx-autobuild` starts a web server at `http://127.0.0.1:8000`,
automatically rebuilds the documentation and reloads the browser tab when changes are detected in the `qubes-doc` directory.
.. code-block:: console
$ poetry run sphinx-autobuild qubes-doc _build/html
Editor
------
An editor you can use is `ReText <https://github.com/retext-project/retext>`__ but any editor would do.
.. code-block:: console
$ sudo apt install libxcb-cursor0
$ pip3 install ReText
Security
========
Also see: :ref:`Should I trust this website? <introduction/faq:should i trust this website?>`.
All pull requests (PRs) against `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ must pass review
prior to be merged, except in the case of :ref:`external documentation <index:external documentation>`
(see `#4693 <https://github.com/QubesOS/qubes-issues/issues/4693>`__). This
process is designed to ensure that contributed text is accurate and
non-malicious. This process is a best effort that should provide a
reasonable degree of assurance, but it is not foolproof. For example,
all text characters are checked for ANSI escape sequences. However,
binaries, such as images, are simply checked to ensure they appear or
function the way they should when the website is rendered. They are not
further analyzed in an attempt to determine whether they are malicious.
Once a pull request passes review, the reviewer should add a signed
comment stating, “Passed review as of ``<LATEST_COMMIT>`` (or similar).
The documentation maintainer then verifies that the pull request is
mechanically sound (no merge conflicts, broken links, ANSI escapes,
etc.). If so, the documentation maintainer then merges the pull request,
adds a PGP-signed tag to the latest commit (usually the merge commit),
then pushes to the remote. In cases in which another reviewer is not
required, the documentation maintainer may review the pull request (in
which case no signed comment is necessary, since it would be redundant
with the signed tag).
Questions, problems, and improvements
=====================================
If you have a question about something you read in the documentation or
about how to edit the documentation, please post it on the `forum <https://forum.qubes-os.org/>`__
or send it to the appropriate :doc:`mailing list </introduction/support>`. If you see that something in the
documentation should be fixed or improved, please
:ref:`contribute <developer/general/how-to-edit-the-documentation:how to submit a pull request>` the change yourself. To
report an issue with the documentation, please follow our standard
:doc:`issue reporting guidelines </introduction/issue-tracking>`. (If you report an
issue with the documentation, you will likely be asked to submit a pull
request for it, unless there is a clear indication in your report that
you are not willing or able to do so.)
.. |page-source-button| image:: /attachment/doc/doc-pr_01_page-source-buttonrtd.png
.. |github-edit| image:: /attachment/doc/doc-pr_02_github-editrtd.png
.. |github-sign-in| image:: /attachment/doc/doc-pr_03_sign-in.png
.. |fork| image:: /attachment/doc/doc-pr_04_fork.png
.. |edit| image:: /attachment/doc/doc-pr_05_edit.png
.. |commit| image:: /attachment/doc/doc-pr_06_commit-msg.png
.. |pull-request| image:: /attachment/doc/doc-pr_07_review-changes.png
.. |pull-request-confirm| image:: /attachment/doc/doc-pr_08_create-pull-request.png
.. |done| image:: /attachment/doc/doc-pr_09_done.png

View file

@ -0,0 +1,867 @@
===========================================
reStructuredText documentation style guide
===========================================
*Also see* :doc:`How to edit the documentation </developer/general/how-to-edit-the-rst-documentation/>` *.*
Qubes OS documentation is stored as reStrucutredText files in the `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ repository.
By cloning and regularly pulling from this repo, users can maintain their own up-to-date offline copy of all Qubes documentation
rather than relying solely on the web. Additionally one can download a EPUB or PDF version of the documentation from `doc.qubes-os.org <https://doc.qubes-os.org/en/latest/>`__.
We use `Sphinx <https://www.sphinx-doc.org/>`__ for building and
`Read The Docs <https://readsthedocs.com/>`__ for hosting.
.. figure::/attachment/doc/rst-rtd-workflow.png
:alt: Qubes OS Documentation Workflow
The documentation is a volunteer community effort. People like you are constantly working to make it better.
If you notice something that can be fixed or improved,
please :doc:`edit the documentation </developer/general/how-to-edit-the-rst-documentation/>`!
This page explains the standards we follow for writing, formatting, and organizing the documentation.
Please follow these guidelines and conventions when editing the rST documentation.
For the standards governing the website (as a opposed to the rST documentation hosted on RTD),
please see the `website style guide <https://www.qubes-os.org/doc/website-style-guide/>`__.
If you wish to submit a PR regarding markdown content hosted on the website, please refer to
`how to edit the Markdown pages <https://www.qubes-os.org/doc/doc/how-to-edit-the-website/>`__.
reStructuredText conventions
----------------------------
All the documentation is written in reStructuredText. When making contributions, please observe the following style conventions.
If youre not familiar with reStructuredText syntax, `the Sphinx primer <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`__
is a great resource, as well as `this quick reStructuredText <https://docutils.sourceforge.io/docs/user/rst/quickref.html>`__.
Please always be mindful that rST syntax is sensitive to indentation!
Directives
^^^^^^^^^^
A `directive <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html>`__ is a generic block of explicit markup,
provided by Docutils and extended by Sphinx.
Directives are used to insert non-paragraph content, such as images, tables, and code blocks.
Example directives are:
.. code-block :: rst
.. image::, .. code-block::, etc. (Start with .., followed by directive name, arguments, options, and indented content).
Roles
^^^^^
Sphinx uses interpreted text `roles <https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html>`__ to insert semantic markup into documents.
Syntax is as follows:
.. code:: rst
:rolename:`content`
In Qubes OS documentation the `doc <https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc>`__ and
`ref <https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref>`__ roles are used extensively
as described :ref:`here <developer/general/how-to-edit-the-rst-documentation:cross-referencing>`.
Blocks: Literal blocks, code blocks, block quotes, code blocks (with syntax highlighting), doctest blocks, footnotes, citations, tables (simple and complex), admonitions (note, warning, danger).
Cross referencing:
Use the `:doc:` role with a path
.. code-block:: rst
:doc:`contributions </introduction/contributing>`.
use `:ref:` for specific sections
.. code-block:: rst
:ref:`qubes <user/reference/glossary:qube>`
For further information please :ref:`see <developer/general/how-to-edit-the-rst-documentation:cross-referencing>`.
Hyperlink syntax
^^^^^^^^^^^^^^^^
Use non-reference-style links like
.. code:: rst
`website <https://example.com/>`__
Do *not* use reference-style links like
.. code:: rst
Some text link_
:: _link:: https://example.org
This facilitates the localization process.
Take a look also :ref:`here <developer/general/how-to-edit-the-rst-documentation:cross-referencing>`.
Relative vs. absolute links
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Always use relative rather than absolute paths for internal website links.
For example, use:
.. code-block:: rst
text :doc:`contribute code </introduction/contributing>` text
instead of:
.. code-block:: rst
text `contribute code <https://https://doc.qubes-os.org/en/latest/introduction/contributing.html>`__ text
You may use absolute URLs in the following cases:
- External links
- URLs that appear inside code blocks (e.g., in comments and document templates, and the plain text reproductions of `QSBs <https://www.qubes-os.org/security/qsb/>`__ and `Canaries <https://www.qubes-os.org/security/canary/>`__), since theyre not hyperlinks
- Git repo files like ``README.md`` and ``CONTRIBUTING.md``, since theyre not part of the documentation itself.
This rule is important because using absolute URLs for internal website links breaks:
- Serving the documentation offline
- Documentation localization
- Generating offline documentation
Image linking
^^^^^^^^^^^^^
See :ref:`how to add images <developer/general/how-to-edit-the-documentation:how to add images>` for the required syntax.
Read The Docs and the used RTD theme have a responsive design, which allows the documentation to render appropriately across all screen sizes.
When viewing this page on a smaller screen, such as on a mobile device, the image will automatically shrink down to fit the screen.
If visitors cannot click on the image to view it in full size, then, depending on their device, they may have no way see the details in the image clearly.
In addition, make sure to link only to images in the `attachment/doc` folder of the `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ repository.
Do not attempt to link to images hosted on other websites.
To include images without a caption, use the ``image`` directive. You need to specify the path to the image and an optional alt text.
.. code-block:: rst
.. image:: path/to/image.png
:alt: Alternative text
:width: 200px
:align: center
To using the ``figure`` directive please read :ref:`how to add images <developer/general/how-to-edit-the-rst-documentation:how to add images>`.
HTML and CSS
^^^^^^^^^^^^
Do not write HTML inside rST documents. In particular, never include HTML or CSS for styling, formatting, or white space control.
That belongs in the (S)CSS files instead.
Headings
^^^^^^^^
Sectioning uses underlines with different characters (=, -, ^, ", ', ~) to create different levels of headings.
This is also the recommended order provided.
It doesn't matter which characters you use in which order to mark a title, subtitle etc,
as long as they are in consistent use across the documentation.
Qubes OS uses the convention in `Python Developers Guide for documenting <https://devguide.python.org/documentation/markup/#sections>`__ which are as follows:
.. code: text
# with overline, for parts
* with overline, for chapters
= for sections
- for subsections
^ for subsubsections
" for paragraphs
.. code:: rst
Main Title
=========
Subsection
----------
Sub-subsection
^^^^^^^^^^^^
Paragraph
"""""""""
Text decorations
^^^^^^^^^^^^^^^^
Emphasis and Italics
- *Italics*: Use single asterisks
.. code-block:: rst
*italics*
- **Bold**: Use double asterisks.
.. code-block:: rst
**bold**
- ``Monospace``: Use backticks.
.. code-block:: rst
``monospace``
Paragraph
^^^^^^^^^
Paragraphs are plain texts where indentation matters. Separate paragraphs by leaving a blank line between them.
Tables
^^^^^^^
We adhere to the list tables directive by docutils as described `here <https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table-1>`__.
A simple example would be:
.. code-block:: rst
.. list-table:: rst
:widths: 15 10
:header-rows: 1
* - Header 1
- Header 2
* - Cell 1
- Cell 2
* - Cell 3
- Cell 4
Indentation
^^^^^^^^^^^
Use spaces instead of tabs. Use hanging indentations where appropriate.
rST is identation sensitiv markup language, similar to Python, please maintain consistent indentation (3 spaces) for readability.
Lists
^^^^^
Lists can be bullet lists (\*, +, -), enumerated lists (1., 2., etc.), definition lists, field lists.
Nested lists must be separated from the parent list items by blank lines:
.. code-block:: rst
- Item 1
- Item 2
- Subitem 2.1
- Subitem 2.2
- Item 3
Numbered lists can be autonumbered using the ``#`` sign.
.. code-block:: rst
#. Item 1
#. Item 2
#. Subitem 2.1
#. Subitem 2.2
#. Item 3
Item 3 will start at 1.
Code blocks
^^^^^^^^^^^
When writing code blocks, use syntax highlighting with the `code-block <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block>`__
or `code <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code>`__ (see `here <https://pygments.org/languages/>`__ for a list of supported languages).
.. code-block:: rst
.. code-block:: language
code
By specifying the language, you enable pygments, which show syntax color coding for that code sample.
Use ``[...]`` for anything omitted.
You can add line numbers to code examples with the ``:linenos:`` parameter.
.. code-block:: rst
.. code-block:: python
:linenos:
def hello_world():
print("Hello, world!")
You can have certain lines with the ``:emphasize-lines:`` parameter.
.. code-block:: rst
.. code-block:: python
:emphasize-lines: 1,3,4
For Python use ``python``.
.. code-block:: rst
.. code-block:: python
string_var = 'python'
For bash use ``bash``.
.. code-block:: rst
.. code-block:: bash
echo "Hello"
For bash session use ``console``.
.. code-block:: rst
.. code-block:: console
pygments_style = 'sphinx'
For text output use ``output``.
.. code-block:: rst
.. code-block:: output
some output
For text use ``text``.
.. code-block:: rst
.. code-block:: text
some text
Line wrapping
^^^^^^^^^^^^^
Do not hard wrap text, except where necessary (e.g., inside code blocks).
Admonitions, messages, and warnings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`Admonitions, messages, and warnings <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#admonitions-messages-and-warnings>`__ are used to draw the readers attention to important information, such as warnings, and for stylistic purposes.
They are typically styled as colored text boxes, usually accompanied by icons provided out of the box by Sphinx and rST.
Alerts should generally be used somewhat sparingly, so as not to cause `alert fatigue <https://en.wikipedia.org/wiki/Alarm_fatigue>`__.
Here are examples of several types of alerts:
.. code:: rst
.. hint::
**Did you know?** The Qubes OS installer is completely offline. It doesn't
even load any networking drivers, so there is no possibility of
internet-based data leaks or attacks during the installation process.
.. note::
**Note:*</b>** Using Rufus to create the installation medium means that you
`wont be able <https://github.com/QubesOS/qubes-issues/issues/2051">`__
to choose the "Test this media and install Qubes OS" option mentioned in the
example below. Instead, choose the "Install Qubes OS" option. TODO auto-build
.. warning::
**Note:** Qubes OS is not meant to be installed inside a virtual machine
as a guest hypervisor. In other words, **nested virtualization** is not
supported. In order for a strict compartmentalization to be enforced, Qubes
OS needs to be able to manage the hardware directly.
.. danger::
**Warning:** Qubes has no control over what happens on your computer
before you install it. No software can provide security if it is installed on
compromised hardware. Do not install Qubes on a computer you don't trust. See
installation security for more information.
These render as:
.. hint::
**Did you know?** The Qubes OS installer is completely offline. It doesn't
even load any networking drivers, so there is no possibility of
internet-based data leaks or attacks during the installation process.
.. note::
**Note:** Using Rufus to create the installation medium means that you
`won't be able <"https://github.com/QubesOS/qubes-issues/issues/2051">`__
to choose the "Test this media and install Qubes OS" option mentioned in the
example below. Instead, choose the "Install Qubes OS" option.
.. warning::
**Note:** Qubes OS is not meant to be installed inside a virtual machine
as a guest hypervisor. In other words, **nested virtualization** is not
supported. In order for a strict compartmentalization to be enforced, Qubes
OS needs to be able to manage the hardware directly.
.. danger::
**Warning:** Qubes has no control over what happens on your computer
before you install it. No software can provide security if it is installed on
compromised hardware. Do not install Qubes on a computer you don't trust. See
installation security for more information.
Writing guidelines
------------------
Correct use of terminology
^^^^^^^^^^^^^^^^^^^^^^^^^^
Familiarize yourself with the terms defined in the :doc:`glossary </user/reference/glossary>`. Use these terms consistently and accurately throughout your writing.
Sentence case in headings
^^^^^^^^^^^^^^^^^^^^^^^^^
Use sentence case (rather than title case) in headings for the reasons explained `here <https://www.sallybagshaw.com.au/articles/sentence-case-v-title-case/>`__. In particular, since the authorship of the Qubes documentation is decentralized and widely distributed among users from around the world, many contributors come from regions with different conventions for implementing title case, not to mention that there are often differing style guide recommendations even within a single region. It is much easier for all of us to implement sentence case consistently across our growing body of pages, which is very important for managing the ongoing maintenance burden and sustainability of the documentation.
Writing command-line examples
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When providing command-line examples:
- Tell the reader where to open a terminal (dom0 or a specific domU), and show the command along with its output (if any) in a code block, e.g.:
.. code:: rst
Open a terminal in dom0 and run:
.. code:: console
$ cd test
$ echo Hello
Hello
- Precede each command with the appropriate command prompt: At a minimum, the prompt should contain a trailing ``#`` (for the user ``root``) or ``$`` (for other users) on Linux systems and ``>`` on Windows systems, respectively.
- Dont try to add comments inside the code block. For example, *dont* do this:
.. code:: rst
Open a terminal in dom0 and run:
.. code:: console
# Navigate to the new directory
$ cd test
# Generate a greeting
$ echo Hello
Hello
The ``#`` symbol preceding each comment is ambiguous with a root command prompt. Instead, put your comments *outside* of the code block in normal prose.
Variable names in commands
^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntactically distinguish variables in commands. For example, this is ambiguous:
.. code:: console
$ qvm-run --dispvm=disposable-template --service qubes.StartApp+xterm
It should instead be:
.. code:: console
$ qvm-run --dispvm=<DISPOSABLE_TEMPLATE> --service qubes.StartApp+xterm
Note that we syntactically distinguish variables in three ways:
1. Surrounding them in angled brackets (``< >``)
2. Using underscores (``_``) instead of spaces between words
3. Using all capital letters
We have observed that many novices make the mistake of typing the surrounding angled brackets (``< >``) on the command line, even after substituting the desired real value between them. Therefore, in documentation aimed at novices, we also recommend clarifying that the angled brackets should not be typed. This can be accomplished in one of several ways:
- Explicitly say something like “without the angled brackets.”
- Provide an example command using real values that excludes the angled brackets.
- If you know that almost all users will want to use (or should use) a specific command containing all real values and no variables, you might consider providing exactly that command and forgoing the version with variables. Novices may not realize which parts of the command they can substitute with different values, but if youve correctly judged that they should use the command youve provided as is, then this shouldnt matter.
Capitalization of "qube"
^^^^^^^^^^^^^^^^^^^^^^^^
We introduced the term :ref:`“qube” <user/reference/glossary:qube>` as a user-friendly alternative to the term :ref:`“virtual machine” (“VM”) <user/reference/glossary:vm>` in the context of Qubes OS. Nonetheless, “qube” is a common noun like the words “compartment” and “container.” Therefore, in English, “qube” follows the standard capitalization rules for common nouns. For example, “I have three qubes” is correct, while “I have three Qubes” is incorrect. Like other common nouns, “qube” should still be capitalized at the beginnings of sentences, the beginnings of sentence-case headings, and in title-case headings. Note, however, that starting a sentence with the plural of “qube” (e.g., “Qubes can be shut down…”) can be ambiguous, since it may not be clear whether the referent is a plurality of qubes, :ref:`Qubes OS <user/reference/glossary:qubes os>`, or even the Qubes OS Project itself. Hence, it is generally a good idea to rephrase such sentences in order to avoid this ambiguity.
Many people feel a strong temptation to capitalize the word “qube” all the time, like a proper noun, perhaps because its a new and unfamiliar term thats closely associated with a particular piece of software (namely, Qubes OS). However, these factors are not relevant to the capitalization rules of English. In fact, its not unusual for new common nouns to be introduced into English, especially in the context of technology. For example, “blockchain” is a relatively recent technical term thats a common noun. Why is it a common noun rather than a proper noun? Because proper nouns refer to *particular* people, places, things, and ideas. There are many different blockchains. However, even when there was just one, the word still denoted a collection of things rather than a particular thing. It happened to be the case that there was only one member in that collection at the time. For example, if there happened to be only one tree in the world, that wouldnt change the way we capitalize sentences like, “John sat under a tree.” Intuitively, it makes sense that the addition and removal of objects from the world shouldnt cause published books to become orthographicallly incorrect while sitting on their shelves.
Accordingly, the reason “qube” is a common noun rather than a proper noun is because it doesnt refer to any one specific thing (in this case, any one specific virtual machine). Rather, its the term for any virtual machine in a Qubes OS installation. (Technically, while qubes are currently implemented as virtual machines, Qubes OS is independent of its underlying compartmentalization technology. Virtual machines could be replaced with a different technology, and qubes would still be called “qubes.”)
I have several qubes in my Qubes OS installation, and you have several in yours. Every Qubes OS user has their own set of qubes, just as each of us lives in some neighborhood on some street. Yet we arent tempted to treat words like “neighborhood” or “street” as proper nouns (unless, of course, theyre part of a name, like “Acorn Street”). Again, while this might seem odd because “qube” is a new word that we invented, that doesnt change how English works. After all, *every* word was a new word that someone invented at some point (otherwise we wouldnt have any words at all). We treat “telephone,” “computer,” “network,” “program,” and so on as common nouns, even though those were all new technological inventions in the not-too-distant past (on a historical scale, at least). So, we shouldnt allow ourselves to be confused by irrelevant factors, like the fact that the inventors happened to be *us* or that the invention was *recent* or is not in widespread use among humanity.
English language conventions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For the sake of consistency and uniformity, the Qubes documentation aims to follow the conventions of American English, where applicable. (Please note that this is an arbitrary convention for the sake consistency and not a value judgment about the relative merits of British versus American English.)
Organizational guidelines
-------------------------
Do not duplicate documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Duplicating documentation is almost always a bad idea. There are many reasons for this. The main one is that almost all documentation has to be updated as some point. When similar documentation appears in more than one place, it is very easy for it to get updated in one place but not the others (perhaps because the person updating it doesnt realize its in more than once place). When this happens, the documentation as a whole is now inconsistent, and the outdated documentation becomes a trap, especially for novice users. Such traps are often more harmful than if the documentation never existed in the first place. The solution is to **link** to existing documentation rather than duplicating it. There are some exceptions to this policy (e.g., information that is certain not to change for a very long time), but they are rare.
Core vs. external documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Core documentation resides in the `Qubes OS Projects official repositories <https://github.com/QubesOS/>`__, mainly in `qubes-doc <https://github.com/QubesOS/qubes-doc>`__. External documentation can be anywhere else (such as forums, community websites, and blogs), but there is an especially large collection in the `Qubes Forum <https://forum.qubes-os.org/docs>`__. External documentation should not be submitted to `qubes-doc <https://github.com/QubesOS/qubes-doc>`__. If youve written a piece of documentation that is not appropriate for `qubes-doc <https://github.com/QubesOS/qubes-doc>`__, we encourage you to submit it to the `Qubes Forum <https://forum.qubes-os.org/docs>`__ instead. However, *linking* to external documentation from `qubes-doc <https://github.com/QubesOS/qubes-doc>`__ is perfectly fine. Indeed, the maintainers of the `Qubes Forum <https://forum.qubes-os.org/>`__ should regularly submit PRs against the documentation index (see :ref:`How to edit the documentation index <developer/general/how-to-edit-the-documentation:how to edit the documentation index>`) to add and update Qubes Forum links in the :ref:`“External documentation” <external-documentation>` section of the documentation table of contents.
The main difference between **core** (or **official**) and **external** (or **community** or **unofficial**) documentation is whether it documents software that is officially written and maintained by the Qubes OS Project. The purpose of this distinction is to keep the core docs maintainable and high-quality by limiting them to the software output by the Qubes OS Project. In other words, we take responsibility for documenting all of the software we put out into the world, but it doesnt make sense for us to take on the responsibility of documenting or maintaining documentation for anything else. For example, Qubes OS may use a popular Linux distribution for an official :doc:`TemplateVM </user/templates/templates>`. However, it would not make sense for a comparatively small project like ours, with modest funding and a lean workforce, to attempt to document software belonging to a large, richly-funded project with an army of paid and volunteer contributors, especially when they probably already have documentation of their own. This is particularly true when it comes to Linux in general. Although many users who are new to Qubes are also new to Linux, it makes absolutely no sense for our comparatively tiny project to try to document Linux in general when there is already a plethora of documentation out there.
Many contributors do not realize that there is a significant amount of work involved in *maintaining* documentation after it has been written. They may wish to write documentation and submit it to the core docs, but they see only their own writing process and fail to consider that it will have to be kept up-to-date and consistent with the rest of the docs for years afterward. Submissions to the core docs also have to :ref:`undergo a review process <developer/general/how-to-edit-the-documentation:security>`__ to ensure accuracy before being merged, which takes up valuable time from the team. We aim to maintain high quality standards for the core docs (style and mechanics, formatting), which also takes up a lot of time. If the documentation involves anything external to the Qubes OS Project (such as a website, platform, program, protocol, framework, practice, or even a reference to a version number), the documentation is likely to become outdated when that external thing changes. Its also important to periodically review and update this documentation, especially when a new Qubes release comes out. Periodically, there may be technical or policy changes that affect all the core documentation. The more documentation there is relative to maintainers, the harder all of this will be. Since there are many more people who are willing to write documentation than to maintain it, these individually small incremental additions amount to a significant maintenance burden for the project.
On the positive side, we consider the existence of community documentation to be a sign of a healthy ecosystem, and this is quite common in the software world. The community is better positioned to write and maintain documentation that applies, combines, and simplifies the official documentation, e.g., tutorials that explain how to install and use various programs in Qubes, how to create custom VM setups, and introductory tutorials that teach basic Linux concepts and commands in the context of Qubes. In addition, just because the Qubes OS Project has officially written and maintains some flexible framework, such as ``qrexec``, it does not make sense to include every tutorial that says “heres how to do something cool with ``qrexec`` in the core docs. Such tutorials generally also belong in the community documentation.
See `#4693 <https://github.com/QubesOS/qubes-issues/issues/4693>`__ for more background information.
Release-specific documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*See* `#5308 <https://github.com/QubesOS/qubes-issues/issues/5308>`__ *for pending changes to this policy.*
We maintain only one set of documentation for Qubes OS. We do not maintain a different set of documentation for each release of Qubes. Our single set of Qubes OS documentation is updated on a continual, rolling basis. Our first priority is to document all **current, stable releases** of Qubes. Our second priority is to document the next, upcoming release (if any) that is currently in the beta or release candidate stage.
In cases where a documentation page covers functionality that differs considerably between Qubes OS releases, the page should be subdivided into clearly-labeled sections that cover the different functionality in different releases (examples below).
In general, avoid mentioning specific Qubes versions in the body text of documentation, as these references rapidly go out of date and become misleading to readers.
Incorrect Example
^^^^^^^^^^^^^^^^^
.. code:: rst
How to Foo
==========
Fooing is the process by which one foos. There are both general and specific
versions of fooing, which vary in usefulness depending on your goals, but for
the most part, all fooing is fooing.
To foo in Qubes 3.2:
.. code-block:: console
$ qvm-foo <foo-bar>
Note that this does not work in Qubes 4.0, where there is a special widget
for fooing, which you can find in the lower-right corner of the screen in
the Foo Manager. Alternatively, you can use the more general ``qubes-baz``
command introduced in 4.0:
.. code-block:: console
$ qubes-baz --foo <bar>
Once you foo, make sure to close the baz before fooing the next bar.
Correct Example
^^^^^^^^^^^^^^^
.. code:: te
Qubes 3.2
=========
How to Foo
----------
Fooing is the process by which one foos. There are both general and specific
versions of fooing, which vary in usefulness depending on your goals, but for
the most part, all fooing is fooing.
To foo:
.. code-block:: console
$ qvm-foo <foo-bar>
Once you foo, make sure to close the baz before fooing the next bar.
Qubes 4.0
=========
How to Foo
----------
Fooing is the process by which one foos. There are both general and specific
versions of fooing, which vary in usefulness depending on your goals, but for
the most part, all fooing is fooing.
There is a special widget for fooing, which you can find in the lower-right
corner of the screen in the Foo Manager. Alternatively, you can use the
general ``qubes-baz`` command:
.. code-block:: console
$ qubes-baz --foo <bar>
Once you foo, make sure to close the baz before fooing the next bar.
Subdividing the page into clearly-labeled sections for each release has several benefits:
- It preserves good content for older (but still supported) releases. Many documentation contributors are also people who prefer to use the latest release. Many of them are tempted to *replace* existing content that applies to an older, supported release with content that applies only to the latest release. This is somewhat understandable. Since they only use the latest release, they may be focused on their own experience, and they may even regard the older release as deprecated, even when its actually still supported. However, allowing this replacement of content would do a great disservice to those who still rely on the older, supported release. In many cases, these users value the stability and reliability of the older, supported release. With the older, supported release, there has been more time to fix bugs and make improvements in both the software and the documentation. Consequently, much of the documentation content for this release may have gone through several rounds of editing, review, and revision. It would be a tragedy for this content to vanish while the very set of users who most prize stability and reliability are depending on it.
- Its easy for readers to quickly find the information theyre looking for, since they can go directly to the section that applies to their release.
- Its hard for readers to miss information they need, since its all in one place. In the incorrect example, information that the reader needs could be in any paragraph in the entire document, and theres no way to tell without reading the entire page. In the correct example, the reader can simply skim the headings in order to know which parts of the page need to be read and which can be safely ignored. The fact that some content is repeated in the two release-specific sections is not a problem, since no reader has to read the same thing twice. Moreover, as one release gets updated, its likely that the documentation for that release will also be updated. Therefore, content that is initially duplicated between release-specific sections will not necessarily stay that way, and this is a good thing: We want the documentation for a release that *doesnt* change to stay the same, and we want the documentation for a release that *does* change to change along with the software.
- Its easy for documentation contributors and maintainers to know which file to edit and update, since theres only one page for all Qubes OS releases. Initially creating the new headings and duplicating content that applies to both is only a one-time cost for each page, and many pages dont even require this treatment, since they apply to all currently-supported Qubes OS releases.
By contrast, an alternative approach, such as segregating the documentation into two different branches, would mean that contributions that apply to both Qubes releases would only end up in one branch, unless someone remembered to manually submit the same thing to the other branch and actually made the effort to do so. Most of the time, this wouldnt happen. When it did, it would mean a second pull request that would have to be reviewed. Over time, the different branches would diverge in non-release-specific content. Good general content that was submitted only to one branch would effectively disappear once that release was deprecated. (Even if it were still on the website, no one would look at it, since it would explicitly be in the subdirectory of a deprecated release, and there would be a motivation to remove it from the website so that search results wouldnt be populated with out-of-date information.)
For further discussion about release-specific documentation in Qubes, see `here <https://groups.google.com/d/topic/qubes-users/H9BZX4K9Ptk/discussion>`__.
Git conventions
---------------
Please follow our :ref:`Git commit message guidelines <developer/code/coding-style:commit message guidelines>`.
Cheatsheet: Markdown vs. reStructuredText
-----------------------------------------
Headings
^^^^^^^^
**Markdown:**
.. code-block:: markdown
# Heading 1
## Heading 2
### Heading 3
**reStructuredText:**
.. code-block:: rst
============
Heading 1
============
Heading 2
----------
Heading 3
^^^^^^^^^
Hyperlinks
^^^^^^^^^^
External
**Markdown:**
.. code-block:: markdown
[Link Text](http://example.com)
**reStructuredText:**
.. code-block:: rst
`Link Text <http://example.com>`__
Internal
**Markdown:**
.. code-block:: markdown
[Link Text](/doc/some-file)
**reStructuredText:**
.. code-block:: rst
:doc:`Link Text </path/to/file>`
For example on cross referencing please see :ref:`cross-referencing <developer/general/how-to-edit-the-rst-documentation:cross-referencing>`.
Text Decoration
^^^^^^^^^^^^^^^
**Markdown:**
.. code-block:: markdown
*Italic* or _Italic_
**Bold** or __Bold__
~~Strikethrough~~
**reStructuredText:**
.. code-block:: rst
*Italic*
**Bold**
:strike:`Strikethrough`
Lists
^^^^^
**Markdown:**
.. code-block:: markdown
- Item 1
- Item 2
- Subitem 1
- Subitem 2
1. Item 1
2. Item 2
a. Subitem 1
b. Subitem 2
**reStructuredText:**
.. code-block:: rst
- Item 1
- Item 2
- Subitem 1
- Subitem 2
1. Item 1
2. Item 2
a. Subitem 1
b. Subitem 2
Tables
^^^^^^
**Markdown:**
.. code-block:: markdown
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
**reStructuredText:**
.. code-block:: rst
.. list-table:: rst
:widths: 15 10
:header-rows: 1
* - Header 1
- Header 2
* - Cell 1
- Cell 2
* - Cell 3
- Cell 4
Code Blocks
^^^^^^^^^^^
**Markdown:**
.. code-block:: markdown
```python
print("Hello, world!")
```
**reStructuredText:**
.. code-block:: rst
.. code-block:: python
print("Hello, world!")
Alerts and Warnings
^^^^^^^^^^^^^^^^^^^
**Markdown:**
Markdown does not have built-in support for alerts and warnings.
**reStructuredText:**
.. code-block:: rst
.. note::
This is a note.
.. warning::
This is a warning.
.. danger::
This is a danger message.

View file

@ -208,8 +208,10 @@ Core documentation for Qubes developers and advanced users.
developer/general/package-contributions
developer/general/gsoc
developer/general/gsod
How to edit the documentation <https://www.qubes-os.org/doc/how-to-edit-the-documentation/>
Documentation style guide <https://www.qubes-os.org/doc/documentation-style-guide/>
developer/general/how-to-edit-the-rst-documentation
developer/general/rst-documentation-style-guide
How to edit the website <https://www.qubes-os.org/doc/how-to-edit-the-documentation/>
Markdown style guide <https://www.qubes-os.org/doc/documentation-style-guide/>
Website style guide <https://www.qubes-os.org/doc/website-style-guide/>
developer/general/continuous-integration
developer/general/usability-ux

View file

@ -250,7 +250,6 @@ Here is an overview of the VM virtualization modes:
- PV
What's so special about Qubes' GUI virtualization?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -285,7 +284,8 @@ How should I report documentation issues?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you can fix the problem yourself, please see `how to edit the documentation <https://www.qubes-os.org/doc/how-to-edit-the-documentation/>`__. If not, please see :doc:`issue tracking </introduction/issue-tracking>`.
If you can fix the problem yourself, please see :doc:`how to edit the documentation </developer/general/how-to-edit-the-rst-documentation/>`.
If not, please see :doc:`issue tracking </introduction/issue-tracking>`.
Will Qubes seek to get certified under the GNU Free System Distribution Guidelines (GNU FSDG)?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -299,12 +299,30 @@ The `four essential freedoms <https://www.gnu.org/philosophy/free-sw.html>`__ ar
Also see `Is Qubes OS free and open-source software? <#is-qubes-os-free-and-open-source-software>`__ and the Qubes OS :doc:`software license </developer/code/license>`.
Why is the documentation hosted on ReadTheDocs as opposed to the website?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Qubes OS documentation is written in reStructuredText and hosted on `Read The Docs <https://readsthedocs.com/>`__.
The infrastructure is largely outside of our control. We dont consider this a problem, however, since we explicitly `distrust the infrastructure <#what-does-it-mean-to-distrust-the-infrastructure>`__.
For this reason, we dont think that anyone should place undue trust in the live version of this site on the Web.
Instead, if you want to obtain your own trustworthy copy of the documentation in a secure way,
you should clone our `documentation repo <https://github.com/QubesOS/qubes-doc>`__,
:ref:`verify the PGP signatures on the commits and/or tags <project-security/verifying-signatures:how to verify signatures on git repository tags and commits>`
signed by the `doc-signing keys <https://github.com/QubesOS/qubes-secpack/tree/master/keys/doc-signing>`__
(which indicates that the content has undergone :ref:`review <developer/general/how-to-edit-the-rst-documentation:security>`),
then either :ref:`render the documentation on your local machine <developer/general/how-to-edit-the-rst-documentation:building the rst documentation locally>`,
simply read the source, or download a rendered EPUB or PDF Version from `doc.qubes-os.org <https://doc.qubes-os.org/en/latest/>`__.
Weve gone to special effort to set all of this up so that no one has to trust the infrastructure and so that the contents of the documentaion are maximally available and accessible.
Should I trust this website?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This website is hosted on `GitHub Pages <https://pages.github.com/>`__ (`why? <#why-do-you-use-github>`__). Therefore, it is largely outside of our control. We dont consider this a problem, however, since we explicitly `distrust the infrastructure <#what-does-it-mean-to-distrust-the-infrastructure>`__. For this reason, we dont think that anyone should place undue trust in the live version of this site on the Web. Instead, if you want to obtain your own trustworthy copy of this website in a secure way, you should clone our `website repo <https://github.com/QubesOS/qubesos.github.io>`__, :ref:`verify the PGP signatures on the commits and/or tags <project-security/verifying-signatures:how to verify signatures on git repository tags and commits>` signed by the `doc-signing keys <https://github.com/QubesOS/qubes-secpack/tree/master/keys/doc-signing>`__ (which indicates that the content has undergone `review <https://www.qubes-os.org/doc/how-to-edit-the-documentation/#security>`__), then either `render the site on your local machine <https://github.com/QubesOS/qubesos.github.io/blob/master/README.md#instructions>`__ or simply read the source, the vast majority of which was `intentionally written in Markdown so as to be readable as plain text for this very reason <https://www.qubes-os.org/doc/documentation-style-guide/#markdown-conventions>`__. Weve gone to special effort to set all of this up so that no one has to trust the infrastructure and so that the contents of this website are maximally available and accessible.
What does it mean to "distrust the infrastructure"?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -543,7 +561,7 @@ or
- Go to the sysfs (``/sys/bus/pci``), find the right device, detach it from the pciback driver and attach back to the original driver. Replace ``<BDF>`` with your device, for example ``00:1c.2``:
.. code:: console
.. code:: bash
echo 0000:<BDF> > /sys/bus/pci/drivers/pciback/unbind
MODALIAS=`cat /sys/bus/pci/devices/0000:<BDF>/modalias`
@ -570,7 +588,7 @@ For Debian:
.. code:: console
.. code:: bash
$ sudo apt install vlc
@ -589,7 +607,7 @@ For Fedora:
.. code:: console
.. code:: bash
$ sudo dnf install vlc
@ -672,7 +690,7 @@ I see a screen popup with SeaBios and 4 lines, last one being ``Probing EDD (edd
From a ``dom0`` prompt, enter:
.. code:: console
.. code:: bash
qvm-prefs <HVMname> kernel ""
@ -696,7 +714,7 @@ I see a "Failed to start Load Kernel Modules" message on boot
The full message looks like:
.. code:: text
.. code:: bash
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.

View file

@ -71,7 +71,7 @@ Why Qubes OS?
Physical isolation is a given safeguard that the digital world lacks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Throughout our lives, we engage in various activities, such as going to
school, working, voting, taking care of our families, and visiting with
@ -159,20 +159,20 @@ open-source in order to be trustworthy.
Video Tours
~~~~~~~~~~~
^^^^^^^^^^^
Want to see Qubes OS in action? Sit back and watch a guided :doc:`tour! </introduction/video-tours/>`
Screenshots
~~~~~~~~~~~
^^^^^^^^^^^
See what using Qubes actually looks like with these :doc:`screenshots </introduction/screenshots/>` of various
applications running in Qubes.
Getting Started
~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^
Ready to get started with Qubes? :doc:`Here's </introduction/getting-started>` what you need to know after installing.

View file

@ -11,7 +11,26 @@ Website
For the legally-required boilerplate, see `Website Privacy Policy <https://www.qubes-os.org/website-privacy-policy/>`__.
This is just a static website generated with Jekyll and hosted from GitHub Pages. We try to use as little JavaScript as possible. We host all resources locally (no third-party CDNs) so that you only have to connect to one domain. This site should be easy to browse using Tor Browser and with scripts blocked. We also have an `onion service <http://qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/>`__ (access is not logged). We even go out of our way to make it easy to download `this websites git repo <https://github.com/QubesOS/qubesos.github.io>`__, including all the website source code, so that you can host this entire site from your own local machine offline. Better yet, weve specifically written all of the :doc:`documentation </index>` in Markdown so that the plain text can be enjoyed from the comfort of your terminal. Heres the `repo <https://github.com/QubesOS/qubes-doc>`__. (By the way, Git tags on our repos are PGP-signed so you can :doc:`verify </project-security/verifying-signatures>` the authenticity of the content.) Obviously, we dont use any ads or trackers, but this is still a public website, so man-in-the-middle attacks and such are always a possibility. Please be careful. See :ref:`FAQ: Should I trust this website? <introduction/faq:should i trust this website?>`
This is just a static website generated with Jekyll and hosted from GitHub Pages. We try to use as little JavaScript as possible. We host all resources locally (no third-party CDNs) so that you only have to connect to one domain. The website should be easy to browse using Tor Browser and with scripts blocked. We also have an `onion service <http://qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/>`__ (access is not logged). We even go out of our way to make it easy to download `this websites git repo <https://github.com/QubesOS/qubesos.github.io>`__, including all the website source code, so that you can host this entire site from your own local machine offline.
Most of the website is written in Markdown so that the plain text can be enjoyed from the comfort of your terminal.
Obviously, we dont use any ads or trackers, but this is still a public website, so man-in-the-middle attacks and such are always a possibility. Please be careful. See :ref:`FAQ: Should I trust this website? <introduction/faq:should i trust this website?>`
Qubes OS documentation
----------------------
Qubes OS documentation is hosted on `Read The Docs <https://readsthedocs.com/>`__.
Weve converted all of the :doc:`documentation </index>` from Markdown to reStructuredText. You can enjoy the plain text from the comfort of your terminal. Heres the `repo <https://github.com/QubesOS/qubes-doc>`__. (By the way, Git tags on our repos are PGP-signed so you can :doc:`verify </project-security/verifying-signatures>` the authenticity of the content.) We omit the ethical ads from RTD, but this is still a public website, so man-in-the-middle attacks and such are always a possibility. Please be careful. Also see :ref:`FAQ: Why is the documentation hosted on ReadTheDocs as opposed to the website? <introduction/faq:why is the documentation hosted on readthedocs as opposed to the website?>`.
Please refer to RTD's `privacy policy <https://docs.readthedocs.com/platform/stable/privacy-policy.html>`__
for more information.
As per RTD site, the TL;DR version is as follows:
.. code:: text
RTD collects information only with consent; only the minimum amount of personal information that is necessary to fulfill the purpose of the interaction with RTD;
doesnt sell it to third parties; and only use it as the above Privacy Policy describes.
Update Servers and Repositories
-------------------------------

26
pyproject.toml Normal file
View file

@ -0,0 +1,26 @@
[project]
name = "qubes-doc"
version = "4.2"
description = "Qubes OS documentation"
authors = [
{name = "Qubes OS"}
]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"sphinx (>=8.2.3,<9.0.0)"
]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
sphinx = "^8.2.3"
sphinx-autobuild = "^2024.10.3"
sphinx-lint = "^1.0.0"
sphinx-reredirects = "^1.0.0"
sphinxnotes-strike = "^1.2.1"
sphinx-rtd-theme = "^3.0.2"