waymarkedtrails / waymarkedtrails-website

Website code for https://waymarkedtrails.org
GNU General Public License v3.0
11 stars 3 forks source link

Waymarked Trails - Website

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.

Installation

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.

Development

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

Configuration

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.

License

The source code is available under GPLv3. See COPYING for more information.