Skip to content

Commit d736945

Browse files
committed
Improve user documentation
* Amend section "Configuring the Tool" (now in a separate file) * Small typo fixes
1 parent 0f4fb7b commit d736945

6 files changed

Lines changed: 27 additions & 21 deletions

File tree

changelog.d/18.doc.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
Docs: Improve development docs
2-
3-
* Try to be consistent with prompts
4-
* Add some code block captions and names to have a constant anchor
5-
* Add two new sections:
6-
* Triggering Actions Manually
7-
* Knowing GitHub Setup
8-
* Mention GitHub CLI :command:`gh`
1+
Docs: Improve development and user docs

docs/source/user/config.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _configuring-docbuild:
2+
3+
Configuring the Tool
4+
---------------------
5+
6+
Currently, the environment configuration is done via a TOML file. An example configuration file is provided in the repository. find it at :gh_tree:`etc/docbuild/env.example.toml`. Copy it to your working directory and name it accordingly to your purpose, for example, ``env.development.toml``, ``env.testing.toml``, or ``env.production.toml``. Modify it according to your needs.
7+
8+
To use the configuration file, specific it with the option ``--env-config``.
9+
10+
If you need to deal with different environments (testing, staging, production), it can be tedious to type. In such a case, use aliases in your shell.
11+
12+
.. code-block:: shell-session
13+
:caption: Example aliases for a configuration file
14+
:name: docbuild-aliases
15+
16+
$ alias docbuild-prod='docbuild --env-config env.production.toml'
17+
$ alias docbuild-test='docbuild --env-config env.testing.toml'
18+
$ alias docbuild-dev='docbuild --env-config env.development.toml'
19+
20+
Keep in mind, all configuration files that match the pattern ``env.*.toml`` are ignored by git. This is on purpose to prevent accidental commits of sensitive information.

docs/source/user/config/application.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Showing app's configuration
1+
Showing App's Configuration
22
===========================
33

44
Application configuration files ("app config") affects the behavior of the docbuild tool itself, such as how it processes documents, logging, handles errors, etc.
@@ -18,7 +18,7 @@ If you want to override the default search strategy, use the ``--app-config`` op
1818
:caption: Showing configuration files
1919
2020
$ docbuild config app
21-
# Application config files '/home/tux/repos/GH/tomschr/docbuild/.config.toml'
21+
# Application config files '/home/tux/repos/GH/opensuse/docbuild/.config.toml'
2222
[ ... content ...]
2323
2424
In the previous example, there is a :file:`.config.toml` file in the

docs/source/user/config/environment.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Showing env's configuration
1+
Showing Env's Configuration
22
===========================
33

44
Environment configuration files ("env config") is specific to the environment in which the docbuild tool operates, such as paths to source files, output directories, and other environment-specific settings.
@@ -11,7 +11,7 @@ If you want to override the default, use the ``--env-config`` option to specify
1111
:caption: Showing env configuration content
1212
1313
$ docbuild --env-config env.develop.toml config env
14-
# ENV Config file '/home/tux/repos/GH/tomschr/docbuild/env.production.toml'
14+
# ENV Config file '/home/tux/repos/GH/opensuse/docbuild/env.production.toml'
1515
[ ... content ...]
1616
1717
In the previous example, there is a :file:`env.production.toml` file in the

docs/source/user/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ User Guide
66
:caption: Contents
77

88
install
9+
config
910
run-docbuild
1011
config/index
1112
build

docs/source/user/install.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,7 @@ Installing the tool
101101

102102
.. code-block:: shell-session
103103
104-
$ uv sync
104+
$ uv sync --frozen
105105
Resolved 29 packages in 586ms
106106
Built docbuild @ file:///.../docbuild
107107
Installed 15 packages in 2.11s
108-
109-
110-
.. _configuring-docbuild:
111-
112-
Configuring the tool
113-
---------------------
114-
115-
TODO

0 commit comments

Comments
 (0)