Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangoMan committed Jan 9, 2018
0 parents commit 1291341
Show file tree
Hide file tree
Showing 48 changed files with 3,937 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ['react', 'es2015', 'stage-1'],
"plugins": ['add-module-exports']
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
public
.gatsby-context.js
.DS_Store
.intermediate-representation/
.cache/
yarn.lock
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true
}
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# back to language cpp to try to bypass osx node failure
language: cpp
sudo: false
env:
- export NODE_VERSION="0.10"
- export NODE_VERSION="0.12"
- export NODE_VERSION="4"
- export NODE_VERSION="5"
os:
- linux
- osx
# pre-install to bring in the correct version of node via nvm
before_install:
- git submodule update --init --recursive
- git clone https://github.com/creationix/nvm.git ./.nvm
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- npm config set python `which python`
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CC="gcc-4.8";
export CXX="g++-4.8";
export LINK="gcc-4.8";
export LINKXX="g++-4.8";
fi
- gcc --version
- g++ --version
# node 4 depends on gcc 4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- gcc-4.8
# script needed to test, because defaults don't work on osx
script:
- npm install
- npm run lint
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# gatsby-starter-strata
Gatsby starter based on the Strata site template, designed by [HTML5 UP](https://html5up.net/strata). Check out https://hunterchang.com/gatsby-starters/ for more Gatsby starters and templates.

## Preview

http://gatsby-strata.surge.sh/

## Installation

Install this starter (assuming Gatsby is installed) by running from your CLI:
`gatsby new gatsby-starter-strata https://github.com/ChangoMan/gatsby-starter-strata`

Run `gatsby develop` in the terminal to start.
42 changes: 42 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
siteMetadata: {
title: "Gatsby Starter - Strata by HTML5 UP",
author: "Hunter Chang",
description: "A Gatsby.js Starter based on Strata by HTML5 UP"
},
pathPrefix: '/',
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/posts`,
name: "posts",
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/assets/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`
],
}
47 changes: 47 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const _ = require("lodash")
const Promise = require("bluebird")
const path = require("path")
const select = require(`unist-util-select`)
const fs = require(`fs-extra`)

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,
context: {
path: edge.node.frontmatter.path,
},
})
})
})
)
})
}
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "gatsby-starter-strata",
"description": "Gatsby Starter - Strata by HTML5 UP",
"version": "1.0.0",
"author": "Hunter Chang",
"dependencies": {
"gatsby": "^1.9.146",
"gatsby-link": "^1.6.32",
"gatsby-image": "^1.0.31",
"gatsby-plugin-google-analytics": "^1.0.14",
"gatsby-plugin-react-helmet": "^1.0.8",
"gatsby-plugin-sass": "^1.0.15",
"gatsby-plugin-sharp": "^1.6.24",
"gatsby-remark-copy-linked-files": "^1.5.25",
"gatsby-remark-images": "^1.5.36",
"gatsby-source-filesystem": "^1.5.11",
"gatsby-transformer-remark": "^1.7.25",
"gatsby-transformer-sharp": "^1.6.16",
"lodash": "^4.17.4"
},
"homepage": "https://github.com/ChangoMan/gatsby-starter-strata",
"keywords": [
"gatsby"
],
"license": "MIT",
"main": "n/a",
"repository": {
"type": "git",
"url": "https://github.com/ChangoMan/gatsby-starter-strata.git"
},
"scripts": {
"dev": "gatsby develop",
"lint": "./node_modules/.bin/eslint --ext .js,.jsx --ignore-pattern public .",
"test": "echo \"Error: no test specified\" && exit 1",
"develop": "gatsby develop",
"build": "gatsby build",
"fix-semi": "eslint --quiet --ignore-pattern node_modules --ignore-pattern public --parser babel-eslint --no-eslintrc --rule '{\"semi\": [2, \"never\"], \"no-extra-semi\": [2]}' --fix gatsby-node.js"
}
}
4 changes: 4 additions & 0 deletions src/assets/css/font-awesome.min.css

Large diffs are not rendered by default.

Binary file added src/assets/fonts/FontAwesome.otf
Binary file not shown.
Binary file added src/assets/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit 1291341

Please sign in to comment.