Waymarked Trails is a website that shows recreational routes from OpenStreetMap and lets you inspect the routes and selected details.
This repository contains the website frontend. To run the site you also need the backend and the API.
The code is written in Javascript using Svelte using rollup 3 and yarn2 for package management. Note that Rollup3 requires Node 14.18+ to run.
If you only yarn1 ('classic yarn') available, you can bootstrap yourself into using the latest yarn2 with:
yarn set version berry
yarn set version stable
To build the site run:
yarn install
yarn build
The website is then available in the public/
directory.
If you want to run the site for development run:
yarn dev
The development version will look at http://localhost:8080
for the API. You can also use environment variables
to tell the site where it lives and where it can find the API and the tiles. For instance you can force it to run
against the official API:
WMT_API_URL='https://hiking.waymarkedtrails.org/api/v1' WMT_MEDIA_URL=https://static.waymarkedtrails.org/ yarn dev
You can set a number of environment variables to change the URLs that the
website uses. In the following, {theme}
is substituted at run time with
hiking
, mtb
, or other equivalent values.
waymarkedtrails.org
){theme}.<BASE_URL>/api/v1
; development default: http://localhost:8080/v1
)static.<BASE_URL>/
; development default: empty)static.<BASE_URL>/symbol
; development default: <API_URL>/symbols/id
)tiles.<BASE_URL>/{theme}
){theme}.<BASE_URL>
)The source code is available under GPLv3. See COPYING for more information.