forked from gatsbyjs/gatsby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 29/refactor gatsby starter default (gatsbyjs#31)
* Delete TravisCI config * Remove gh-pages dependency and add prettier * Change double quotes to single quotes in src files * Update packages, refactor classes to stateless components and update readme * Removed package-lock as yarn is the default for this project * Readded travis yml * Remove travis config * Remove Eslint and Editorconfig * Remove html.js as it's already imported implicitely * Update lock file
- Loading branch information
1 parent
bdbd02f
commit 1f1b01d
Showing
11 changed files
with
401 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,7 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# Project dependencies | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
.gatsby-context.js | ||
.sass-cache/ | ||
public/ | ||
.cache/ | ||
# Build directory | ||
public/ | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
# gatsby-starter-default | ||
The default Gatsby starter | ||
|
||
For an overview of the project structure please refer to the [Gatsby documentation - Building with Components](https://www.gatsbyjs.org/docs/building-with-components/) | ||
|
||
Install this starter (assuming Gatsby is installed) by running from your CLI: | ||
``` | ||
gatsby new gatsby-example-site | ||
``` | ||
|
||
## Deploy | ||
|
||
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,66 @@ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
import Link from "gatsby-link" | ||
import Helmet from "react-helmet" | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import Link from 'gatsby-link' | ||
import Helmet from 'react-helmet' | ||
|
||
import "../css/typography.css" | ||
import './index.css' | ||
|
||
export default class Template extends React.Component { | ||
static propTypes = { | ||
children: PropTypes.func, | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Helmet | ||
title="Gatsby Default Starter" | ||
meta={[ | ||
{ name: "description", content: "Sample" }, | ||
{ name: "keywords", content: "sample, something" }, | ||
]} | ||
/> | ||
<div | ||
style={{ | ||
background: `rebeccapurple`, | ||
marginBottom: `1.45rem`, | ||
}} | ||
> | ||
<div | ||
style={{ | ||
margin: `0 auto`, | ||
maxWidth: 960, | ||
padding: `1.45rem 1.0875rem`, | ||
}} | ||
> | ||
<h1 style={{ margin: 0 }}> | ||
<Link | ||
to="/" | ||
style={{ | ||
color: "white", | ||
textDecoration: "none", | ||
}} | ||
> | ||
Gatsby | ||
</Link> | ||
</h1> | ||
</div> | ||
</div> | ||
<div | ||
const Header = () => ( | ||
<div | ||
style={{ | ||
background: 'rebeccapurple', | ||
marginBottom: '1.45rem', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
margin: '0 auto', | ||
maxWidth: 960, | ||
padding: '1.45rem 1.0875rem', | ||
}} | ||
> | ||
<h1 style={{ margin: 0 }}> | ||
<Link | ||
to="/" | ||
style={{ | ||
margin: `0 auto`, | ||
maxWidth: 960, | ||
padding: `0px 1.0875rem 1.45rem`, | ||
paddingTop: 0, | ||
color: 'white', | ||
textDecoration: 'none', | ||
}} | ||
> | ||
{this.props.children()} | ||
</div> | ||
Gatsby | ||
</Link> | ||
</h1> | ||
</div> | ||
</div> | ||
) | ||
|
||
const TemplateWrapper = ({ | ||
children | ||
}) => ( | ||
<div> | ||
<Helmet | ||
title="Gatsby Default Starter" | ||
meta={[ | ||
{ name: 'description', content: 'Sample' }, | ||
{ name: 'keywords', content: 'sample, something' }, | ||
]} | ||
/> | ||
<Header /> | ||
<div | ||
style={{ | ||
margin: '0 auto', | ||
maxWidth: 960, | ||
padding: '0px 1.0875rem 1.45rem', | ||
paddingTop: 0, | ||
}} | ||
> | ||
{children()} | ||
</div> | ||
) | ||
} | ||
</div> | ||
) | ||
|
||
TemplateWrapper.propTypes = { | ||
children: PropTypes.func, | ||
} | ||
|
||
export default TemplateWrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import React from "react" | ||
import React from 'react' | ||
|
||
export default () => | ||
const NotFoundPage = () => ( | ||
<div> | ||
<h1>NOT FOUND</h1> | ||
<p>You just hit a route that doesn't exist... the sadness.</p> | ||
<p>You just hit a route that doesn't exist... the sadness.</p> | ||
</div> | ||
) | ||
|
||
export default NotFoundPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
import React from "react" | ||
import Link from "gatsby-link" | ||
import Helmet from "react-helmet" | ||
import React from 'react' | ||
import Link from 'gatsby-link' | ||
|
||
export default class Index extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<h1>Hi people</h1> | ||
<p>Welcome to your new Gatsby site.</p> | ||
<p>Now go build something great.</p> | ||
<Link to="/page-2/">Go to page 2</Link> | ||
</div> | ||
) | ||
} | ||
} | ||
const IndexPage = () => ( | ||
<div> | ||
<h1>Hi people</h1> | ||
<p>Welcome to your new Gatsby site.</p> | ||
<p>Now go build something great.</p> | ||
<Link to="/page-2/">Go to page 2</Link> | ||
</div> | ||
) | ||
|
||
export default IndexPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import React from "react" | ||
import Link from "gatsby-link" | ||
import Helmet from "react-helmet" | ||
import React from 'react' | ||
import Link from 'gatsby-link' | ||
|
||
export default class Page2 extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<h1>Hi people</h1> | ||
<p>Welcome to page 2</p> | ||
<Link to="/">Go back to the homepage</Link> | ||
</div> | ||
) | ||
} | ||
} | ||
const SecondPage = () => ( | ||
<div> | ||
<h1>Hi people</h1> | ||
<p>Welcome to page 2</p> | ||
<Link to="/">Go back to the homepage</Link> | ||
</div> | ||
) | ||
|
||
export default SecondPage |
Oops, something went wrong.