Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
10,911 additions
and
12,895 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,7 +1,10 @@ | ||
node_modules/ | ||
public | ||
.gatsby-context.js | ||
.DS_Store | ||
.intermediate-representation/ | ||
.cache/ | ||
# Project dependencies | ||
.cache | ||
node_modules | ||
yarn-error.log | ||
package-lock.json | ||
yarn.lock | ||
|
||
# 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 gatsbyjs | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
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,20 +1,19 @@ | ||
# gatsby-starter-dimension | ||
|
||
**This is a starter for Gatsby.js V1.** | ||
**This is a starter for Gatsby.js V2.** | ||
|
||
**A newer version of this starter for Gatsby.js V2 can be found at:** | ||
<br/> | ||
**https://github.com/codebushi/gatsby-starter-dimension-v2** | ||
**The older V1 version of this starter can be found on the v1 branch:** | ||
|
||
Gatsby starter based on the Dimension site template, designed by HTML5 UP. Check out https://codebushi.com/gatsby-starters/ for more Gatsby starters and templates. | ||
Gatsby.js V2 starter based on the Dimension site template, designed by HTML5 UP. Check out https://codebushi.com/gatsby-starters/ for more Gatsby starters and templates. | ||
|
||
## Preview | ||
|
||
http://gatsby-dimension.surge.sh/ | ||
https://gatsby-dimension.surge.sh/ | ||
|
||
## Installation | ||
|
||
Install this starter (assuming Gatsby is installed) by running from your CLI: | ||
`gatsby new gatsby-starter-dimension https://github.com/ChangoMan/gatsby-starter-dimension` | ||
<br/> | ||
`gatsby new gatsby-starter-dimension https://github.com/codebushi/gatsby-starter-dimension` | ||
|
||
Run `gatsby develop` in the terminal to start. | ||
Run `gatsby develop` in the terminal to start the dev site. |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Implement Gatsby's Browser APIs in this file. | ||
* | ||
* See: https://www.gatsbyjs.org/docs/browser-apis/ | ||
*/ | ||
|
||
// You can delete this file if you're not using it |
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,42 +1,24 @@ | ||
module.exports = { | ||
siteMetadata: { | ||
title: "Gatsby Starter - Dimension by HTML5 UP", | ||
title: "Gatsby Starter - Dimension V2", | ||
author: "Hunter Chang", | ||
description: "A Gatsby.js Starter based on Dimension by HTML5 UP" | ||
description: "A Gatsby.js V2 Starter based on Dimension by HTML5 UP" | ||
}, | ||
pathPrefix: '/', | ||
plugins: [ | ||
'gatsby-plugin-react-helmet', | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
resolve: `gatsby-plugin-manifest`, | ||
options: { | ||
path: `${__dirname}/src/posts`, | ||
name: "posts", | ||
name: 'gatsby-starter-default', | ||
short_name: 'starter', | ||
start_url: '/', | ||
background_color: '#663399', | ||
theme_color: '#663399', | ||
display: 'minimal-ui', | ||
icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site. | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `images`, | ||
path: `${__dirname}/src/images`, | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-transformer-remark`, | ||
options: { | ||
plugins: [ | ||
{ | ||
resolve: `gatsby-remark-images`, | ||
options: { | ||
maxWidth: 630, | ||
}, | ||
}, | ||
"gatsby-remark-copy-linked-files", | ||
], | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
`gatsby-plugin-react-helmet`, | ||
`gatsby-plugin-sass` | ||
'gatsby-plugin-sass', | ||
'gatsby-plugin-offline' | ||
], | ||
} |
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,44 +1,7 @@ | ||
const _ = require("lodash") | ||
const Promise = require("bluebird") | ||
const path = require("path") | ||
const select = require(`unist-util-select`) | ||
const fs = require(`fs-extra`) | ||
/** | ||
* Implement Gatsby's Node APIs in this file. | ||
* | ||
* See: https://www.gatsbyjs.org/docs/node-apis/ | ||
*/ | ||
|
||
exports.createPages = ({ graphql, boundActionCreators }) => { | ||
const { createPage } = boundActionCreators | ||
|
||
return new Promise((resolve, reject) => { | ||
const pages = [] | ||
const blogPost = path.resolve("./src/templates/blog-post.js") | ||
resolve( | ||
graphql( | ||
` | ||
{ | ||
allMarkdownRemark(limit: 1000) { | ||
edges { | ||
node { | ||
frontmatter { | ||
path | ||
} | ||
} | ||
} | ||
} | ||
} | ||
` | ||
).then(result => { | ||
if (result.errors) { | ||
console.log(result.errors) | ||
reject(result.errors) | ||
} | ||
|
||
// Create blog posts pages. | ||
_.each(result.data.allMarkdownRemark.edges, edge => { | ||
createPage({ | ||
path: edge.node.frontmatter.path, | ||
component: blogPost | ||
}) | ||
}) | ||
}) | ||
) | ||
}) | ||
} | ||
// You can delete this file if you're not using it |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file. | ||
* | ||
* See: https://www.gatsbyjs.org/docs/ssr-apis/ | ||
*/ | ||
|
||
// You can delete this file if you're not using it |
Oops, something went wrong.