Skip to content

Commit

Permalink
docs: use ".. code-block:: shell-session" wherever relevant
Browse files Browse the repository at this point in the history
The ".. code-block::" directive defined by Sphinx is more flexible, and
we have tried to enforce its use over ".. code::" for some time.
Similarly, the "bash" language passed as an argument to that directive
is often incorrect, as it should be used for bash scripts. For commands
to type in the console, "shell-session" should be preferred.

In this commit:

- Replace ".. code::" with ".. code-block::" everywhere.

- Replace "bash" with "shell-session" everywhere relevant (most of the
  occurrences).

- Fix the use of "::" (literal block, for raw output) versus the
  "code-block" directive (for code snippets). However, I have not
  checked all existing occurrences of ".. code-block::".

- Fix the use of the "parsed-literal" directive, which should be used
  only when there are RST elements to parse in the block (typically some
  RST substitutions).

- Fix a small number of minor formatting issues met when updating the
  directives.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
  • Loading branch information
qmonnet authored and aanm committed Jun 9, 2021
1 parent e63aa2b commit e9166c4
Show file tree
Hide file tree
Showing 83 changed files with 935 additions and 931 deletions.
4 changes: 2 additions & 2 deletions Documentation/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ can be pointed to an arbitrary API address.
Example
-------

.. code:: bash
.. code-block:: shell-session
$ cilium -H unix:///var/run/cilium/cilium.sock
[...]
Expand All @@ -61,7 +61,7 @@ Example

The full example can be found in the `cilium/client-example`_ repository.

.. code:: go
.. code-block:: go
import (
"fmt"
Expand Down

0 comments on commit e9166c4

Please sign in to comment.