Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b7bc06b
feat: implement dynamic routing for Sistent components
rishiraj38 Feb 5, 2026
e33a175
feat: standardize sistent component layouts and refactor to MDX
rishiraj38 Feb 6, 2026
83035c1
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Feb 13, 2026
42b3496
Revert linting changes to focus on logic
rishiraj38 Feb 16, 2026
d10d755
Merge remote-tracking branch 'origin/master' into feat/sistent-refact…
rishiraj38 Feb 16, 2026
43f7ff8
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Feb 16, 2026
5c3ca69
refactor: inline Accordion demos and clean gatsby-node.js
rishiraj38 Feb 16, 2026
028109d
Merge branch 'master' into feat/sistent-refactor-mdx
Rajesh-Nagarajan-11 Feb 17, 2026
618cfb2
Content Fix: Accordion, Avatar, AvatarGroup
rishiraj38 Feb 17, 2026
ab3bdc2
refactor: Consolidate Sistent component demos by deleting individual …
rishiraj38 Feb 18, 2026
471fbb5
revert
rishiraj38 Feb 18, 2026
85cae40
revert
rishiraj38 Feb 18, 2026
dbcd8f8
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Feb 18, 2026
d116802
updating and fixing all errors and also updated backdrop
rishiraj38 Feb 18, 2026
e34744e
restore lost progress: fix imports and re-apply collapsible
rishiraj38 Feb 18, 2026
6f38801
fix: add missing collapsible prop to usage and installation pages
rishiraj38 Feb 18, 2026
b14f050
style: lower sidebar navigation position
rishiraj38 Feb 18, 2026
d0515e0
revertCTA
rishiraj38 Feb 18, 2026
4fd3a6f
revertBanner
rishiraj38 Feb 18, 2026
1697d3e
revertCTAmeet
rishiraj38 Feb 18, 2026
7993cc0
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Feb 19, 2026
c3d6684
updated:BadageandBox
rishiraj38 Feb 19, 2026
22cfb78
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Feb 20, 2026
a7f8287
refactor: update CircularProgress, Collapse, Container, Dialog
rishiraj38 Feb 20, 2026
973a1c4
style(sistent): refactor Dialog, Divider, Drawer, FormControlLabel, G…
rishiraj38 Feb 21, 2026
68e15a7
fix(programs): lazy initialize activeOption state; Updated components…
rishiraj38 Feb 22, 2026
899d577
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Feb 24, 2026
8dc8186
fix(programs): lazy initialize activeOption state
rishiraj38 Feb 26, 2026
efc9771
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 1, 2026
13a2f2d
Merge branch 'master' into feat/sistent-refactor-mdx
Rajesh-Nagarajan-11 Mar 2, 2026
0b82210
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 4, 2026
e8e9a47
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 5, 2026
387510f
Fix broken React key in SistentNavigation component list
rishiraj38 Mar 7, 2026
b27fd9c
Resolve merge conflicts with master
rishiraj38 Mar 11, 2026
843fc9e
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 11, 2026
1516d98
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 11, 2026
5594d2c
Merge branch 'master' into feat/sistent-refactor-mdx
Rajesh-Nagarajan-11 Mar 12, 2026
7b4efb3
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 13, 2026
9420192
“fix:BuildFailure”
rishiraj38 Mar 13, 2026
7fd191f
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 14, 2026
3f7fa7f
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 16, 2026
080eb92
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 16, 2026
76192fd
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 17, 2026
2e94b26
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 17, 2026
2e906b7
Merge branch 'master' into feat/sistent-refactor-mdx
rishiraj38 Mar 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 62 additions & 35 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ const {
getExcludedCollections,
isFullSiteBuild,
} = require("./src/utils/build-collections");
const {
componentsData,
} = require("./src/sections/Projects/Sistent/components/content");

const shouldBuildFullSite = isFullSiteBuild();
const excludedCollections = new Set(
Expand Down Expand Up @@ -358,6 +355,25 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
}
}
}
sistentComponents: allMdx(
filter: {
fields: { collection: { eq: "sistent" } }
}
) {
group(field: { fields: { componentName: SELECT } }) {
fieldValue
nodes {
fields {
slug
componentName
pageType
}
internal {
contentFilePath
}
}
}
}
}
`);

Expand Down Expand Up @@ -712,39 +728,29 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
}
});

const components = componentsData.map((component) =>
component.src.replace("/", ""),
);
const createComponentPages = (createPage, components) => {
const pageTypes = [
{ suffix: "", file: "index.js" },
{ suffix: "/guidance", file: "guidance.js" },
{ suffix: "/code", file: "code.js" },
];
// Create Sistent component pages dynamically from MDX
// Use grouping to identify which sub-pages (Tabs) exist for each component
const sistentGroups = res.data.sistentComponents.group;
const sistentTemplate = path.resolve("src/templates/sistent-component.js");

components.forEach((name) => {
pageTypes.forEach(({ suffix, file }) => {
const pagePath = `/projects/sistent/components/${name}${suffix}`;
const componentPath = `./src/sections/Projects/Sistent/components/${name}/${file}`;
if (fs.existsSync(path.resolve(componentPath))) {
try {
createPage({
path: pagePath,
component: require.resolve(componentPath),
});
} catch (error) {
console.error(`Error creating page for "${pagePath}":`, error);
}
} else {
console.info(
`Skipping creating page "${pagePath}" - file not found: "${componentPath}"`,
);
}
sistentGroups.forEach((group) => {
const componentName = group.fieldValue;
// content-learn uses different fields, sistent uses componentName.

const availablePages = group.nodes.map((node) => node.fields.pageType);

group.nodes.forEach((node) => {
createPage({
path: node.fields.slug,
component: `${sistentTemplate}?__contentFilePath=${node.internal.contentFilePath}`,
context: {
slug: node.fields.slug,
componentName: componentName,
availablePages: availablePages,
},
});
});
};

createComponentPages(createPage, components);
});
};

// slug starts and ends with '/' so parts[0] and parts[-1] will be empty
Expand Down Expand Up @@ -831,13 +837,11 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
const parent = getNode(node.parent);
let collection = parent.sourceInstanceName;

// --- CHANGED: Consolidated Source Logic ---
// If the source is "collections", we determine the actual collection
// from the parent directory name (e.g., "blog", "news", etc.)
if (collection === "collections") {
collection = parent.relativeDirectory.split("/")[0];
}
// ------------------------------------------

createNodeField({
name: "collection",
Expand Down Expand Up @@ -900,6 +904,29 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
if (node.frontmatter.title)
slug = `/community/events/${slugify(node.frontmatter.title)}`;
break;
case "sistent": {
// For sistent components, create slug from directory structure
const componentSlug = parent.relativeDirectory.split("/").pop();
const fileName = parent.name;
const suffix = fileName === "index" ? "" : `/${fileName}`;

slug = `/projects/sistent/components/${componentSlug}${suffix}`;

createNodeField({
name: "componentName",
node,
value: componentSlug,
});

// "index" -> "overview", others match filename
const pageType = fileName === "index" ? "overview" : fileName;
createNodeField({
name: "pageType",
node,
value: pageType,
});
break;
}
default:
slug = `/${collection}/${slugify(node.frontmatter.title)}`;
}
Expand Down
Loading
Loading