ci: fix docs deploy-preview redirect (#878)

* docs: filling in missing readme sections

* ci: fix docs deploy-preview redirect
This commit is contained in:
Danny Brown 2019-09-06 15:09:20 -04:00 committed by GitHub
parent d0d75987f7
commit 16b063a504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 21 deletions

6
.netlify/www/_redirects Normal file
View File

@ -0,0 +1,6 @@
# Specific to our deploy-preview
# Our docs are published using CircleCI + GitBook
# Confgure redirects using netlify.toml
# PWA Demo
/pwa/* /pwa/index.html 200

View File

@ -119,7 +119,8 @@ window.config = {
};
```
- Install the viewer: `window.OHIFStandaloneViewer.installViewer(window.config);`
- Install the viewer:
`window.OHIFStandaloneViewer.installViewer(window.config);`
This exact setup is demonstrated in this
[CodeSandbox](https://codesandbox.io/s/ohif-viewer-script-tag-usage-c4u4t) and

3
docs/_redirects Normal file
View File

@ -0,0 +1,3 @@
# Netlify redirects
# SPA rules for our docs
/* /index.html 200

View File

@ -3,7 +3,7 @@
# TOML Reference:
# https://www.netlify.com/docs/netlify-toml-reference/
#
# We use Netlify for deploy previews and deploy previews only.
# We use Netlify for deploy previews and for publishing docs (gh-pages branch).
# https://viewer.ohif.org is created using a different process that is
# managed by CircleCI and deployed to our Google Hosting
#
@ -40,25 +40,6 @@
publish = ".netlify/www/"
command = "yarn config set workspaces-experimental true && chmod +x .netlify/build-deploy-preview.sh && .netlify/build-deploy-preview.sh"
# Redirects and headers are GLOBAL for all builds they do not get scoped to
# contexts no matter where you define them in the file.
# For context-specific rules, use _headers or _redirects files, which are
# PER-DEPLOY.
# The following redirect is intended for use with most SPAs that handle
# routing internally.
# By default, redirects won't be applied if there's a file with the same
# path as the one defined in the `from` property. Setting `force` to `true`
# will make the redirect rule take precedence over any existing files.
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[redirects]]
from = "/pwa/*"
to = "/pwa/index.html"
status = 200
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"