From 9afbb47ef10f391b718cb9228c6d6f1f43515afd Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Fri, 29 Jul 2016 17:04:34 -0700 Subject: [PATCH] Make the "Get Started" link point to a "Getting Started" doc (#475) This just duplicates the "Getting Started" section from the homepage as the body of /docs. It's a simpler intro. --- packages/react-server-website/pages/docs.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/react-server-website/pages/docs.js b/packages/react-server-website/pages/docs.js index bcc5dd9f1..7d4ce03c8 100644 --- a/packages/react-server-website/pages/docs.js +++ b/packages/react-server-website/pages/docs.js @@ -7,12 +7,15 @@ import DocTitle from "../components/page-title"; import DocBody from "../components/doc-body"; import DocContents from "../components/doc-contents"; import DataBundleCacheManager from '../middleware/DataBundleCache'; +import GetStartedSection from '../components/content/HomeGetStartedSection.md'; import "./docs.less"; export default class DocsPage { handleRoute(next) { - const path = this.getRequest().getRouteParams().path || "README"; - this.bodyPromise = Repo.getFile(join("/docs", `${path}.md`)); + const {path} = this.getRequest().getRouteParams(); + this.bodyPromise = path + ?Repo.getFile(join("/docs", `${path}.md`)) + :Promise.resolve({text: GetStartedSection}) this.contentsPromise = Repo.getContents() .then(DocContents.setResponse) .then(DataBundleCacheManager.addContents.bind({}, '/docs/'))