This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3449 from ONRR/dev
Dev-->Master
- Loading branch information
Showing
73 changed files
with
19,610 additions
and
1,183 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 |
---|---|---|
|
@@ -20,3 +20,4 @@ styleguide | |
.npmrc | ||
/.project | ||
gatsby-public | ||
blog |
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 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 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 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,19 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
}, | ||
"plugins": [ | ||
"react", | ||
], | ||
"globals": { | ||
"graphql": false, | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true, | ||
"jsx": 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,7 @@ | ||
node_modules/ | ||
public | ||
.gatsby-context.js | ||
.DS_Store | ||
.intermediate-representation/ | ||
.cache/ | ||
yarn.lock |
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,5 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"semi": false, | ||
"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,15 @@ | ||
language: node_js | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
node_js: | ||
- "node" | ||
- "lts/*" | ||
- "7" | ||
- "8" | ||
|
||
script: | ||
- npm install | ||
- npm run lint |
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,21 @@ | ||
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# A blog from the Innovation Design Team at the Department of the Interior | ||
|
||
Our team works on [Natural Resources Revenue Data](https://revenuedata.doi.gov/), an [open data](https://github.com/ONRR/doi-extractives-data) site about how the government manages federal energy and mineral resources, revenue, and disbursements. | ||
|
||
We built this blog with [GatsbyJS](https://gatsbyjs.org/) using the [`gatsby-starter-blog`](https://github.com/gatsbyjs/gatsby-starter-blog). | ||
|
||
We use this blog to share our user-centered design and development process. | ||
|
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,73 @@ | ||
// Federalist provides the BASEURL env variable for preview builds. | ||
// https://github.com/18F/federalist-garden-build#variables-exposed-during-builds | ||
const BASEURL = process.env.BASEURL || ''; | ||
|
||
|
||
module.exports = { | ||
siteMetadata: { | ||
title: 'Open data design at the Department of the Interior', | ||
author: 'Ryan Johnson', | ||
description: 'Our blog about data, design, and innovation at the Department of the Interior.', | ||
siteUrl: 'https://revenuedata.doi.gov/', | ||
}, | ||
pathPrefix: `${BASEURL}/blog`, | ||
mapping: { | ||
"MarkdownRemark.frontmatter.authors": `AuthorYaml`, | ||
}, | ||
plugins: [ | ||
`gatsby-transformer-yaml`, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
path: `${__dirname}/src/pages`, | ||
name: 'pages', | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
path: `${__dirname}/src/data`, | ||
name: 'data', | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-transformer-remark`, | ||
options: { | ||
plugins: [ | ||
{ | ||
resolve: `gatsby-remark-images`, | ||
options: { | ||
maxWidth: 590, | ||
quality: 80, | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-remark-responsive-iframe`, | ||
options: { | ||
wrapperStyle: `margin-bottom: 1.0725rem`, | ||
}, | ||
}, | ||
'gatsby-remark-prismjs', | ||
'gatsby-remark-copy-linked-files', | ||
'gatsby-remark-smartypants', | ||
], | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
{ | ||
resolve: `gatsby-plugin-google-analytics`, | ||
options: { | ||
//trackingId: `ADD YOUR TRACKING ID HERE`, | ||
}, | ||
}, | ||
`gatsby-plugin-offline`, | ||
`gatsby-plugin-react-helmet`, | ||
{ | ||
resolve: 'gatsby-plugin-typography', | ||
options: { | ||
pathToConfigModule: 'src/utils/typography', | ||
}, | ||
}, | ||
], | ||
} |
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,78 @@ | ||
const _ = require('lodash') | ||
const Promise = require('bluebird') | ||
const path = require('path') | ||
const { createFilePath } = require('gatsby-source-filesystem') | ||
|
||
exports.createPages = ({ graphql, actions }) => { | ||
const { createPage } = actions | ||
|
||
return new Promise((resolve, reject) => { | ||
const blogPost = path.resolve('./src/templates/blog-post.js') | ||
resolve( | ||
graphql( | ||
` | ||
{ | ||
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }, limit: 1000) { | ||
edges { | ||
node { | ||
fields { | ||
slug | ||
} | ||
frontmatter { | ||
title | ||
} | ||
} | ||
} | ||
} | ||
} | ||
` | ||
).then(result => { | ||
if (result.errors) { | ||
console.log(result.errors) | ||
reject(result.errors) | ||
} | ||
|
||
// Create blog posts pages. | ||
const posts = result.data.allMarkdownRemark.edges; | ||
|
||
_.each(posts, (post, index) => { | ||
const previous = index === posts.length - 1 ? null : posts[index + 1].node; | ||
const next = index === 0 ? null : posts[index - 1].node; | ||
|
||
createPage({ | ||
path: post.node.fields.slug, | ||
component: blogPost, | ||
context: { | ||
slug: post.node.fields.slug, | ||
previous, | ||
next, | ||
}, | ||
}) | ||
}) | ||
}) | ||
) | ||
}) | ||
} | ||
|
||
exports.onCreateNode = ({ node, actions, getNode }) => { | ||
const { createNodeField } = actions | ||
|
||
if (node.internal.type === `MarkdownRemark`) { | ||
const value = createFilePath({ node, getNode }) | ||
createNodeField({ | ||
name: `slug`, | ||
node, | ||
value, | ||
}) | ||
} | ||
} | ||
|
||
var copydir = require('copy-dir'); | ||
|
||
exports.onPostBuild = () => { | ||
|
||
console.log("Copying Files from public to blog..."); | ||
copydir.sync(__dirname+'/public', '../blog'); | ||
console.log("Finished Copying Files to blog."); | ||
|
||
} |
Oops, something went wrong.