-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Starter Config For New Project
- Loading branch information
1 parent
30a15b1
commit dfe784b
Showing
19 changed files
with
24,239 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": [ | ||
"wesbos" | ||
], | ||
"rules": { | ||
"no-console": 1, | ||
"no-multi-assign": 2, | ||
"jsx-a11y/html-has-lang": 0, | ||
"react/destructuring-assignment": 0, | ||
"react/no-danger": 0, | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true | ||
} | ||
] | ||
} | ||
} |
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,3 @@ | ||
node_modules | ||
.cache | ||
public |
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 +1 @@ | ||
# news-feeds | ||
## Nirlom Gatsby Starter |
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,16 @@ | ||
module.exports = { | ||
name: 'Nirlom Gatsby Starter', | ||
shortName: 'Gatsby Starter', | ||
title: 'Nirlom Gatsby Starter', | ||
logo: `${__dirname}/../src/static/images/logo/nirlom.png`, | ||
siteUrl: 'https://nirlom.com', | ||
keyword: 'Nirlom, Nirlom Gatsby Starter', | ||
description: 'Nirlom Gatsby Starter', | ||
type: 'website', | ||
author: 'Nirlom', | ||
lang: 'en', | ||
googleAnalyticsID: 'UA-139553191-1', // GA tracking ID. | ||
backgroundColor: '#fff', | ||
themeColor: '#fff', | ||
favicon: `${__dirname}/../src/static/images/favicon.png` | ||
}; |
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,81 @@ | ||
require('dotenv').config(); | ||
const path = require('path'); | ||
|
||
const { | ||
name, | ||
shortName, | ||
title, | ||
description, | ||
themeColor, | ||
backgroundColor, | ||
siteUrl, | ||
logo, | ||
author, | ||
type, | ||
googleAnalyticsID, | ||
favicon | ||
} = require('./data/site-config'); | ||
|
||
module.exports = { | ||
siteMetadata: { | ||
title, | ||
description, | ||
author, | ||
siteUrl, | ||
logo, | ||
type, | ||
favicon | ||
}, | ||
plugins: [ | ||
'gatsby-plugin-react-helmet', | ||
{ | ||
resolve: 'gatsby-plugin-google-analytics', | ||
options: { | ||
trackingId: googleAnalyticsID, | ||
head: true | ||
} | ||
}, | ||
{ | ||
resolve: `gatsby-plugin-purgecss`, | ||
options: { | ||
printRejected: true // Print removed selectors and processed file names | ||
// develop: true, // Enable while using `gatsby develop` | ||
// tailwind: true, // Enable tailwindcss support | ||
// whitelist: ['whitelist'], // Don't remove this selector | ||
// ignore: ['/ignored.css', 'prismjs/', 'docsearch.js/'], // Ignore files/folders | ||
// purgeOnly : ['components/', '/main.css', 'bootstrap/'], // Purge only these files/folders | ||
} | ||
}, | ||
{ | ||
resolve: 'gatsby-source-filesystem', | ||
options: { | ||
name: 'images', | ||
path: path.join(__dirname, `src`, `static/images`) | ||
} | ||
}, | ||
'gatsby-plugin-sharp', | ||
'gatsby-transformer-sharp', | ||
{ | ||
resolve: `gatsby-plugin-manifest`, | ||
options: { | ||
name, | ||
short_name: shortName, | ||
start_url: '/', | ||
background_color: backgroundColor, | ||
theme_color: themeColor, | ||
display: 'minimal-ui', | ||
icon: favicon | ||
} | ||
}, | ||
'gatsby-plugin-offline', | ||
'gatsby-plugin-sitemap', | ||
{ | ||
resolve: 'gatsby-plugin-robots-txt', | ||
options: { | ||
host: siteUrl, | ||
sitemap: `${siteUrl}/sitemap.xml`, | ||
policy: [{ userAgent: '*', disallow: '' }] | ||
} | ||
} | ||
] | ||
}; |
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,8 @@ | ||
const path = require('path'); | ||
|
||
exports.createPages = ({ graphql, actions }) => { | ||
const { createPage } = actions; | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; |
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,55 @@ | ||
{ | ||
"name": "gatsby-starter", | ||
"version": "1.0.0", | ||
"description": "Nirlom Gatsby Starter", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"build": "gatsby build", | ||
"start": "gatsby develop", | ||
"serve": "gatsby serve", | ||
"clean": "gatsby clean" | ||
}, | ||
"keywords": [], | ||
"author": "Nirlom <tech@nirlom.com>", | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/nirlom/gatsby-starter" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "^9.0.0", | ||
"eslint": "^5.14.1", | ||
"eslint-config-airbnb": "^17.1.0", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-config-wesbos": "0.0.19", | ||
"eslint-plugin-html": "^5.0.3", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"eslint-plugin-react": "^7.12.4", | ||
"eslint-plugin-react-hooks": "^1.3.0", | ||
"prettier": "^1.16.4" | ||
}, | ||
"dependencies": { | ||
"dotenv": "^8.2.0", | ||
"gatsby": "^2.18.7", | ||
"gatsby-image": "^2.2.34", | ||
"gatsby-plugin-google-analytics": "^2.1.29", | ||
"gatsby-plugin-manifest": "^2.2.31", | ||
"gatsby-plugin-offline": "^3.0.27", | ||
"gatsby-plugin-purgecss": "^4.0.1", | ||
"gatsby-plugin-react-helmet": "^3.1.16", | ||
"gatsby-plugin-robots-txt": "^1.5.0", | ||
"gatsby-plugin-sharp": "^2.3.5", | ||
"gatsby-plugin-sitemap": "^2.2.22", | ||
"gatsby-source-filesystem": "^2.1.40", | ||
"gatsby-transformer-sharp": "^2.3.7", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0", | ||
"react-helmet": "^5.2.1", | ||
"simple-load-script": "^1.0.2" | ||
}, | ||
"main": "gatsby-node.js" | ||
} |
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,14 @@ | ||
import React, { Component } from 'react'; | ||
import loadScript from 'simple-load-script'; | ||
|
||
class ImportScripts extends Component { | ||
componentDidMount() { | ||
loadScript('/js/main.js?v=1'); | ||
} | ||
|
||
render() { | ||
return <script />; | ||
} | ||
} | ||
|
||
export default ImportScripts; |
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,68 @@ | ||
import React from 'react'; | ||
import { graphql, StaticQuery } from 'gatsby'; | ||
import PropTypes from 'prop-types'; | ||
import { Helmet } from 'react-helmet'; | ||
import '../static/css/style.css'; | ||
|
||
import ImportScripts from './importScripts'; | ||
|
||
const Layout = props => ( | ||
<StaticQuery | ||
query={graphql` | ||
query IndexPage { | ||
site { | ||
siteMetadata { | ||
description | ||
title | ||
author | ||
type | ||
logo | ||
favicon | ||
siteUrl | ||
} | ||
} | ||
} | ||
`} | ||
render={({ site }) => { | ||
const { siteMetadata } = site; | ||
const { children } = props; | ||
|
||
return ( | ||
<> | ||
<Helmet | ||
title={siteMetadata.title} | ||
meta={[ | ||
{ | ||
name: 'description', | ||
content: siteMetadata.description | ||
}, | ||
{ name: 'author', content: siteMetadata.author }, | ||
{ property: 'og:url', content: siteMetadata.siteUrl }, | ||
{ | ||
property: 'og:image', | ||
content: `${siteMetadata.siteUrl}/images/favicon.png` | ||
}, | ||
{ property: 'og:title', content: siteMetadata.title }, | ||
{ property: 'og:type', content: siteMetadata.type }, | ||
{ | ||
property: 'og:description', | ||
content: siteMetadata.description | ||
} | ||
]} | ||
link={[{ rel: 'canonical', href: siteMetadata.siteUrl }]} | ||
> | ||
<html lang={siteMetadata.lang} /> | ||
</Helmet> | ||
<main>{children}</main> | ||
<ImportScripts /> | ||
</> | ||
); | ||
}} | ||
/> | ||
); | ||
|
||
Layout.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default Layout; |
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,35 @@ | ||
import React from 'react'; | ||
import { graphql } from 'gatsby'; | ||
import Img from 'gatsby-image'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import Layout from '../components/layout'; | ||
|
||
const IndexPage = ({ data }) => ( | ||
<Layout> | ||
<h1>Page Not Found</h1> | ||
<Img fixed={data.file.childImageSharp.fixed} /> | ||
</Layout> | ||
); | ||
|
||
IndexPage.propTypes = { | ||
data: PropTypes.shape({ | ||
file: { | ||
childImageSharp: {} | ||
} | ||
}) | ||
}; | ||
export default IndexPage; | ||
export const query = graphql` | ||
query { | ||
file(relativePath: { eq: "logo/nirlom.png" }) { | ||
childImageSharp { | ||
# Specify the image processing specifications right in the query. | ||
# Makes it trivial to update as your page's design changes. | ||
fixed(width: 125, height: 125) { | ||
...GatsbyImageSharpFixed | ||
} | ||
} | ||
} | ||
} | ||
`; |
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,35 @@ | ||
import React from 'react'; | ||
import { graphql } from 'gatsby'; | ||
import Img from 'gatsby-image'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import Layout from '../components/layout'; | ||
|
||
const IndexPage = ({ data }) => ( | ||
<Layout> | ||
<h1>Hello Nirlom Starter Page</h1> | ||
<Img fluid={data.file.childImageSharp.fluid} /> | ||
</Layout> | ||
); | ||
|
||
IndexPage.propTypes = { | ||
data: PropTypes.shape({ | ||
file: { | ||
childImageSharp: {} | ||
} | ||
}) | ||
}; | ||
export default IndexPage; | ||
export const query = graphql` | ||
query { | ||
file(relativePath: { eq: "logo/nirlom.png" }) { | ||
childImageSharp { | ||
# Specify the image processing specifications right in the query. | ||
# Makes it trivial to update as your page's design changes. | ||
fluid { | ||
...GatsbyImageSharpFluid | ||
} | ||
} | ||
} | ||
} | ||
`; |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Oops, something went wrong.