@@ -33,15 +33,6 @@ npm install
33
33
CATALOG_URL=http://path/to/catalog.json npm start -- --open
34
34
```
35
35
36
- Validation will happen against the version of stac defined in the Catalog, Collection or Item
37
- ` stac_version ` property. If you are running against an older STAC version where the objects
38
- do not contain a ` stac_version ` property, you'll need to set the ` STAC_VERSION ` environment
39
- variable e.g.:
40
-
41
- ```
42
- STAC_VERSION=0.6.0 CATALOG_URL=http://path/to/catalog.json npm start -- --open
43
- ```
44
-
45
36
STAC Browser defaults to using [ HTML5 History
46
37
Mode] ( https://router.vuejs.org/guide/essentials/history-mode.html ) , which can
47
38
cause problems on certain web hosts. To use _ hash mode_ , set
@@ -96,65 +87,14 @@ TILE_SOURCE_TEMPLATE=http://localhost:8000/cog/tiles/{z}/{x}/{y}?url={ASSET_HREF
96
87
CATALOG_URL=http://path/to/catalog.json npm run build
97
88
```
98
89
99
- ## Prerendering
100
-
101
- STAC Browser includes the ability to prerender catalog pages to HTML using
102
- [ Puppeteer] ( https://github.com/GoogleChrome/puppeteer ) to control a headless
103
- Chromium instance. This facilitates search engine indexing, as metadata and
104
- content will be present in the HTML prior to loading external catalogs.
105
-
106
- To prerender, run:
107
-
108
- ``` bash
109
- bin/prerender.js -p < public URL> < catalog URL>
110
- ```
111
-
112
- ` dist/ ` will contain all assets necessary to host the browser.
113
-
114
- After publishing (see below), the generated sitemap can be submitted for
115
- crawling by Google:
116
-
117
- ``` bash
118
- curl http://www.google.com/ping? sitemap=https://planet.stac.cloud/sitemap.txt
119
- ```
90
+ If you'd like to publish the STAC Browser instance not on the root path of your domain,
91
+ you can set the option [ ` publicPath ` ] ( https://cli.vuejs.org/config/#publicpath ) in the file vue.config.js.
120
92
121
93
## Publishing
122
94
123
- After building or prerendering , ` dist/ ` will contain all assets necessary to
95
+ After building, ` dist/ ` will contain all assets necessary to
124
96
host the browser. These can be manually copied to your web host of choice.
125
97
126
- Alternately, you can publish to [ Netlify] ( https://www.netlify.com/ ) for free.
127
-
128
- First, create a new site:
129
-
130
- ``` bash
131
- node_modules/.bin/netlify init
132
- ```
133
-
134
- The generated site id will be used as ` NETLIFY_SITE_ID ` in your environment.
135
-
136
- To deploy without prerendering:
137
-
138
- ``` bash
139
- CATALOG_URL=... NETLIFY_SITE_ID=... npm run deploy
140
- ```
141
-
142
- To deploy a prerendered version you'll also need the target URL:
143
-
144
- ``` bash
145
- CATALOG_URL=... NETLIFY_SITE_ID=... STAC_URL=... npm run deploy-prerendered
146
- ```
147
-
148
- ## Crawling
149
-
150
- To facilitate prerendering, STAC Browser includes functionality for crawling
151
- catalogs in ` bin/crawl.js ` .
152
-
153
- As-is, this will just output the type and URL for all entries in the catalog.
154
- In real-world use, you'll probably want to use it as an example and write
155
- custom JavaScript to process each entry (similar to how ` bin/prerender.js `
156
- uses it).
157
-
158
98
## Contributing
159
99
160
100
STAC Browser uses [ Vue] ( https://vuejs.org/ ) .
@@ -163,6 +103,4 @@ Catalogs and collections are rendered using the
163
103
[ ` Catalog ` ] ( src/components/Catalog.vue ) component in
164
104
[ ` src/components/ ` ] ( src/components/ ) . Items are rendered using the
165
105
[ ` Item ` ] ( src/components/Item.vue ) component. Common functionality across both
166
- components exists in [ ` src/components/common.js ` ] ( src/components/common.js ) .
167
- Mappings between property keys (e.g. ` eo:platform ` ) are defined in
168
- [ ` src/properties.js ` ] ( src/properties.js ) .
106
+ components exists in [ ` src/components/common.js ` ] ( src/components/common.js ) .
0 commit comments