Skip to content

Commit

Permalink
Gatsby: Updated the site to Gastbyv4
Browse files Browse the repository at this point in the history
Signed-off-by: Nikhil-Ladha <[email protected]>
  • Loading branch information
Nikhil-Ladha committed Jul 28, 2022
1 parent f63d0f7 commit 831f7b0
Show file tree
Hide file tree
Showing 18 changed files with 11,814 additions and 12,451 deletions.
12 changes: 0 additions & 12 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
{
"plugins": [
[
"babel-plugin-styled-components",
{
"ssr": false,
"minify": false,
"transpileTemplateLiterals": false,
"pure": true
}
],
"@babel/plugin-proposal-optional-chaining"
],
"presets": [
[
"babel-preset-gatsby",
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
},
"settings": {
"react": {
"version": "require('./package.json').dependencies.react"
"version": "detect"
}
},
"extends": [
Expand Down
5 changes: 2 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ module.exports = {
twitterUsername: "@layer5",
},
flags: {
FAST_DEV: true,
PRESERVE_FILE_DOWNLOAD_CACHE: true,
FAST_DEV: true
},
plugins: [
{
Expand Down Expand Up @@ -43,7 +42,7 @@ module.exports = {
},
},
{
resolve: "gatsby-plugin-feed-mdx",
resolve: "gatsby-plugin-feed",
options: {
query: `
{
Expand Down
18 changes: 12 additions & 6 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,14 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
component: EventsTemplate
});

blogs.forEach(blog => {
blogs.forEach((blog, index) => {
createPage({
path: blog.fields.slug,
component: blogPostTemplate,
context: {
slug: blog.fields.slug,
},
defer: index + 1 > 20,
});
});

Expand Down Expand Up @@ -319,23 +320,25 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
});
});

resources.forEach(resource => {
resources.forEach((resource, index) => {
createPage({
path: resource.fields.slug,
component: resourcePostTemplate,
context: {
slug: resource.fields.slug,
},
defer: index + 1 > 20,
});
});

news.forEach(singleNews => {
news.forEach((singleNews, index) => {
createPage({
path: singleNews.fields.slug,
component: NewsPostTemplate,
context: {
slug: singleNews.fields.slug,
},
defer: index + 1 > 10,
});
});

Expand All @@ -349,13 +352,14 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
});
});

events.forEach(event => {
events.forEach((event, index) => {
createPage({
path: event.fields.slug,
component: EventTemplate,
context: {
slug: event.fields.slug,
},
defer: index + 1 > 10,
});
});

Expand All @@ -379,23 +383,25 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
});
});

members.forEach(member => {
members.forEach((member, index) => {
createPage({
path: member.fields.slug,
component: MemberTemplate,
context: {
slug: member.fields.slug,
},
defer: index + 1 > 2,
});
});

singleWorkshop.forEach(workshop => {
singleWorkshop.forEach((workshop, index) => {
createPage({
path: workshop.fields.slug,
component: WorkshopTemplate,
context: {
slug: workshop.fields.slug,
},
defer: index + 1 > 5,
});
});

Expand Down
Loading

0 comments on commit 831f7b0

Please sign in to comment.