Skip to content

Commit

Permalink
Merge branch 'layer5io:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
csengineer1990 authored Nov 22, 2024
2 parents eb49d84 + e315363 commit 3ab022b
Show file tree
Hide file tree
Showing 46 changed files with 329 additions and 392 deletions.
192 changes: 122 additions & 70 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,84 +389,99 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
const resourcePostTemplate = path.resolve("src/templates/resource-single.js");
const integrationTemplate = path.resolve("src/templates/integrations.js");

const res = await graphql(`{
allPosts: allMdx(filter: {frontmatter: {published: {eq: true}}}) {
nodes {
frontmatter {
program
programSlug
}
fields {
collection
slug
}
}
}
blogTags: allMdx(
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}}
) {
group(field: {frontmatter: {tags: SELECT}}) {
nodes {
id
const res = await graphql(`
{
allPosts: allMdx(filter: { frontmatter: { published: { eq: true } } }) {
nodes {
frontmatter {
program
programSlug
}
fields {
collection
slug
}
}
}
fieldValue
}
}
blogCategory: allMdx(
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}}
) {
group(field: {frontmatter: {category: SELECT}}) {
nodes {
id
blogTags: allMdx(
filter: {
fields: { collection: { eq: "blog" } }
frontmatter: { published: { eq: true } }
}
) {
group(field: { frontmatter: { tags: SELECT } }) {
nodes {
id
}
fieldValue
}
}
fieldValue
}
}
memberBio: allMdx(
filter: {fields: {collection: {eq: "members"}}, frontmatter: {published: {eq: true}, executive_bio: {eq: true}}}
) {
nodes {
frontmatter {
name
blogCategory: allMdx(
filter: {
fields: { collection: { eq: "blog" } }
frontmatter: { published: { eq: true } }
}
) {
group(field: { frontmatter: { category: SELECT } }) {
nodes {
id
}
fieldValue
}
}
fields {
slug
collection
memberBio: allMdx(
filter: {
fields: { collection: { eq: "members" } }
frontmatter: { published: { eq: true }, executive_bio: { eq: true } }
}
) {
nodes {
frontmatter {
name
}
fields {
slug
collection
}
}
}
}
}
singleWorkshop: allMdx(
filter: {fields: {collection: {eq: "service-mesh-workshops"}}}
) {
nodes {
fields {
slug
collection
singleWorkshop: allMdx(
filter: { fields: { collection: { eq: "service-mesh-workshops" } } }
) {
nodes {
fields {
slug
collection
}
}
}
}
}
labs: allMdx(filter: {fields: {collection: {eq: "service-mesh-labs"}}}) {
nodes {
fields {
slug
collection
labs: allMdx(
filter: { fields: { collection: { eq: "service-mesh-labs" } } }
) {
nodes {
fields {
slug
collection
}
}
}
}
}
learncontent: allMdx(filter: {fields: {collection: {eq: "content-learn"}}}) {
nodes {
fields {
learnpath
slug
course
section
chapter
pageType
collection
learncontent: allMdx(
filter: { fields: { collection: { eq: "content-learn" } } }
) {
nodes {
fields {
learnpath
slug
course
section
chapter
pageType
collection
}
}
}
}
}
}`);
`);

// handle errors
if (res.errors) {
Expand Down Expand Up @@ -707,6 +722,43 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
}
}
});

const components = [
"button",
"text-input",
"modal",
"paper",
"popper",
"text-field",
"link",
"container",
"button-group",
];

const createComponentPages = (createPage, components) => {
const pageTypes = [
{ suffix: "", file: "index.js" },
{ suffix: "/guidance", file: "guidance.js" },
{ suffix: "/code", file: "code.js" },
];

components.forEach((name) => {
pageTypes.forEach(({ suffix, file }) => {
const path = `/projects/sistent/components/${name}${suffix}`;
const componentPath = `./src/sections/Projects/Sistent/components/${name}/${file}`;
try {
createPage({
path,
component: require.resolve(componentPath),
});
} catch (error) {
console.error(`Error creating page for ${path}:`, error);
}
});
});
};

createComponentPages(createPage, components);
};

// slug starts and ends with '/' so parts[0] and parts[-1] will be empty
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/button-group/code.js

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/button-group/index.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/button/code.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/button/guidance.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/button/index.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/container/code.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/container/guidance.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/container/index.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/link/code.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/link/guidance.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/link/index.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/projects/sistent/components/modal/code.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/projects/sistent/components/modal/guidance.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/projects/sistent/components/modal/index.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/paper/code.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/pages/projects/sistent/components/paper/guidance.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/projects/sistent/components/paper/index.js

This file was deleted.

Loading

0 comments on commit 3ab022b

Please sign in to comment.