-
-
Notifications
You must be signed in to change notification settings - Fork 686
/
writing_docs.rst
117 lines (79 loc) · 3.36 KB
/
writing_docs.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Writing docs
============
A great way to contribute without writing code is to help writing
documentation. Please reach out before contributing as the software is still in
an alpha state and portions may not be worth documenting as it changes too
frequently.
Writing technical documentation
-------------------------------
All documentation is written in ReStructured Text and is available in the
`BlenderBIM Add-on docs directory
<https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0/src/blenderbim/docs>`_.
You can press the edit button on the top right on any documentation page to
quickly edit their content.
You can link to `external websites
<https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html>`_
(note the space between the url and the link text). You can also link to
sections on the same page, like :ref:`devs/writing_docs:Writing technical
documentation` or with :ref:`custom text<devs/writing_docs:writing technical
documentation>`. Traditional references like `Writing technical documentation`_
work too but are discouraged. You can link to other pages, like :doc:`Hello
World<hello_world>` or sections within other pages, like
:ref:`devs/installation:unstable installation`. We have ``autosectionlabel``
enabled so it is not necessary to manually create labels.
The following colours and annotation styles should be used for annotating
images. All stroke widths are 3px with a corner radius of 3px. Horizontal
underlines are 5px with a corner radius of 2px. The dark green is ``39b54a`` and
the light green is ``d9e021``.
.. image:: images/documentation-style.png
Special keywords such as **Technical Terminology** that the user should be
aware of should be bolded, titlecased, and used consistently. You *may*
use italics to emphasize words or phrases. Inline code must be ``quoted`` and
longer code snippets may use code blocks.
.. code-block:: console
$ cd /path/to/blenderbim
$ ls
Be sure to specify the language to enable syntax highlighting.
.. code-block:: python
print("Hello, world!")
A button may be used to point users to a critical sample file or
download.
.. container:: blockbutton
`Visit critical link <https://blenderbim.org>`__
You can use bulleted lists:
- Like.
- This.
Or ordered lists:
1. Like.
2. This.
.. note::
Instead of writing "Note that XYZ ..." you should use notes sparingly to
highlight "gotchas".
.. tip::
Tips may be used to add a useful but optional suggestion.
.. warning::
Warnings may be used to highlight common mistakes.
.. seealso::
See also blocks should be used to reference `further reading
<https://blenderbim.org>`__ links.
Tables can be very annoying to format. You can use a CSV table instead.
.. csv-table::
:header: "Foo", "Bar", "Baz"
"ABC", "01", "02"
"DEF", "03", "04"
Building documentation
----------------------
If you want to build the documentation locally, the documentation system uses
`Sphinx <https://www.sphinx-doc.org/en/master/>`_. First, install the theme and
theme dependencies:
.. code-block:: console
$ pip install furo
$ pip install sphinx-autoapi
$ pip install sphinx-copybutton
Now you can generate the documentation:
.. code-block:: console
$ cd /path/to/ifcopenshell/src/blenderbim/docs/
$ make html
$ cd _build/html
$ python -m http.server
You will now have a local webserver running hosting the documentation.