Merge branch '0.9'
Conflicts: package.json
This commit is contained in:
commit
b6c68bf288
9 changed files with 53 additions and 58 deletions
4
.babelrc
Normal file
4
.babelrc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"presets": ['react', 'es2015', 'stage-0'],
|
||||
"plugins": ['add-module-exports']
|
||||
}
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
node_modules/
|
||||
public
|
||||
.gatsby-context.js
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { config } from 'config'
|
||||
import { rhythm } from 'utils/typography'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
|
||||
class Bio extends React.Component {
|
||||
render () {
|
||||
|
|
@ -12,7 +12,7 @@ class Bio extends React.Component {
|
|||
}}
|
||||
>
|
||||
<img
|
||||
src={link('/kyle-round-small-pantheon.jpg')}
|
||||
src={prefixLink('/kyle-round-small-pantheon.jpg')}
|
||||
style={{
|
||||
float: 'left',
|
||||
marginRight: rhythm(1/4),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { Link } from 'react-router'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
import { prune, include as includes } from 'underscore.string'
|
||||
import find from 'lodash/find'
|
||||
import { rhythm, fontSizeToMS } from 'utils/typography'
|
||||
|
|
@ -44,7 +44,7 @@ class ReadNext extends React.Component {
|
|||
>
|
||||
<Link
|
||||
to={{
|
||||
pathname: link(nextPost.path),
|
||||
pathname: prefixLink(nextPost.path),
|
||||
query: {
|
||||
readNext: true,
|
||||
},
|
||||
|
|
|
|||
36
html.js
36
html.js
|
|
@ -1,19 +1,20 @@
|
|||
import React from 'react'
|
||||
import DocumentTitle from 'react-document-title'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { TypographyStyle } from 'utils/typography'
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
const TypographyStyle = require('utils/typography').TypographyStyle
|
||||
|
||||
export default class Html extends React.Component {
|
||||
module.exports = React.createClass({
|
||||
displayName: 'HTML',
|
||||
propTypes: {
|
||||
body: React.PropTypes.string,
|
||||
},
|
||||
render () {
|
||||
const { favicon, body } = this.props
|
||||
let title = DocumentTitle.rewind()
|
||||
if (this.props.title) {
|
||||
title = this.props.title
|
||||
}
|
||||
const { body } = this.props
|
||||
const title = DocumentTitle.rewind()
|
||||
|
||||
let cssLink
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
cssLink = <link rel="stylesheet" href={link('/styles.css')} />
|
||||
cssLink = <link rel="stylesheet" href={prefixLink('/styles.css')} />
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
@ -25,24 +26,15 @@ export default class Html extends React.Component {
|
|||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0 maximum-scale=5.0"
|
||||
/>
|
||||
<title>{this.props.title}</title>
|
||||
<link rel="shortcut icon" href={favicon} />
|
||||
<title>{title}</title>
|
||||
<TypographyStyle />
|
||||
{cssLink}
|
||||
</head>
|
||||
<body className="landing-page">
|
||||
<div id="react-mount" dangerouslySetInnerHTML={{ __html: body }} />
|
||||
<script src={link('/bundle.js')} />
|
||||
<script src={prefixLink('/bundle.js')} />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Html.propTypes = {
|
||||
body: React.PropTypes.string,
|
||||
favicon: React.PropTypes.string,
|
||||
title: React.PropTypes.string,
|
||||
}
|
||||
|
||||
Html.defaultProps = { body: '' }
|
||||
},
|
||||
})
|
||||
|
|
|
|||
47
package.json
47
package.json
|
|
@ -1,47 +1,46 @@
|
|||
{
|
||||
"name": "gatsby-starter-blog",
|
||||
"version": "1.0.0",
|
||||
"description": "Starter Gatsby Blog",
|
||||
"main": "n/a",
|
||||
"scripts": {
|
||||
"lint": "./node_modules/.bin/eslint --ext .js,.jsx --ignore-pattern public .",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"dev": "gatsby develop"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gatsbyjs/gatsby-starter-blog.git"
|
||||
},
|
||||
"keywords": [
|
||||
"gatsby"
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/gatsbyjs/gatsby-starter-blog/issues"
|
||||
},
|
||||
"homepage": "https://github.com/gatsbyjs/gatsby-starter-blog#readme",
|
||||
"dependencies": {
|
||||
"babel-plugin-add-module-exports": "^0.1.2",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"babel-preset-react": "^6.5.0",
|
||||
"babel-preset-stage-1": "^6.5.0",
|
||||
"gatsby": "^0.9.0",
|
||||
"history": "^2.0.0",
|
||||
"lodash": "^4.5.0",
|
||||
"moment": "^2.11.2",
|
||||
"react": "^0.14.7",
|
||||
"react-document-title": "^2.0.1",
|
||||
"react-dom": "^0.14.7",
|
||||
"react-responsive-grid": "^0.3.1",
|
||||
"react-router": "^2.0.0",
|
||||
"safe-access": "^0.1.0",
|
||||
"typography": "^0.7.0",
|
||||
"underscore.string": "^3.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-react-transform": "^1.1.1",
|
||||
"babel-preset-react-hmre": "^1.1.1",
|
||||
"eslint": "^2.4.0",
|
||||
"eslint-config-airbnb": "^6.1.0",
|
||||
"eslint-plugin-react": "^4.2.1",
|
||||
"gh-pages": "^0.11.0",
|
||||
"react-transform-catch-errors": "^1.0.0",
|
||||
"react-transform-hmr": "^1.0.0",
|
||||
"redbox-react": "^1.0.1"
|
||||
"gh-pages": "^0.11.0"
|
||||
},
|
||||
"homepage": "https://github.com/gatsbyjs/gatsby-starter-blog#readme",
|
||||
"keywords": [
|
||||
"gatsby"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "n/a",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gatsbyjs/gatsby-starter-blog.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "gatsby develop",
|
||||
"lint": "./node_modules/.bin/eslint --ext .js,.jsx --ignore-pattern public .",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { Link } from 'react-router'
|
||||
import { Container } from 'react-responsive-grid'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
import { rhythm, fontSizeToMS } from 'utils/typography'
|
||||
import { config } from 'config'
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ class Template extends React.Component {
|
|||
render () {
|
||||
const { location, children } = this.props
|
||||
let header
|
||||
if (location.pathname === link('/')) {
|
||||
if (location.pathname === prefixLink('/')) {
|
||||
header = (
|
||||
<h1
|
||||
style={{
|
||||
|
|
@ -25,7 +25,7 @@ class Template extends React.Component {
|
|||
textDecoration: 'none',
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={link('/')}
|
||||
to={prefixLink('/')}
|
||||
>
|
||||
{config.blogTitle}
|
||||
</Link>
|
||||
|
|
@ -39,7 +39,7 @@ class Template extends React.Component {
|
|||
textDecoration: 'none',
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={link('/')}
|
||||
to={prefixLink('/')}
|
||||
>
|
||||
{config.blogTitle}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react'
|
|||
import { Link } from 'react-router'
|
||||
import sortBy from 'lodash/sortBy'
|
||||
import DocumentTitle from 'react-document-title'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
import { rhythm } from 'utils/typography'
|
||||
import access from 'safe-access'
|
||||
import { config } from 'config'
|
||||
|
|
@ -26,7 +26,7 @@ class BlogIndex extends React.Component {
|
|||
marginBottom: rhythm(1/4),
|
||||
}}
|
||||
>
|
||||
<Link to={link(page.path)}>{title}</Link>
|
||||
<Link to={prefixLink(page.path)}>{title}</Link>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ class BlogIndex extends React.Component {
|
|||
return (
|
||||
<DocumentTitle title={config.blogTitle}>
|
||||
<div>
|
||||
<Bio/>
|
||||
<Bio />
|
||||
<ul>
|
||||
{pageLinks}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import React from 'react'
|
||||
import moment from 'moment'
|
||||
import DocumentTitle from 'react-document-title'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import ReadNext from '../components/ReadNext'
|
||||
import { rhythm } from 'utils/typography'
|
||||
import { config } from 'config'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue