Skip to content

Commit

Permalink
Initial commit of new default starter
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Jul 21, 2015
1 parent a74470a commit 6feb491
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app.coffee
@@ -0,0 +1,9 @@
exports.loadContext = (callback) ->
context = require.context './pages', true
if module.hot
module.hot.accept(context.id, ->
context = require.context './pages', true
callback context
)

callback context
1 change: 1 addition & 0 deletions config.toml
@@ -0,0 +1 @@
siteTitle="Gatsby Starter Site"
29 changes: 29 additions & 0 deletions html.cjsx
@@ -0,0 +1,29 @@
React = require 'react'
Typography = require 'typography'
DocumentTitle = require 'react-document-title'

typography = new Typography()
{TypographyStyle} = typography

module.exports = React.createClass
getDefaultProps: ->
body: ""

render: ->
title = DocumentTitle.rewind()
if @props.title then title = @props.title

<html lang="en">
<head>
<meta charSet="utf-8"/>
<meta httpEquiv="X-UA-Compatible" content="IE=edge"/>
<meta name='viewport' content='width=device-width, initial-scale=1.0 maximum-scale=1.0'/>
<title>{title}</title>
<link rel="shortcut icon" href={@props.favicon}/>
<TypographyStyle/>
</head>
<body>
<div id="react-mount" dangerouslySetInnerHTML={{__html: @props.body}} />
<script src="/bundle.js"/>
</body>
</html>
21 changes: 21 additions & 0 deletions package.json
@@ -0,0 +1,21 @@
{
"name": "gatsby-starter-default",
"version": "1.0.0",
"description": "Gatsby default starter",
"main": "n/a",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"gatsby"
],
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"license": "MIT",
"dependencies": {
"react": "^0.13.3",
"react-document-title": "^1.0.2",
"react-responsive-grid": "^0.2.0",
"react-router": "^0.13.3",
"typography": "^0.3.6"
}
}
23 changes: 23 additions & 0 deletions pages/_template.cjsx
@@ -0,0 +1,23 @@
React = require 'react'
Router = require 'react-router'
{RouteHandler, Link, State} = Router
{Container, Grid, Breakpoint, Span} = require 'react-responsive-grid'
Typography = require 'typography'

typography = Typography()
{rhythm, fontSizeToPx} = typography

module.exports = React.createClass
mixins: [State]
render: ->
<div>
<Container
style={{
maxWidth: 960
padding: "#{rhythm(1)} #{rhythm(1/2)}"
paddingTop: 0
}}
>
<RouteHandler typography={typography} {...@props}/>
</Container>
</div>
2 changes: 2 additions & 0 deletions pages/index.md
@@ -0,0 +1,2 @@
# Hi people
Welcome to your new Gatsby site.

0 comments on commit 6feb491

Please sign in to comment.