Skip to content

Commit 39091e6

Browse files
authored
Merge pull request #1195 from XhmikosR/xmr/md-040
Markdownlint: enable MD040 rule
2 parents a0d5d0e + bc27773 commit 39091e6

31 files changed

+135
-152
lines changed

.markdownlint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
},
3333
"MD036": false,
3434
"MD038": false,
35-
"MD040": false,
3635
"MD041": false,
3736
"MD045": false,
3837
"MD046": {

docs/api/auth.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ To get a session ID, you will have to send a `POST` request to the `/api/auth` e
77

88
=== "bash / cURL"
99

10-
``` bash
10+
```bash
1111
curl -k -X POST "https://pi.hole/api/auth" --data '{"password":"your-password"}'
1212
```
1313

1414
=== "Python 3"
1515

16-
``` python
16+
```python
1717
import requests
1818

1919
url = "https://pi.hole/api/auth"
@@ -26,7 +26,7 @@ To get a session ID, you will have to send a `POST` request to the `/api/auth` e
2626

2727
=== "Javascript (plain)"
2828

29-
``` javascript
29+
```javascript
3030
var data = JSON.stringify({"password":"your-password"});
3131
var xhr = new XMLHttpRequest();
3232

@@ -39,7 +39,7 @@ To get a session ID, you will have to send a `POST` request to the `/api/auth` e
3939

4040
=== "Javascript (jQuery)"
4141

42-
``` javascript
42+
```javascript
4343
$.ajax({
4444
url: "https://pi.hole/api/auth",
4545
type: "POST",
@@ -55,7 +55,7 @@ To get a session ID, you will have to send a `POST` request to the `/api/auth` e
5555

5656
=== "C"
5757

58-
``` c
58+
```c
5959
#include <stdio.h>
6060
#include <stdlib.h>
6161
#include <curl/curl.h>
@@ -144,14 +144,14 @@ Note that when using cookie-based authentication, you will also need to send a `
144144

145145
=== "bash / cURL"
146146

147-
``` bash
147+
```bash
148148
# Example: Authentication with SID in the request URI
149149
curl -k -X GET "https://pi.hole/api/dns/blocking?sid=vFA+EP4MQ5JJvJg+3Q2Jnw="
150150
```
151151

152152
=== "Python 3"
153153

154-
``` python
154+
```python
155155
# Example: Authentication with SID in the request header
156156
import requests
157157

@@ -169,7 +169,7 @@ Note that when using cookie-based authentication, you will also need to send a `
169169

170170
=== "Javascript (plain)"
171171

172-
``` javascript
172+
```javascript
173173
var data = null;
174174
var xhr = new XMLHttpRequest();
175175

@@ -186,7 +186,7 @@ Note that when using cookie-based authentication, you will also need to send a `
186186

187187
=== "Javascript (jQuery)"
188188

189-
``` javascript
189+
```javascript
190190
$.ajax({
191191
url: "https://pi.hole/api/dns/blocking",
192192
type: "GET",
@@ -220,13 +220,13 @@ If you have 2FA enabled for your Pi-hole, you will need to provide a TOTP token
220220

221221
=== "bash / cURL"
222222

223-
``` bash
223+
```bash
224224
curl -k -X POST "https://pi.hole/api/auth" --data '{"password":"your-password", "totp":"123456"}'
225225
```
226226

227227
=== "Python 3"
228228

229-
``` python
229+
```python
230230
import requests
231231

232232
url = "https://pi.hole/api/auth"
@@ -242,7 +242,7 @@ If you have 2FA enabled for your Pi-hole, you will need to provide a TOTP token
242242

243243
=== "Javascript (plain)"
244244

245-
``` javascript
245+
```javascript
246246
var data = JSON.stringify({"password":"your-password", "totp":"123456"});
247247
var xhr = new XMLHttpRequest();
248248

@@ -255,7 +255,7 @@ If you have 2FA enabled for your Pi-hole, you will need to provide a TOTP token
255255

256256
=== "Javascript (jQuery)"
257257

258-
``` javascript
258+
```javascript
259259
$.ajax({
260260
url: "https://pi.hole/api/auth",
261261
type: "POST",
@@ -302,7 +302,7 @@ In addition to the status code, the server will also return a JSON object with m
302302

303303
or
304304

305-
``` json
305+
```json
306306
{
307307
"error": {
308308
"key": "bad_request",
@@ -325,14 +325,14 @@ To end your session before the SID expires, you can send a `DELETE` request to t
325325

326326
=== "bash / cURL"
327327

328-
``` bash
328+
```bash
329329
# Example: Logout with SID in the request URI
330330
curl -k -X DELETE "https://pi.hole/api/auth?sid=vFA+EP4MQ5JJvJg+3Q2Jnw="
331331
```
332332

333333
=== "Python 3"
334334

335-
``` python
335+
```python
336336
# Example: Logout with SID in the request header
337337
import requests
338338

@@ -349,7 +349,7 @@ To end your session before the SID expires, you can send a `DELETE` request to t
349349

350350
=== "Javascript (plain)"
351351

352-
``` javascript
352+
```javascript
353353
var data = null;
354354
var xhr = new XMLHttpRequest();
355355

@@ -365,7 +365,7 @@ To end your session before the SID expires, you can send a `DELETE` request to t
365365

366366
=== "Javascript (jQuery)"
367367

368-
``` javascript
368+
```javascript
369369
$.ajax({
370370
url: "https://pi.hole/api/auth",
371371
type: "DELETE",

docs/api/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The form of replies to successful requests strongly depends on the selected endp
2121

2222
Response code: `HTTP/1.1 200 OK`
2323

24-
``` json
24+
```json
2525
{
2626
"blocking": true
2727
}
@@ -45,7 +45,7 @@ In contrast, errors have a uniform, predictable style to ease their programmatic
4545

4646
Response code: `HTTP/1.1 401 Unauthorized`
4747

48-
``` json
48+
```json
4949
{
5050
"error": {
5151
"key": "unauthorized",
@@ -101,7 +101,7 @@ In contrast, errors have a uniform, predictable style to ease their programmatic
101101

102102
Examples for a failed request with `hint` being set is (domain is already on this list):
103103

104-
``` json
104+
```json
105105
{
106106
"error": {
107107
"key": "database_error",

docs/docker/build-image.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In case you wish to customize the image, or perhaps check out a branch after bei
44

55
In order to build the image locally, you will first need a copy of the repository on your computer. The following commands will clone the repository from Github and then put you into the directory
66

7-
```
7+
```bash
88
git clone https://github.com/pi-hole/docker-pi-hole
99
cd docker-pi-hole
1010
git checkout development #NOTE: This step is only needed until V6 is released
@@ -14,7 +14,7 @@ All other commands following assume you have at least run the above steps.
1414

1515
## Build.sh
1616

17-
```
17+
```text
1818
Usage: ./build.sh [-l] [-f <ftl_branch>] [-c <core_branch>] [-w <web_branch>] [-t <tag>] [use_cache]
1919
Options:
2020
-f, --ftlbranch <branch> Specify FTL branch (cannot be used in conjunction with -l)
@@ -37,7 +37,7 @@ When contributing, it's always a good idea to test your changes before submittin
3737

3838
There is also `./build-and-test.sh`, which can be used to verify the tests that are run on Github pass with your changes.
3939

40-
```
40+
```bash
4141
git checkout -b myNewFeatureBranch
4242
#make some changes
4343
./build.sh
@@ -51,13 +51,13 @@ Occasionally you may need to try an alternative branch of one of the components
5151

5252
- You have been asked by a developer to checkout the FTL branch `new/Sensors`. To do so
5353

54-
```
54+
```bash
5555
./build.sh -f new/Sensors
5656
```
5757

5858
- There is new docker-specific work being carried out on the branch `fix/logRotate` that you wish to test
5959

60-
```
60+
```bash
6161
git checkout fix/logRotate
6262
./build.sh
6363
```
@@ -74,6 +74,6 @@ services:
7474
...
7575
```
7676

77-
```
77+
```bash
7878
docker run [options] pihole:local
7979
```

docs/docker/configuration.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Array type configs should be delimited with `;`
3838
!!! note
3939
All FTL settings that are set via environment variables effectively become read-only, meaning that you will not be able to change them via the web interface or CLI. This is to ensure a "single source of truth" on the config. If you later unset or remove an environment variable, then FTL will revert to the default value for that setting
4040

41-
4241
An example of how some of these variables may look in your compose file
4342

4443
```yaml

docs/docker/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Run `docker compose up -d` to build and start Pi-hole (on older systems, the syn
4949

5050
The equivalent command for `docker run` would be:
5151

52-
```
52+
```bash
5353
docker run --name pihole -p 53:53/tcp -p 53:53/udp -p 80:80/tcp -p 443:443/tcp -e TZ=Europe/London -e FTLCONF_webserver_api_password="correct horse battery staple" -e FTLCONF_dns_listeningMode=all -v ./etc-pihole:/etc/pihole -v ./etc-dnsmasq.d:/etc/dnsmasq.d --cap-add NET_ADMIN --restart unless-stopped pihole/pihole:latest
5454
```
5555

docs/docker/upgrading/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ docker rm pihole
2828
docker pull pihole/pihole:latest
2929
docker run [ ... arguments (see Getting Started) ... ]
3030
```
31-

docs/docker/upgrading/v5-v6.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Nearly all environment variables from previous versions have been removed, but f
4141

4242
Reverse server (`REV_SERVER*`) variables should be replaced with the single `FTLCONF_dns_revServers`, which accepts an array of reverse servers (delimited by `;`) in the following format:
4343

44-
```
44+
```text
4545
<enabled>,<ip-address>[/<prefix-len>],<server>[#<port>],<domain>
4646
```
4747

@@ -54,7 +54,7 @@ If, for example, you had the following old style variables:
5454

5555
You would now set:
5656

57-
```
57+
```text
5858
FTLCONF_dns_revServers: 'true,192.168.0.0/24,192.168.0.1#53,lan'
5959
```
6060

@@ -65,10 +65,8 @@ By default, Pi-hole v6 no longer reads configuration files from `/etc/dnsmasq.d/
6565
1. Mount the local folder containing the config files into `/etc/dnsmasq.d` into the container
6666
2. Set the environment variable `FTLCONF_misc_etc_dnsmasq_d: 'true'`
6767

68-
6968
If you only want to add a single/few `dnsmasq` config lines you can use the variable `FTLCONF_misc_dnsmasq_lines`. Each line should be separated with `;`
7069

71-
7270
### Removed Variables
7371

7472
The following variables can be removed without replacement, as they are no longer used:
@@ -93,4 +91,3 @@ The following variables can be removed without replacement, as they are no longe
9391
- `WEB_UID`
9492
- `WEBLOGS_STDOUT`
9593
- `WEBPASSWORD_FILE`
96-

docs/ftldns/blockingmode.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In `NULL` mode, which is both the default and recommended mode for Pi-hole *FTL*
1414

1515
A blocked query would look like the following:
1616

17-
```
17+
```text
1818
;; QUESTION SECTION:
1919
;doubleclick.net. IN ANY
2020
@@ -40,7 +40,7 @@ In `IP-NODATA-AAAA` mode, blocked queries will be answered with the local IPv4 a
4040

4141
Assuming your Pi-hole server is at `192.168.1.42`, then a blocked query would look like the following:
4242

43-
```
43+
```text
4444
;; QUESTION SECTION:
4545
;doubleclick.net. IN ANY
4646
@@ -64,7 +64,7 @@ The IP that is returned is automatically determined by FTL, however it can also
6464

6565
A blocked query would look like the following:
6666

67-
```
67+
```text
6868
;; QUESTION SECTION:
6969
;doubleclick.net. IN ANY
7070
@@ -88,7 +88,7 @@ In `NXDOMAIN` mode, blocked queries will be answered with an empty response (i.e
8888

8989
A blocked query would look like the following:
9090

91-
```
91+
```text
9292
;; QUESTION SECTION:
9393
;doubleclick.net. IN ANY
9494
```
@@ -101,10 +101,9 @@ In `NODATA` mode, blocked queries will be answered with an empty response (no an
101101

102102
A blocked query would look like the following:
103103

104-
```
104+
```text
105105
;; QUESTION SECTION:
106106
;doubleclick.net. IN ANY
107107
```
108108

109109
**Advantages & Disadvantages:** This mode is similar to `NXDOMAIN` blocking mode. Clients might have a better acceptance of `NODATA` replies compared to `NXDOMAIN` replies.
110-

0 commit comments

Comments
 (0)