Skip to content

Commit d4bb045

Browse files
committed
Improve docs (translation tool, URL rewriting #355)
1 parent 659873b commit d4bb045

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ npm run build -- --catalogUrl="https://earth-search.aws.element84.com/v1/"
6868
This will only work on the root path of your domain though. If you'd like to publish in a sub-folder,
6969
you can use the [`pathPrefix`](docs/options.md#pathprefix) option.
7070

71-
After building, `dist/` will contain all assets necessary to
71+
After building, `dist/` will contain all assets necessary
7272
host the browser. These can be manually copied to your web host of choice.
73+
**Important:** If `historyMode` is set to `history` (which is the default value), you'll need to add
74+
an additional configuration file for URL rewriting.
75+
Please see the [`historyMode`](docs/options.md#historymode) option for details.
7376

7477
You can customize STAC Browser, too. See the options and theming details below.
7578
If not stated otherwise, all options can either be specified via CLI, ENV variables or in the [config file](config.js).
@@ -113,6 +116,8 @@ The following languages are currently supported:
113116
- it: Italian (Italy, Switzerland)
114117
- ro: Romanian
115118

119+
We manage the translations in Crowdin, please see <https://crowdin.com/project/stac-browser/> for details.
120+
116121
To add your own language, please follow the guide below: [Adding a new langauge](#adding-a-new-language)
117122

118123
#### Custom phrases
@@ -282,6 +287,7 @@ You can also use one of the existing languages and provide an alternate version
282287
- Adapt the `datepicker.js` and `duration.js` files to import the existing definitions from their corresponding external packages, but you could also define the specifics yourself.
283288
- Check that your translation works by running the development server (`npm start`) and navigating to the STAC Browser instance in your browser (usually `http://localhost:8080`).
284289
- Once completed, please open a pull request and we'll get back to you as soon as possible.
290+
- After merging the PR for the first time, we'll add you to our translation management tool Crowdin: <https://crowdin.com/project/stac-browser/>. Please get in touch to get your invite!
285291

286292
# Sponsors
287293

docs/options.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,24 @@ Validation is automatically disabled in the following cases:
129129

130130
***build-only option***
131131

132-
STAC Browser defaults to using [HTML5 History Mode](https://v3.router.vuejs.org/guide/essentials/history-mode.html#html5-history-mode),
133-
which can cause problems on certain web hosts. To use _hash mode_, set `--historyMode=hash` when running or building.
134-
This will be compatible with S3, stock Apache, etc.
132+
### `history`
133+
STAC Browser defaults to _history mode_ (value `history` in the config file), which is based on
134+
[HTML5 History Mode](https://v3.router.vuejs.org/guide/essentials/history-mode.html#html5-history-mode).
135+
It gives the best experience and allows search engines to better crawl STAC Browser so that it can be found in search engines.
136+
137+
**History mode requires that you enable custom URL rewriting rules on your host/server**, otherwise people can not reload pages
138+
or share URLs without getting a "page not found" error (404).
139+
The following link explains the details and provides examples for various common server software:
140+
**<https://v3.router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations>**
141+
142+
Please note that you can't host any other files in the folder that STAC Browser is in as the URL rewriting
143+
will redirect all requests to these (sub)-folders and included files to STAC Browser.
144+
This also excludes hosting your STAC catalog in the STAC Browser (sub-)folders.
145+
146+
### `hash`
147+
If your host/server doesn't support URL rewriting or you experience other related problems, you can enable _hash mode_.
148+
Either set this option to `hash` in the config file or append `--historyMode=hash` when running or building.
149+
Known hosts that require hash mode are Amazon S3 and GitHub Pages.
135150

136151
## pathPrefix
137152

0 commit comments

Comments
 (0)