Skip to content

Commit 68f815c

Browse files
author
Vivek Vishal
authored
Merge branch 'master' into slider/community
2 parents 53ead62 + 132b58d commit 68f815c

524 files changed

Lines changed: 14257 additions & 10418 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/community_member_profile.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ labels: 'area/community, help wanted, framework/gatsby, language/markdown, good
66
assignees: ''
77
---
88

9-
**Current Behavior**
9+
### Current Behavior
1010

11-
<@github-username> has been a consistent contributor and community member.
11+
The following individual has been a consistent contributor and community member. Their demonstrated willingness to help others and desire to help improve projects here align with the community's culture.
1212

13-
**Desired Situation**
14-
Let's recognize <@github-username> as a contributor and community member by creating a profile on https://layer5.io/community/members.
13+
### Desired Situation
14+
Let's recognize this individual as a contributor and community member by creating a profile on https://layer5.io/community/members.
1515

16-
- GitHub: <!-- username only -->
17-
- Twitter: <!-- handle only -->
18-
- LinkedIn: <!-- <profilename> only https://www.linkedin.com/in/<profilename> -->
19-
- Layer5 Cloud: <!-- <user ID> only UUID https://cloud.layer5.io/user/<uuid> -->
20-
- Link to profile picture:
16+
- GitHub: <!-- username only -->
17+
- Twitter: <!-- username only -->
18+
- LinkedIn: <!-- <profilename> only https://www.linkedin.com/in/<profilename> -->
19+
- Layer5 Cloud: <!-- <user ID> only UUID https://cloud.layer5.io/user/<uuid> -->
20+
- Profile Picture: <!-- hyperlink to their picture -->
2121

2222
A detailed explanation on how to set up a community member profile can be found in the [CONTRIBUTING.md](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md)
2323

2424
---
2525

26-
**Contributor Resources**
26+
### Contributor Resources
2727

2828
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the [`master` branch](https://github.com/layer5io/layer5/tree/master).
2929
- See [contributing instructions](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md)

.github/build/features-to-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
const fs = require("fs").promises; // Use fs.promises
3+
const fs = require("fs").promises;
44
const csv = require("csvtojson");
55
const [major, minor, patch] = process.versions.node.split(".").map(Number);
66
console.log(`Using Node.js version: ${major}.${minor}.${patch}`);

.github/workflows/build-and-preview-site.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
- name: Install and Build 🔧
1818
run: |
1919
npm install --legacy-peer-deps
20+
node -v
21+
npm run version
2022
npm run noIndex
2123
2224
- name: Zip Site

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.18.3

gatsby-browser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import "./fonts.css";
2+
import "slick-carousel/slick/slick.css";
3+
import "slick-carousel/slick/slick-theme.css";
24

35
document.addEventListener("DOMContentLoaded", () => {
46
/** init gtm after 3500 seconds - this could be adjusted */

gatsby-config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = {
1717
},
1818
trailingSlash: "never",
1919
plugins: [
20-
"@mediacurrent/gatsby-plugin-silence-css-order-warning",
2120
{
2221
resolve: "gatsby-plugin-webpack-bundle-analyser-v2",
2322
options: {
@@ -546,7 +545,7 @@ module.exports = {
546545
resolve: "gatsby-plugin-robots-txt",
547546
options: {
548547
host: "https://layer5.io",
549-
sitemap: "https://layer5.io/sitemap/sitemap-index.xml",
548+
sitemap: "https://layer5.io/sitemap-index.xml",
550549
policy: [{ userAgent: "*", allow: "/" }],
551550
}
552551
},

gatsby-node.js

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const path = require("path");
99
const slugify = require("./src/utils/slugify");
1010
const { paginate } = require("gatsby-awesome-pagination");
1111
const { createFilePath } = require("gatsby-source-filesystem");
12-
const FilterWarningsPlugin = require("webpack-filter-warnings-plugin");
1312
const config = require("./gatsby-config");
1413
const {
1514
componentsData,
@@ -336,7 +335,12 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
336335
redirectInBrowser: true,
337336
isPermanent: true,
338337
});
339-
338+
createRedirect({
339+
fromPath: "/sitemap.xml",
340+
toPath: "/sitemap-index.xml",
341+
redirectInBrowser: true,
342+
isPermanent: true,
343+
});
340344
// Create Pages
341345
const { createPage } = actions;
342346

@@ -728,7 +732,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
728732
});
729733

730734
const components = componentsData.map((component) => component.src.replace("/", ""));
731-
732735
const createComponentPages = (createPage, components) => {
733736
const pageTypes = [
734737
{ suffix: "", file: "index.js" },
@@ -988,14 +991,6 @@ exports.onCreateWebpackConfig = ({ actions, stage, getConfig }) => {
988991
},
989992
},
990993
});
991-
actions.setWebpackConfig({
992-
plugins: [
993-
new FilterWarningsPlugin({
994-
exclude:
995-
/mini-css-extract-plugin[^]*Conflicting order. Following module has been added:/,
996-
}),
997-
],
998-
});
999994

1000995
if (stage === "build-javascript") {
1001996
const config = getConfig();
@@ -1038,3 +1033,35 @@ exports.createSchemaCustomization = ({ actions }) => {
10381033
`;
10391034
createTypes(typeDefs);
10401035
};
1036+
1037+
const fs = require("fs");
1038+
1039+
exports.onPostBuild = async ({ graphql, reporter }) => {
1040+
const result = await graphql(`
1041+
{
1042+
allSitePage {
1043+
nodes {
1044+
path
1045+
matchPath
1046+
}
1047+
}
1048+
site {
1049+
siteMetadata {
1050+
siteUrl
1051+
}
1052+
}
1053+
}
1054+
`);
1055+
1056+
if (result.errors) {
1057+
reporter.panicOnBuild("Error while running GraphQL query.");
1058+
return;
1059+
}
1060+
1061+
// Log the result to the console
1062+
console.log("GraphQL query result:", JSON.stringify(result, null, 2));
1063+
1064+
// Optionally, write the result to a file for easier inspection
1065+
const outputPath = path.resolve(__dirname, "public", "query-result.json");
1066+
fs.writeFileSync(outputPath, JSON.stringify(result, null, 2));
1067+
};

0 commit comments

Comments
 (0)