From a17c8d19e5a797d6c3169e4d2e0f5c49cdbe55c8 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Fri, 28 Dec 2018 21:29:05 +0100 Subject: [PATCH] fix(url): improve docs url --- _redirects | 6 ++++-- package.json | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_redirects b/_redirects index d0f3eaa..0865c16 100644 --- a/_redirects +++ b/_redirects @@ -1,8 +1,10 @@ # redirect to docs -/ /docs 200! +/ /docs 301 # redirect netlify function path -/* /.netlify/functions/:splat 200! +/* /.netlify/functions/:splat 200 + +/l/* /.netlify/functions/:splat 200! /latest/* /.netlify/functions/:splat 200! /v2/* /.netlify/functions/:splat 200! \ No newline at end of file diff --git a/package.json b/package.json index 35d8649..2143625 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,10 @@ "dump-version": "git tag \"$(node ./scripts/dump-version.js)\"", "start": "netlify-lambda serve src/apis", "build": "netlify-lambda build src/apis", - "docs:compile": "mkdir docs 2>/dev/null; aglio --theme-variables slate -i src/docs/index.apib -o docs/docs.html && cp _redirects docs/_redirects && cp 404.html docs/404.html", + "docs:compile": "mkdir docs 2>/dev/null; aglio --theme-variables slate -i src/docs/index.apib -o docs/docs.html && cp _redirects docs/_redirects", "docs:start": "aglio --theme-variables slate -i src/docs/index.apib -o docs/docs.html -s", "prepush": "yarn dump-version", "push": "git push && git push --tag", - "deploy": "yarn docs:compile && yarn build" + "deploy": "yarn docs:compile && yarn build && ls -la docs" } }