-
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.
- Loading branch information
Showing
28 changed files
with
1,376 additions
and
16,362 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
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,86 +1,87 @@ | ||
"use strict"; | ||
module.exports = { | ||
siteMetadata: { | ||
title: `MetaProjection`, | ||
description: `MetaProjection aggregates multiple Canadian electoral projections to provide an overview of how the election is playing out`, | ||
author: `Ross Hill`, | ||
// no trailing slash | ||
url: `https://www.metaprojection.ca`, | ||
publishTimestamp: new Date().getTime(), | ||
}, | ||
plugins: [ | ||
`gatsby-plugin-react-leaflet`, | ||
{ | ||
resolve: `gatsby-plugin-typography`, | ||
options: { | ||
pathToConfigModule: `src/utils/typography`, | ||
}, | ||
siteMetadata: { | ||
title: `MetaProjection`, | ||
description: `MetaProjection aggregates multiple Canadian electoral projections to provide an overview of how the election is playing out`, | ||
author: `Ross Hill`, | ||
// no trailing slash | ||
url: `https://www.metaprojection.ca`, | ||
publishTimestamp: new Date().getTime(), | ||
}, | ||
`gatsby-transformer-json`, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `ByDistrict2021`, | ||
// path: `${__dirname}/src/data/2021/byDistrict`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `Federal2021`, | ||
// path: `${__dirname}/src/data/2021/federal/${new Date() | ||
// .toISOString() | ||
// .slice(0, 10)}.json`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `ByDistrict2019`, | ||
// path: `${__dirname}/src/data/2019/byDistrict`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `Federal2019`, | ||
// path: `${__dirname}/src/data/2019/federal/${new Date() | ||
// .toISOString() | ||
// .slice(0, 10)}.json`, | ||
// }, | ||
// }, | ||
`gatsby-plugin-react-helmet`, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `images`, | ||
path: `${__dirname}/src/images`, | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
{ | ||
resolve: `gatsby-plugin-manifest`, | ||
options: { | ||
name: `MetaProjection`, | ||
short_name: `MetaProjection`, | ||
start_url: `/`, | ||
background_color: `#950451`, | ||
theme_color: `#950451`, | ||
display: `minimal-ui`, | ||
icon: `${__dirname}/src/images/icon.png`, | ||
}, | ||
}, | ||
// this (optional) plugin enables Progressive Web App + Offline functionality. To learn more, visit: https://gatsby.dev/offline | ||
// `gatsby-plugin-offline`, | ||
`gatsby-plugin-emotion`, | ||
{ | ||
resolve: "gatsby-plugin-sentry", | ||
options: { | ||
dsn: "https://[email protected]/1778220", | ||
// Optional settings, see https://docs.sentry.io/clients/node/config/#optional-settings | ||
environment: process.env.NODE_ENV, | ||
enabled: true, | ||
}, | ||
}, | ||
], | ||
plugins: [ | ||
`gatsby-plugin-react-leaflet`, | ||
{ | ||
resolve: `gatsby-plugin-typography`, | ||
options: { | ||
pathToConfigModule: `src/utils/typography`, | ||
}, | ||
}, | ||
`gatsby-transformer-json`, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `ByDistrict2021`, | ||
// path: `${__dirname}/src/data/2021/byDistrict`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `Federal2021`, | ||
// path: `${__dirname}/src/data/2021/federal/${new Date() | ||
// .toISOString() | ||
// .slice(0, 10)}.json`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `ByDistrict2019`, | ||
// path: `${__dirname}/src/data/2019/byDistrict`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `Federal2019`, | ||
// path: `${__dirname}/src/data/2019/federal/${new Date() | ||
// .toISOString() | ||
// .slice(0, 10)}.json`, | ||
// }, | ||
// }, | ||
`gatsby-plugin-react-helmet`, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `images`, | ||
path: `${__dirname}/src/images`, | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
{ | ||
resolve: `gatsby-plugin-manifest`, | ||
options: { | ||
name: `MetaProjection`, | ||
short_name: `MetaProjection`, | ||
start_url: `/`, | ||
background_color: `#950451`, | ||
theme_color: `#950451`, | ||
display: `minimal-ui`, | ||
icon: `${__dirname}/src/images/icon.png`, | ||
}, | ||
}, | ||
// this (optional) plugin enables Progressive Web App + Offline functionality. To learn more, visit: https://gatsby.dev/offline | ||
// `gatsby-plugin-offline`, | ||
`gatsby-plugin-emotion`, | ||
{ | ||
resolve: "gatsby-plugin-sentry", | ||
options: { | ||
dsn: "https://[email protected]/1778220", | ||
// Optional settings, see https://docs.sentry.io/clients/node/config/#optional-settings | ||
environment: process.env.NODE_ENV, | ||
enabled: 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,86 @@ | ||
module.exports = { | ||
siteMetadata: { | ||
title: `MetaProjection`, | ||
description: `MetaProjection aggregates multiple Canadian electoral projections to provide an overview of how the election is playing out`, | ||
author: `Ross Hill`, | ||
// no trailing slash | ||
url: `https://www.metaprojection.ca`, | ||
publishTimestamp: new Date().getTime(), | ||
}, | ||
plugins: [ | ||
`gatsby-plugin-react-leaflet`, | ||
{ | ||
resolve: `gatsby-plugin-typography`, | ||
options: { | ||
pathToConfigModule: `src/utils/typography`, | ||
}, | ||
}, | ||
`gatsby-transformer-json`, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `ByDistrict2021`, | ||
// path: `${__dirname}/src/data/2021/byDistrict`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `Federal2021`, | ||
// path: `${__dirname}/src/data/2021/federal/${new Date() | ||
// .toISOString() | ||
// .slice(0, 10)}.json`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `ByDistrict2019`, | ||
// path: `${__dirname}/src/data/2019/byDistrict`, | ||
// }, | ||
// }, | ||
// { | ||
// resolve: `gatsby-source-filesystem`, | ||
// options: { | ||
// name: `Federal2019`, | ||
// path: `${__dirname}/src/data/2019/federal/${new Date() | ||
// .toISOString() | ||
// .slice(0, 10)}.json`, | ||
// }, | ||
// }, | ||
`gatsby-plugin-react-helmet`, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `images`, | ||
path: `${__dirname}/src/images`, | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
{ | ||
resolve: `gatsby-plugin-manifest`, | ||
options: { | ||
name: `MetaProjection`, | ||
short_name: `MetaProjection`, | ||
start_url: `/`, | ||
background_color: `#950451`, | ||
theme_color: `#950451`, | ||
display: `minimal-ui`, | ||
icon: `${__dirname}/src/images/icon.png`, | ||
}, | ||
}, | ||
// this (optional) plugin enables Progressive Web App + Offline functionality. To learn more, visit: https://gatsby.dev/offline | ||
// `gatsby-plugin-offline`, | ||
`gatsby-plugin-emotion`, | ||
{ | ||
resolve: "gatsby-plugin-sentry", | ||
options: { | ||
dsn: "https://[email protected]/1778220", | ||
// Optional settings, see https://docs.sentry.io/clients/node/config/#optional-settings | ||
environment: process.env.NODE_ENV, | ||
enabled: 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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
"use strict"; | ||
// const path = require("path"); | ||
// const data = require("./src/data/districts.json"); | ||
// const slugify = require("slugify"); | ||
|
||
exports.createPages = (/* { boundActionCreators, actions } */) => { | ||
// const { createPage } = boundActionCreators; | ||
// const { createRedirect } = actions; | ||
// // Your component that should be rendered for every item in JSON. | ||
// const template = path.resolve(`src/templates/district.js`); | ||
// // Create pages for each JSON entry. | ||
// data.forEach(({ number, name }) => { | ||
// const path = `/riding/${slugify(name)}`; | ||
// const redirectPath = `/district/${number}`; | ||
// createPage({ | ||
// path, | ||
// component: template, | ||
// // Send additional data to page from JSON (or query inside template) | ||
// context: { | ||
// relativePath: path, | ||
// number, | ||
// name, | ||
// }, | ||
// }); | ||
// createRedirect({ | ||
// fromPath: redirectPath, | ||
// toPath: path, | ||
// isPermanent: true, | ||
// redirectInBrowser: true, // still need this for findDistrict programmatic routing | ||
// }); | ||
// }); | ||
exports.createPages = ( /* { boundActionCreators, actions } */) => { | ||
// const { createPage } = boundActionCreators; | ||
// const { createRedirect } = actions; | ||
// // Your component that should be rendered for every item in JSON. | ||
// const template = path.resolve(`src/templates/district.js`); | ||
// // Create pages for each JSON entry. | ||
// data.forEach(({ number, name }) => { | ||
// const path = `/riding/${slugify(name)}`; | ||
// const redirectPath = `/district/${number}`; | ||
// createPage({ | ||
// path, | ||
// component: template, | ||
// // Send additional data to page from JSON (or query inside template) | ||
// context: { | ||
// relativePath: path, | ||
// number, | ||
// name, | ||
// }, | ||
// }); | ||
// createRedirect({ | ||
// fromPath: redirectPath, | ||
// toPath: path, | ||
// isPermanent: true, | ||
// redirectInBrowser: true, // still need this for findDistrict programmatic routing | ||
// }); | ||
// }); | ||
}; |
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,31 @@ | ||
// const path = require("path"); | ||
// const data = require("./src/data/districts.json"); | ||
// const slugify = require("slugify"); | ||
|
||
exports.createPages = (/* { boundActionCreators, actions } */) => { | ||
// const { createPage } = boundActionCreators; | ||
// const { createRedirect } = actions; | ||
// // Your component that should be rendered for every item in JSON. | ||
// const template = path.resolve(`src/templates/district.js`); | ||
// // Create pages for each JSON entry. | ||
// data.forEach(({ number, name }) => { | ||
// const path = `/riding/${slugify(name)}`; | ||
// const redirectPath = `/district/${number}`; | ||
// createPage({ | ||
// path, | ||
// component: template, | ||
// // Send additional data to page from JSON (or query inside template) | ||
// context: { | ||
// relativePath: path, | ||
// number, | ||
// name, | ||
// }, | ||
// }); | ||
// createRedirect({ | ||
// fromPath: redirectPath, | ||
// toPath: path, | ||
// isPermanent: true, | ||
// redirectInBrowser: true, // still need this for findDistrict programmatic routing | ||
// }); | ||
// }); | ||
}; |
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,9 @@ | ||
declare module "*.png" { | ||
const content: string; | ||
export default content; | ||
} | ||
|
||
declare module "*.jpg" { | ||
const content: string; | ||
export default content; | ||
} |
Oops, something went wrong.