You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Contributing
1
+
# 🛠️ Contributing
2
2
3
3
Contributions are very welcome, especially new spots and price corrections.
4
4
@@ -8,9 +8,9 @@ Add yours to [`alpine-mtb-map.kml`](alpine-mtb-map.kml) following [Adding a poin
8
8
vp i && vp dev
9
9
```
10
10
11
-
Then open a pull request. The pre-commit hook regenerates the GPXand GeoJSON, so you only ever touch the KML. See [Development](#development) for the rest.
11
+
Then open a pull request. The KML is the only data file in the repository - the GPX, GeoJSON and KMZ are generated at release time, so you only ever touch the KML. See [Development](#development) for the rest.
12
12
13
-
## What is on the map
13
+
## 🗺️ What is on the map
14
14
15
15
Each main pin carries, in its description: what the trails are like, what it costs to get up, its open and closed dates, and an Access table giving the travel time from each origin.
16
16
@@ -63,7 +63,7 @@ Seasons that run across New Year work the same way: the four southern-hemisphere
63
63
64
64
When the shared date is **Any**, weather uses today before 16:00 and tomorrow from 16:00 onward. Weather is enabled by default and can be turned off with the cloud-and-rain button left of the location button. A rain icon appears inside a spot's original coloured dot when at least 1 mm of precipitation or a 50% precipitation probability is forecast for the effective weather date, or at least 5 mm fell the day before. Clicking a spot shows that day, the three days before it and the three days after it. Dates outside Open-Meteo's available range show a clear unavailable message. Forecasts are cached in the browser for six hours to limit Open-Meteo requests.
65
65
66
-
## Adding a point
66
+
## 📍 Adding a point
67
67
68
68
Everything lives in `alpine-mtb-map.kml`. It is plain XML, so edit it in any text editor - no build step is needed for the data itself. Paste a new `<Placemark>` anywhere between `<Document>` and `</Document>`.
69
69
@@ -252,17 +252,17 @@ vp dev
252
252
253
253
Open the printed URL. If the map is blank, the KML is malformed and the browser console will say where. Then commit the KML - it is the only data file in the repository, and the GPX, GeoJSON and KMZ are generated at release time.
254
254
255
-
## Other formats
255
+
## 🗂️ Other formats
256
256
257
257
```bash
258
-
vp run convert
258
+
vp run export
259
259
```
260
260
261
261
Regenerates `alpine-mtb-map.geojson`, `alpine-mtb-map.gpx` and `alpine-mtb-map.kmz` from `alpine-mtb-map.kml`. Points become GPX waypoints and GeoJSON `Point` features, trails become GPX tracks and `LineString` features; HTML descriptions are flattened to plain text for GPX. The `kind` (`bike-park` / `natural` / `no-lift` / `minor` / `trail`) plus every `<ExtendedData>` facet (`spot`, `tags`, `open_from`, `closed_from`, `price_day`, `price_season`) is carried into GeoJSON as a property.
262
262
263
-
**Never edit the generated files by hand** - the KML is the source of truth and `vp run convert` overwrites them. The three exports are gitignored: [releasing](#releasing) rebuilds them and attaches them to the GitHub release, which is where the download links point.
263
+
**Never edit the generated files by hand** - the KML is the source of truth and `vp run export` overwrites them. The three exports are gitignored: [releasing](#releasing) rebuilds them and attaches them to the GitHub release, which is where the download links point.
264
264
265
-
## Development
265
+
## 🔧 Development
266
266
267
267
The toolchain is [Vite+](https://viteplus.dev/) (`vp`):
268
268
@@ -275,30 +275,30 @@ vp dev # local dev server
275
275
vp build # static site into dist/
276
276
vp preview # serve the built site - use this to test the PWA, not dev
277
277
vp check # format + lint (add --fix to apply)
278
-
vp run convert # regenerate the GPX, GeoJSON and KMZ exports
278
+
vp run export # regenerate the GPX, GeoJSON and KMZ exports
279
279
vp run icons # regenerate the PWA icons from public/icon.png
280
280
vp run ready # everything CI runs, before you open a pull request
281
281
vp run release # cut a release (maintainers)
282
282
```
283
283
284
284
> Everything the tooling needs lives in [`vite.config.js`](vite.config.js).
285
285
286
-
[`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) runs `vp check` and `vp run convert`, which validates the KML: the conversion refuses a spot that is missing a required tag axis. On `main` it then builds and publishes to GitHub Pages; pull requests get the checks only.
286
+
[`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) runs `vp check` and `vp run export`, which validates the KML: the conversion refuses a spot that is missing a required tag axis. On `main` it then builds and publishes to GitHub Pages; pull requests get the checks only.
287
287
288
-
## Releasing
288
+
## 🏷️ Releasing
289
289
290
-
Maintainers only, and it all happens locally - there is no release workflow.
290
+
Maintainers only. Nothing on your machine needs a GitHub token: the local half only writes to git.
291
291
292
292
```bash
293
-
GITHUB_TOKEN=... vp run release
293
+
vp run release
294
294
```
295
295
296
-
`release` [depends on](vite.config.js) `convert`, so the exports are always rebuilt from the KML being released before anything is uploaded. Then [release-it](https://github.com/release-it/release-it) prompts for the new version and takes it from there: bump `package.json`, rewrite`CHANGELOG.md`, commit, tag, push, and create the GitHub release with the KML, KMZ, GPX and GeoJSON attached. Add `--dry-run` to see every step without performing any of them, or pass a version to skip the prompt:
296
+
[release-it](https://github.com/release-it/release-it) prompts for the new version, then bumps `package.json`, rewrites`CHANGELOG.md`with git-cliff, commits, tags `vX.Y.Z`and pushes. Add `--dry-run` to see every step without performing any of them, or pass a version to skip the prompt:
297
297
298
298
```bash
299
299
vp run release minor --dry-run
300
300
```
301
301
302
-
The token needs `repo` scope. Both tools use it: release-it to create the release, git-cliff to look up pull request titles and authors.
302
+
Pushing the tag triggers [`.github/workflows/release.yml`](.github/workflows/release.yml), which does the half that needs credentials, using the workflow's own token: rebuild the exports from the tagged KML with `vp run export`, render the notes, and create the GitHub release with the KML, KMZ, GPX and GeoJSON attached. So the assets can never drift from the data they were tagged with, and the download links keep resolving to the newest release.
303
303
304
-
The notes come from [git-cliff](https://git-cliff.org/) via [`cliff.toml`](cliff.toml), configured to reproduce GitHub's own format - a flat "What's Changed" list crediting each author, then a "New Contributors" section for anyone whose first pull request this is. That last part is only correct because `cliff.toml` names the GitHub remote; first-time status comes from the API, not from the git history.
304
+
The notes come from [git-cliff](https://git-cliff.org/) via [`cliff.toml`](cliff.toml), configured to reproduce GitHub's own format - a flat "What's Changed" list crediting each author, then a "New Contributors" section for anyone whose first pull request this is. That last part is only correct because `cliff.toml` names the GitHub remote: first-time status comes from the API, not from the git history. The same config writes `CHANGELOG.md`, so the file and the release notes always say the same thing.
<p>A curated open map for gravity mountain biking. Discover top downhill bike parks, enduro trails, and freeride spots worldwide.</p>
5
+
[](https://github.com/vemonet/alpine-mtb-map/actions/workflows/deploy.yml)[](https://github.com/vemonet/alpine-mtb-map/actions/workflows/release.yml)
0 commit comments