Skip to content

Commit

Permalink
Make the "Get Started" link point to a "Getting Started" doc (#475)
Browse files Browse the repository at this point in the history
This just duplicates the "Getting Started" section from the homepage as the
body of /docs.  It's a simpler intro.
  • Loading branch information
gigabo authored Jul 30, 2016
1 parent c24d08c commit 9afbb47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/react-server-website/pages/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'))
Expand Down

0 comments on commit 9afbb47

Please sign in to comment.