Skip to content

Commit 4efd995

Browse files
docs(ci): use 'doc8' to check ReStructuredText files
Add it to the CI and resolve issues found.
1 parent aa0739a commit 4efd995

File tree

10 files changed

+135
-60
lines changed

10 files changed

+135
-60
lines changed

.github/workflows/lint-and-analyse-php.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
run: tox -e cz
3232
- name: Run config-check
3333
run: tox -e config-check
34+
- name: Run doc8
35+
run: tox -e doc8
3436
- name: Ensure no merge-commits in the Pull Request (PR)
3537
if: github.event_name == 'pull_request'
3638
run: |

docs/source/ADVANCED-CONFIGURATION.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
Advanced Configuration
22
======================
33

4-
This guide covers all advanced configuration options available in LibreBooking. For basic setup, see :doc:`BASIC-CONFIGURATION` first.
4+
This guide covers all advanced configuration options available in LibreBooking.
5+
For basic setup, see :doc:`BASIC-CONFIGURATION` first.
56

6-
All settings are configured in the ``/config/config.php`` file. The configuration uses a mix of flat dot notation and nested arrays.
7+
All settings are configured in the ``/config/config.php`` file. The
8+
configuration uses a mix of flat dot notation and nested arrays.
79

810
Environment Variable Override
911
-----------------------------
1012

11-
LibreBooking supports overriding any configuration setting using environment variables. This provides flexibility for deployment scenarios and keeps sensitive data separate from configuration files.
13+
LibreBooking supports overriding any configuration setting using environment
14+
variables. This provides flexibility for deployment scenarios and keeps
15+
sensitive data separate from configuration files.
1216

1317
**Naming Convention**
1418
Environment variables follow the pattern: ``LB_`` + config key with special characters converted:
@@ -51,7 +55,8 @@ LibreBooking supports overriding any configuration setting using environment var
5155
- LB_ADMIN_EMAIL=admin@company.com
5256
5357
**Complete Example**
54-
See ``develop/app/.env.example`` for a comprehensive list of all available environment variables with their default values and descriptions.
58+
See ``develop/app/.env.example`` for a comprehensive list of all available
59+
environment variables with their default values and descriptions.
5560

5661
Application Advanced Settings
5762
-----------------------------
@@ -262,7 +267,10 @@ Schedule Display Settings
262267
Show resources that users cannot book (grayed out).
263268

264269
**schedule.reservation.label**
265-
Template for reservation labels. Available tokens: {name}, {title}, {description}, {email}, {phone}, {organization}, {position}, {startdate}, {enddate}, {resourcename}, {participants}, {invitees}, {reservationAttributes}, and custom attributes like {att1}.
270+
Template for reservation labels. Available tokens: {name}, {title},
271+
{description}, {email}, {phone}, {organization}, {position}, {startdate},
272+
{enddate}, {resourcename}, {participants}, {invitees},
273+
{reservationAttributes}, and custom attributes like {att1}.
266274

267275
**schedule.use.per.user.colors**
268276
Use different colors for each user's reservations.
@@ -354,7 +362,8 @@ Reservation Label Templates
354362
'reservation.popup' => '',
355363
],
356364
357-
These templates control how reservations appear in different contexts using the same tokens as schedule.reservation.label.
365+
These templates control how reservations appear in different contexts using the
366+
same tokens as schedule.reservation.label.
358367

359368
Reports Settings
360369
----------------
@@ -728,7 +737,8 @@ Plugin System
728737
'styling' => '',
729738
],
730739
731-
Available authentication plugins: ActiveDirectory, Apache, CAS, Drupal, Krb5, Ldap, Mellon, Moodle, MoodleAdv, Saml, Shibboleth, WordPress.
740+
Available authentication plugins: ActiveDirectory, Apache, CAS, Drupal, Krb5,
741+
Ldap, Mellon, Moodle, MoodleAdv, Saml, Shibboleth, WordPress.
732742

733743
For authentication plugin configuration, see:
734744

docs/source/ActiveDirectory-Authentication.rst

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Active Directory Authentication
22
================================
33

4-
The Active Directory authentication plugin provides enhanced support for Microsoft Active Directory with features like Single Sign-On (SSO).
4+
The Active Directory authentication plugin provides enhanced support for
5+
Microsoft Active Directory with features like Single Sign-On (SSO).
56

67
Enable the Plugin
78
-----------------
@@ -14,7 +15,8 @@ Edit ``/config/config.php`` and set:
1415
'authentication' => 'ActiveDirectory',
1516
],
1617
17-
Alternatively, enable the plugin through the web admin interface at **Application Configuration** (``/Web/admin/manage_configuration.php``).
18+
Alternatively, enable the plugin through the web admin interface at
19+
**Application Configuration** (``/Web/admin/manage_configuration.php``).
1820

1921
Configuration
2022
-------------
@@ -25,19 +27,27 @@ If not existing already, copy the template and edit with your Active Directory s
2527
2628
cp /plugins/Authentication/ActiveDirectory/ActiveDirectory.config.dist.php /config/ActiveDirectory.config.php
2729
28-
The configuration file at ``/config/ActiveDirectory.config.php`` contains all available options with detailed comments. You can also view and modify these settings through the web admin interface at **Application Management > Configuration**. Key settings include:
30+
The configuration file at ``/config/ActiveDirectory.config.php`` contains all
31+
available options with detailed comments. You can also view and modify these
32+
settings through the web admin interface at **Application Management >
33+
Configuration**. Key settings include:
2934

3035
- **domain.controllers**: Comma-separated list of domain controller hostnames
3136
- **username/password**: Service account credentials for AD searches
3237
- **basedn**: Base DN in DC= format (e.g., ``DC=example,DC=com``)
3338
- **account.suffix**: Domain suffix for user logins (e.g., ``@example.com``)
34-
- **attribute.mapping**: Maps AD attributes to LibreBooking fields (note: AD uses ``givenName``, ``telephoneNumber``, etc.)
39+
- **attribute.mapping**: Maps AD attributes to LibreBooking fields (note: AD
40+
uses ``givenName``, ``telephoneNumber``, etc.)
3541
- **sync.groups**: Enable group membership synchronization
3642
- **use.sso**: Enable Windows Single Sign-On
3743
- **database.auth.when.ldap.user.not.found**: Fallback to database authentication
3844

39-
Alternatively, configure the plugin through the web admin interface at **Application Configuration** (``/Web/admin/manage_configuration.php``) and select **Authentification-ActiveDirectory**.
40-
Refer to ``/plugins/Authentication/ActiveDirectory/ActiveDirectory.config.dist.php`` for complete documentation of all options.
45+
Alternatively, configure the plugin through the web admin interface at
46+
**Application Configuration** (``/Web/admin/manage_configuration.php``) and
47+
select **Authentification-ActiveDirectory**.
48+
Refer to
49+
``/plugins/Authentication/ActiveDirectory/ActiveDirectory.config.dist.php`` for
50+
complete documentation of all options.
4151

4252
User Login
4353
----------
@@ -52,28 +62,32 @@ This simplifies the login experience while maintaining proper AD authentication.
5262
Single Sign-On (SSO)
5363
--------------------
5464

55-
When ``use.sso`` is enabled, users are automatically authenticated using their Windows login credentials.
65+
When ``use.sso`` is enabled, users are automatically authenticated using their
66+
Windows login credentials.
5667

5768
Requirements:
5869

5970
- Web server configured for Windows authentication:
60-
71+
6172
- IIS with Windows Authentication enabled
6273
- Apache with mod_auth_sspi or mod_auth_kerb
6374

6475
- Browsers configured to send Windows credentials automatically
6576
- Users accessing from domain-joined computers
6677
- The ``$_SERVER['REMOTE_USER']`` variable populated by the web server
6778

68-
With SSO enabled, users won't see a login page - they're automatically logged in using their Windows credentials.
79+
With SSO enabled, users won't see a login page - they're automatically logged
80+
in using their Windows credentials.
6981

7082
Troubleshooting
7183
---------------
7284

7385
Enable Debug Logging
7486
~~~~~~~~~~~~~~~~~~~~
7587

76-
Set ``debug.enabled`` to ``true`` in the Ldap plugin configuration (Active Directory uses the same logging) to see detailed operations in LibreBooking logs.
88+
Set ``debug.enabled`` to ``true`` in the Ldap plugin configuration (Active
89+
Directory uses the same logging) to see detailed operations in LibreBooking
90+
logs.
7791

7892
Migration from Database Auth
7993
-----------------------------
@@ -85,4 +99,5 @@ To migrate existing users:
8599
3. Users automatically switch to AD auth on next login
86100
4. Existing reservations and data are preserved
87101

88-
Users are matched by username - if a LibreBooking account exists with the same username, it will be updated with AD information.
102+
Users are matched by username - if a LibreBooking account exists with the same
103+
username, it will be updated with AD information.

docs/source/BASIC-CONFIGURATION.rst

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
Basic Configuration
22
===================
33

4-
This guide covers the essential configuration settings needed to get LibreBooking up and running. All settings are configured in the ``/config/config.php`` file, which should be created by copying ``/config/config.dist.php``.
4+
This guide covers the essential configuration settings needed to get
5+
LibreBooking up and running. All settings are configured in the
6+
``/config/config.php`` file, which should be created by copying
7+
``/config/config.dist.php``.
58

6-
The configuration file uses a PHP array format that returns a settings array. Some settings use nested arrays (like database settings), while others use flat dot notation.
9+
The configuration file uses a PHP array format that returns a settings array.
10+
Some settings use nested arrays (like database settings), while others use flat
11+
dot notation.
712

813
Getting Started
914
---------------
@@ -19,10 +24,13 @@ Then edit the file with your preferred settings.
1924
Environment Variable Override
2025
-----------------------------
2126

22-
LibreBooking supports overriding configuration settings using environment variables. This is especially useful for Docker deployments or when you want to keep sensitive information separate from configuration files.
27+
LibreBooking supports overriding configuration settings using environment
28+
variables. This is especially useful for Docker deployments or when you want to
29+
keep sensitive information separate from configuration files.
2330

2431
**Pattern**
25-
Environment variables follow the pattern ``LB_`` + the config key with dots and dashes converted to underscores and converted to uppercase.
32+
Environment variables follow the pattern ``LB_`` + the config key with dots
33+
and dashes converted to underscores and converted to uppercase.
2634

2735
**Examples**
2836

@@ -32,10 +40,13 @@ LibreBooking supports overriding configuration settings using environment variab
3240
- ``default.timezone`` → ``LB_DEFAULT_TIMEZONE``
3341

3442
**Using .env Files**
35-
LibreBooking automatically loads ``.env`` files if present in the root directory. See ``develop/app/.env.example`` for a complete list of available environment variables.
43+
LibreBooking automatically loads ``.env`` files if present in the root
44+
directory. See ``develop/app/.env.example`` for a complete list of available
45+
environment variables.
3646

3747
**Priority**
38-
Environment variables take precedence over configuration file settings. The order of precedence is:
48+
Environment variables take precedence over configuration file settings. The
49+
order of precedence is:
3950

4051
1. Environment variables (highest priority)
4152
2. Configuration file settings
@@ -49,47 +60,47 @@ Application Identity
4960

5061
**app.title**
5162
The title of the application displayed in the header and browser tab.
52-
63+
5364
.. code-block:: php
54-
65+
5566
'app.title' => 'LibreBooking',
5667
5768
**admin.email**
5869
Administrator email address.
59-
70+
6071
.. code-block:: php
61-
72+
6273
'admin.email' => 'admin@example.com',
6374
6475
**company.name**
6576
Company name to show in the page header.
66-
77+
6778
.. code-block:: php
68-
79+
6980
'company.name' => '',
7081
7182
**company.url**
7283
URL to the company's website.
73-
84+
7485
.. code-block:: php
75-
86+
7687
'company.url' => '',
7788
7889
Time and Language
7990
~~~~~~~~~~~~~~~~~
8091

8192
**default.timezone**
8293
Look up here http://php.net/manual/en/timezones.php.
83-
94+
8495
.. code-block:: php
85-
96+
8697
'default.timezone' => 'Europe/London',
8798
8899
**default.language**
89100
Default language for the application.
90-
101+
91102
.. code-block:: php
92-
103+
93104
'default.language' => 'en_us',
94105
95106
Database Configuration
@@ -273,7 +284,8 @@ Frontend Settings
273284
Public URL to the Web directory of this instance.
274285

275286
**css.theme**
276-
Theme to use for the application. Options: default, dimgray, dark_red, dark_green, french_blue, cake_blue, orange.
287+
Theme to use for the application. Options: default, dimgray, dark_red,
288+
dark_green, french_blue, cake_blue, orange.
277289

278290
**cache.templates**
279291
Enable or disable template caching.
@@ -286,9 +298,9 @@ Installation
286298

287299
**install.password**
288300
Password required for installation or upgrades.
289-
301+
290302
.. code-block:: php
291-
303+
292304
'install.password' => '',
293305
294306
Basic Privacy Settings
@@ -325,7 +337,8 @@ After configuring these basic settings:
325337
Docker Installation
326338
===================
327339

328-
LibreBooking can be easily deployed using Docker containers. This is the recommended method for quick setup and testing.
340+
LibreBooking can be easily deployed using Docker containers. This is the
341+
recommended method for quick setup and testing.
329342

330343
Prerequisites
331344
-------------
@@ -353,7 +366,7 @@ Quick Start with Docker Compose
353366
- PGID=1000
354367
- TZ=America/New_York
355368
- MYSQL_ROOT_PASSWORD=your_secure_root_password
356-
369+
357370
app:
358371
image: librebooking/librebooking:develop
359372
restart: always

docs/source/CONFIGURATION.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ This covers:
3333
Configuration File Format
3434
-------------------------
3535

36-
LibreBooking uses a PHP array-based configuration format. The file returns a settings array with both flat dot notation and nested arrays:
36+
LibreBooking uses a PHP array-based configuration format. The file returns a
37+
settings array with both flat dot notation and nested arrays:
3738

3839
.. code-block:: php
3940
@@ -43,7 +44,7 @@ LibreBooking uses a PHP array-based configuration format. The file returns a set
4344
// Flat keys
4445
'app.title' => 'LibreBooking',
4546
'admin.email' => 'admin@example.com',
46-
47+
4748
// Nested arrays
4849
'database' => [
4950
'type' => 'mysql',
@@ -52,7 +53,7 @@ LibreBooking uses a PHP array-based configuration format. The file returns a set
5253
'user' => 'lb_user',
5354
'password' => 'password',
5455
],
55-
56+
5657
'email' => [
5758
'enabled' => true,
5859
'default.from.address' => 'noreply@example.com',
@@ -71,4 +72,6 @@ Quick Start
7172
Migration from Old Format
7273
-------------------------
7374

74-
If upgrading from an older version that used ``$conf['settings'][...]`` format, you'll need to convert your configuration to the new array return format. The new format is more modern and provides better IDE support and validation.
75+
If upgrading from an older version that used ``$conf['settings'][...]`` format,
76+
you'll need to convert your configuration to the new array return format. The
77+
new format is more modern and provides better IDE support and validation.

docs/source/HISTORY.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Since forking from Booked Scheduler, LibreBooking has evolved significantly:
88

99
- Modernized PHP codebase with improved compatibility
1010
- Enhanced configuration system with comprehensive documentation
11-
- Improved Docker deployment support
11+
- Improved Docker deployment support
1212
- Updated dependencies and security fixes
1313
- Enhanced user interface and user experience
1414
- Expanded API capabilities

0 commit comments

Comments
 (0)