docs: update docs on exporting (#1290)

[skip ci]
This commit is contained in:
Nolan Lawson 2019-06-22 11:32:17 -07:00 committed by GitHub
parent f4177bd0bb
commit 10c7023591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,15 +83,15 @@ To keep your version of Pinafore up to date, you can use `git` to check out the
### Exporting ### Exporting
You can export Pinafore as a static site. Run: Pinafore is a static site. When you run `yarn build`, static files will be
written to `__sapper__/export`.
yarn run export In theory you could host these static files yourself (e.g. using nginx or Apache), but
it's not recommended, because:
Static files will be written to `__sapper__/export`. - You'd have to set the [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) headers yourself,
which are an important security feature.
Note that this is not the recommended method, because - Some routes are dynamic and need to be routed to the correct static file.
[CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) headers are not
currently supported for the exported version.
## Developing and testing ## Developing and testing