Skip to content

Commit

Permalink
Update links in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkAndshark committed Oct 27, 2023
1 parent 756b9b1 commit 8eaf337
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/src/20-run.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage

Martin requires at least one PostgreSQL [connection string](pg-connections.md) or a [tile source file](sources-files.md) as a command-line argument. A PG connection string can also be passed via the `DATABASE_URL` environment variable.
Martin requires at least one PostgreSQL [connection string](31-pg-connections.md) or a [tile source file](34-sources-files.md) as a command-line argument. A PG connection string can also be passed via the `DATABASE_URL` environment variable.

```shell
martin postgresql://postgres@localhost/db
Expand Down
2 changes: 1 addition & 1 deletion docs/src/21-env-vars.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Environment Variables

You can also configure Martin using environment variables, but only if the configuration file is not used. See [configuration section](config-file.md) on how to use environment variables with config files. See also [SSL configuration](pg-connections.md#postgresql-ssl-connections) section below.
You can also configure Martin using environment variables, but only if the configuration file is not used. See [configuration section](30-config-file.md) on how to use environment variables with config files. See also [SSL configuration](31-pg-connections.md#postgresql-ssl-connections) section below.

| Environment var <br/> Config File key | Example | Description |
|------------------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion docs/src/24-run-with-nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You can find an example NGINX configuration file [here](https://github.com/mapli
## Rewriting URLs
If you are running Martin behind NGINX proxy, you may want to rewrite the request URL to properly handle tile URLs in [TileJSON](using.md#source-tilejson).
If you are running Martin behind NGINX proxy, you may want to rewrite the request URL to properly handle tile URLs in [TileJSON](40-using.md#source-tilejson).
```nginx
location ~ /tiles/(?<fwd_path>.*) {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/31-pg-connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Martin supports many of the PostgreSQL connection string settings such as `host`

## PostgreSQL SSL Connections

Martin supports PostgreSQL `sslmode` including `disable`, `prefer`, `require`, `verify-ca` and `verify-full` modes as described in the [PostgreSQL docs](https://www.postgresql.org/docs/current/libpq-ssl.html). Certificates can be provided in the configuration file, or can be set using the same env vars as used for `psql`. When set as env vars, they apply to all PostgreSQL connections. See [environment vars](env-vars.md) section for more details.
Martin supports PostgreSQL `sslmode` including `disable`, `prefer`, `require`, `verify-ca` and `verify-full` modes as described in the [PostgreSQL docs](https://www.postgresql.org/docs/current/libpq-ssl.html). Certificates can be provided in the configuration file, or can be set using the same env vars as used for `psql`. When set as env vars, they apply to all PostgreSQL connections. See [environment vars](21-env-vars.md) section for more details.

By default, `sslmode` is set to `prefer` which means that SSL is used if the server supports it, but the connection is not aborted if the server does not support it. This is the default behavior of `psql` and is the most compatible option. Use the `sslmode` param to set a different `sslmode`, e.g. `postgresql://user:password@host/db?sslmode=require`.
2 changes: 1 addition & 1 deletion docs/src/32-sources-pg-tables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Table Sources

Table Source is a database table which can be used to query [vector tiles](https://github.com/mapbox/vector-tile-spec). If a [PostgreSQL connection string](pg-connections.md) is given, Martin will publish all tables as data sources if they have at least one geometry column. If geometry column SRID is 0, a default SRID must be set, or else that geo-column/table will be ignored. All non-geometry table columns will be published as vector tile feature tags (properties).
Table Source is a database table which can be used to query [vector tiles](https://github.com/mapbox/vector-tile-spec). If a [PostgreSQL connection string](31-pg-connections.md) is given, Martin will publish all tables as data sources if they have at least one geometry column. If geometry column SRID is 0, a default SRID must be set, or else that geo-column/table will be ignored. All non-geometry table columns will be published as vector tile feature tags (properties).

# Modifying Tilejson

Expand Down
2 changes: 1 addition & 1 deletion docs/src/34-sources-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Martin can serve any type of tiles from [PMTile](https://protomaps.com/blog/pmti
martin /path/to/mbtiles/file.mbtiles /path/to/directory
```

You may also want to generate a [config file](config-file.md) using the `--save-config my-config.yaml`, and later edit it and use it with `--config my-config.yaml` option.
You may also want to generate a [config file](30-config-file.md) using the `--save-config my-config.yaml`, and later edit it and use it with `--config my-config.yaml` option.
2 changes: 1 addition & 1 deletion docs/src/36-sources-sprites.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ martin --sprite /path/to/sprite_a --sprite /path/to/other/sprite_b

### Configuring with Config File

A sprite directory can be configured from the config file with the `sprite` key, similar to how [MBTiles and PMTiles](config-file.md) are configured.
A sprite directory can be configured from the config file with the `sprite` key, similar to how [MBTiles and PMTiles](30-config-file.md) are configured.

```yaml
# Sprite configuration
Expand Down
4 changes: 2 additions & 2 deletions docs/src/40-using.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Martin data is available via the HTTP `GET` endpoints:
| `/{sourceID}` | [Source TileJSON](#source-tilejson) |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/{source1},...,{sourceN}` | [Composite Source TileJSON](#source-tilejson) |
| `/{source1},...,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](sources-composite.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](sources-sprites.md) |
| `/{source1},...,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) |
| `/health` | Martin server health check: returns 200 `OK` |

## Duplicate Source ID
Expand Down
4 changes: 2 additions & 2 deletions docs/src/41-using-with-maplibre.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[MapLibre](https://maplibre.org/projects/maplibre-gl-js/) is an Open-source JavaScript library for showing maps on a website. MapLibre can accept [MVT vector tiles](https://github.com/mapbox/vector-tile-spec) generated by Martin, and applies [a style](https://maplibre.org/maplibre-gl-js-docs/style-spec/) to them to draw a map using Web GL.

You can add a layer to the map and specify Martin [TileJSON](https://github.com/mapbox/tilejson-spec) endpoint as a vector source URL. You should also specify a `source-layer` property. For [Table Sources](sources-pg-tables.md) it is `{table_name}` by default.
You can add a layer to the map and specify Martin [TileJSON](https://github.com/mapbox/tilejson-spec) endpoint as a vector source URL. You should also specify a `source-layer` property. For [Table Sources](32-sources-pg-tables.md) it is `{table_name}` by default.


```js
Expand Down Expand Up @@ -36,7 +36,7 @@ map.addLayer({
});
```

You can also combine multiple sources into one source with [Composite Sources](sources-composite.md). Each source in a composite source can be accessed with its `{source_name}` as a `source-layer` property.
You can also combine multiple sources into one source with [Composite Sources](35-sources-composite.md). Each source in a composite source can be accessed with its `{source_name}` as a `source-layer` property.

```js
map.addSource('points', {
Expand Down
4 changes: 2 additions & 2 deletions docs/src/44-using-with-mapbox.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Using with Mapbox

[Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) is a JavaScript library for interactive, customizable vector maps on the web. Mapbox GL JS v1.x was open source, and it was forked as MapLibre, so using Martin with Mapbox is similar to MapLibre described [here](using-with-maplibre.md). Mapbox GL JS can accept [MVT vector tiles](https://github.com/mapbox/vector-tile-spec) generated by Martin, and applies [a style](https://docs.mapbox.com/mapbox-gl-js/style-spec/) to them to draw a map using Web GL.
[Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) is a JavaScript library for interactive, customizable vector maps on the web. Mapbox GL JS v1.x was open source, and it was forked as MapLibre, so using Martin with Mapbox is similar to MapLibre described [here](41-using-with-maplibre.md). Mapbox GL JS can accept [MVT vector tiles](https://github.com/mapbox/vector-tile-spec) generated by Martin, and applies [a style](https://docs.mapbox.com/mapbox-gl-js/style-spec/) to them to draw a map using Web GL.

You can add a layer to the map and specify Martin TileJSON endpoint as a vector source URL. You should also specify a `source-layer` property. For [Table Sources](sources-pg-tables.md) it is `{table_name}` by default.
You can add a layer to the map and specify Martin TileJSON endpoint as a vector source URL. You should also specify a `source-layer` property. For [Table Sources](32-sources-pg-tables.md) it is `{table_name}` by default.

```js
map.addLayer({
Expand Down

0 comments on commit 8eaf337

Please sign in to comment.