Skip to content

Commit

Permalink
Use helmet for basic head usage.
Browse files Browse the repository at this point in the history
Since we don't have SSR. This is only good for Google.
  • Loading branch information
arunoda committed Aug 31, 2016
1 parent 72cfdc0 commit 110b120
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/Docs/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import Helmet from 'react-helmet';
import Header from '../Homepage/Header';
import Container from './Container';
import Footer from '../Homepage/Footer';
Expand All @@ -7,8 +8,12 @@ import './style.css';
class Docs extends React.Component {
render() {
const { sections, selectedItem, selectedSectionId, selectedItemId } = this.props;
const headTitle = `${selectedItem.title} - React Storybook Docs`;
return (
<div className="container">
<Helmet
title={headTitle}
/>
<Header currentSection="docs"/>
<Container
sections={ sections }
Expand Down
15 changes: 15 additions & 0 deletions src/components/Homepage/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import Helmet from 'react-helmet';
import './style.css';
import Header from './Header';
import Heading from './Heading';
Expand Down Expand Up @@ -37,8 +38,22 @@ const featuredStorybooks = [
},
];

const META = [
{
name: "description",
content: `
React Storybook is a UI development environment for your React components.
With it, you can visualize different states of your UI components and develop them interactively.
`
}
];

const Homepage = () => (
<div className="container">
<Helmet
title="Storybook - UI dev environment you'll love to use"
meta={META}
/>
<Header currentSection="home"/>
<Heading />
<Demo />
Expand Down
2 changes: 1 addition & 1 deletion src/docs/addons/introduction.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const images = {

export default {
id: "introduction",
title: "Introduction",
title: "Intro to Addons",
content: stripIndent`
By default, Storybook comes with a way to list stories and visualize them. Addons implement extra features for Storybooks to make them more useful.
Expand Down

0 comments on commit 110b120

Please sign in to comment.