(docs): enabled syntax highlighting

... for better readability
pull/490/head
0xflotus 4 years ago committed by GitHub
parent 0262b817e9
commit 764c2f71eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -208,7 +208,7 @@ both of them support all necessary emoji glyphs.
Font configuration: Font configuration:
``` ```xml
$ cat ~/.config/fontconfig/fonts.conf $ cat ~/.config/fontconfig/fonts.conf
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
@ -301,7 +301,7 @@ To fetch information in JSON format, use the following syntax:
This will fetch information on the Detroit region in JSON format. The j1 format code is used to allow for the use of other layouts for the JSON output. This will fetch information on the Detroit region in JSON format. The j1 format code is used to allow for the use of other layouts for the JSON output.
The result will look something like the following: The result will look something like the following:
```json
{ {
"current_condition": [ "current_condition": [
{ {
@ -334,6 +334,7 @@ The result will look something like the following:
} }
], ],
... ...
```
Most of these values are self-explanatory, aside from `weatherCode`. The `weatherCode` is an enumeration which you can find at either [the WorldWeatherOnline website](https://www.worldweatheronline.com/developer/api/docs/weather-icons.aspx) or [in the wttr.in source code](https://github.com/chubin/wttr.in/blob/master/lib/constants.py). Most of these values are self-explanatory, aside from `weatherCode`. The `weatherCode` is an enumeration which you can find at either [the WorldWeatherOnline website](https://www.worldweatheronline.com/developer/api/docs/weather-icons.aspx) or [in the wttr.in source code](https://github.com/chubin/wttr.in/blob/master/lib/constants.py).
@ -349,7 +350,7 @@ This will fetch information on the Detroit region in Prometheus Metrics format.
A possible configuration for Prometheus could look like this: A possible configuration for Prometheus could look like this:
``` ```yaml
- job_name: 'wttr_in_detroit' - job_name: 'wttr_in_detroit'
static_configs: static_configs:
- targets: ['wttr.in'] - targets: ['wttr.in']
@ -535,6 +536,7 @@ WWO key file: `~/.wwo.key`
Also, you have to specify the key in the `wego` configuration: Also, you have to specify the key in the `wego` configuration:
```json
$ cat ~/.wegorc $ cat ~/.wegorc
{ {
"APIKey": "00XXXXXXXXXXXXXXXXXXXXXXXXXXX", "APIKey": "00XXXXXXXXXXXXXXXXXXXXXXXXXXX",
@ -543,6 +545,7 @@ Also, you have to specify the key in the `wego` configuration:
"Imperial": false, "Imperial": false,
"Lang": "en" "Lang": "en"
} }
```
The `City` parameter in `~/.wegorc` is ignored. The `City` parameter in `~/.wegorc` is ignored.
@ -551,17 +554,20 @@ The `City` parameter in `~/.wegorc` is ignored.
Configure the following environment variables that define the path to the local `wttr.in` Configure the following environment variables that define the path to the local `wttr.in`
installation, to the GeoLite database, and to the `wego` installation. For example: installation, to the GeoLite database, and to the `wego` installation. For example:
```bash
export WTTR_MYDIR="/home/igor/wttr.in" export WTTR_MYDIR="/home/igor/wttr.in"
export WTTR_GEOLITE="/home/igor/wttr.in/GeoLite2-City.mmdb" export WTTR_GEOLITE="/home/igor/wttr.in/GeoLite2-City.mmdb"
export WTTR_WEGO="/home/igor/go/bin/wego" export WTTR_WEGO="/home/igor/go/bin/wego"
export WTTR_LISTEN_HOST="0.0.0.0" export WTTR_LISTEN_HOST="0.0.0.0"
export WTTR_LISTEN_PORT="8002" export WTTR_LISTEN_PORT="8002"
```
### Configure the HTTP-frontend service ### Configure the HTTP-frontend service
It's recommended that you also configure the web server that will be used to access the service: It's recommended that you also configure the web server that will be used to access the service:
```nginx
server { server {
listen [::]:80; listen [::]:80;
server_name wttr.in *.wttr.in; server_name wttr.in *.wttr.in;
@ -590,3 +596,4 @@ It's recommended that you also configure the web server that will be used to acc
expires off; expires off;
} }
} }
```

Loading…
Cancel
Save