Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
287f3ff
deleting duplicative templates
stevector Dec 30, 2025
1b1d7de
simplify template
stevector Dec 30, 2025
c343650
removing unused frontmatter.
stevector Dec 30, 2025
d32f7c4
removing unused frontmatter.
stevector Dec 30, 2025
576eae0
removing now unused code.
stevector Dec 30, 2025
3b685ff
deleting unused code
stevector Dec 30, 2025
849c67a
show TOC logic
stevector Dec 30, 2025
7c0c5f8
width handling with sidebar
stevector Dec 30, 2025
78d370a
deleting unused terminus template code
stevector Dec 30, 2025
d829b1e
deleting unused code in omniSideBarNav
stevector Dec 30, 2025
09384db
removing unused code
stevector Dec 30, 2025
5ddf786
removing extraneous guide and video template
stevector Dec 31, 2025
fb218b1
variable for site name
stevector Dec 31, 2025
8191966
fixing flaky test
stevector Dec 31, 2025
da8bfc4
adding variable for site machine name
stevector Dec 31, 2025
6a05e95
Merge branch 'variable-for-site-name' into template-cleanup
stevector Dec 31, 2025
23155da
use onmi nav on terminus commands
stevector Dec 31, 2025
44ef66a
Update pr-e2e.yml
stevector Dec 31, 2025
abf972f
adding logging
stevector Dec 31, 2025
3adda27
Merge branch 'variable-for-site-name' of github.com:pantheon-systems/…
stevector Dec 31, 2025
89b427a
more debugging
stevector Dec 31, 2025
2e70939
whitespace to retrigger build
Dec 31, 2025
2e6b46c
removing extra debugging
stevector Dec 31, 2025
ba5271b
Update pr-e2e.yml
stevector Dec 31, 2025
ba9d373
0
stevector Dec 31, 2025
1691c20
merge from main
stevector Jan 8, 2026
d3b8c41
Merge remote-tracking branch 'origin/main' into template-cleanup
stevector Feb 9, 2026
ae93030
Merge remote-tracking branch 'origin/main' into template-cleanup
stevector Mar 8, 2026
395a098
npm update
stevector Mar 8, 2026
56b4225
npm security updates
stevector Mar 8, 2026
e76250a
Merge branch 'npm-update-march-7' into template-cleanup
stevector Mar 8, 2026
07406dc
no sidebar on products page
stevector Mar 8, 2026
72269c7
Merge remote-tracking branch 'origin/main' into no-sidebar-on-product…
stevector Mar 9, 2026
850617e
Merge remote-tracking branch 'origin/main' into no-sidebar-on-product…
stevector Mar 15, 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
51 changes: 2 additions & 49 deletions src/components/omniSideBarNav.tsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,21 @@
"use server";
import {
findSubMenuItemsToUse,
getOmniSidebarActiveSection,
} from "./omni-components/helpers";
import { getOmniSidebarActiveSection } from "./omni-components/helpers";

import { SideNavCompact } from "./ui/pds-re-export";
import { Navbar } from "./common/navbar";
import { MOBILE_MENU_BREAKPOINT } from "@/constants";
import { getOmniItems } from "./omni-components";
import { turnItemsIntoLinks } from "./omni-components/client-helper";

export const OmniSidebarNav = async ({
activePage,
fallbackItems = null,
fallbackTitle = "",
submenuPathToUse = "",
slot = "",
}: {
activePage: string;
fallbackItems?: any[] | null;
fallbackTitle: string;
submenuPathToUse: string;
slot?: string;
}) => {
const OmniItems = await getOmniItems();

/* Reporting debug code
const flattenedOmniItems = flattenOmniItems(OmniItems);
const results = CalculateFilteredPathsInMenu(
filteredWrittenPaths,
flattenedOmniItems,
);
console.log(results);
*/

const menuItems = getOmniSidebarActiveSection(activePage, OmniItems);

// If the caller is asking for a specific submenu, use that directly.
if (submenuPathToUse.length > 0) {
const submenuItems = findSubMenuItemsToUse(submenuPathToUse, OmniItems);
if (!submenuItems) {
return null;
}
const submenuLinks = turnItemsIntoLinks(submenuItems, activePage);
return (
<SideNavCompact
mobileMenuMaxWidth={MOBILE_MENU_BREAKPOINT}
className="sidenav-compact"
ariaLabel={submenuLinks.linkContent}
headingText={submenuLinks.linkContent}
menuItems={submenuLinks.links}
/>
);
} else if (menuItems) {
if (menuItems) {
const OmniLinks = turnItemsIntoLinks(menuItems, activePage);
return (
<SideNavCompact
Expand All @@ -63,16 +26,6 @@ export const OmniSidebarNav = async ({
menuItems={OmniLinks.links}
/>
);
} else if (fallbackItems && fallbackItems.length > 0) {
return (
<>
<Navbar
title={fallbackTitle}
activePage={activePage}
items={fallbackItems}
/>
</>
);
} else {
return <div></div>;
}
Expand Down
15 changes: 0 additions & 15 deletions src/lib/page-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,6 @@ export type PageData = PageDataWithoutComponent & {
Component: React.ReactNode;
};

/* This helper function helps determine which template should be applied to a piece of content */
export const calculateTemplate = (
node: ProcessedFile,
defaultTemplate: "doc" | "terminuspage" | "certificationpage" | "video"
) => {
if (
node.frontmatter &&
node.frontmatter.layout &&
node.frontmatter.layout !== null
) {
return node.frontmatter.layout;
}
return defaultTemplate;
};

export const normalizeSlug = (slug: string): string => {
let normalizedSlug = slug;
if (normalizedSlug.startsWith("/")) {
Expand Down
57 changes: 10 additions & 47 deletions src/lib/resolve-component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PageDataWithoutComponent, calculateTemplate } from "./page-utils";
import { PageDataWithoutComponent } from "./page-utils";

export const serveLocal = (search?: { local?: "true" | "false" }) => {
let useLocal = false;
Expand Down Expand Up @@ -38,59 +38,22 @@ export const resolveComponent = async (
): Promise<{ Component: React.ReactNode; template: string }> => {
switch (pageData.type) {
case "doc": {
const template = calculateTemplate(pageData.data.doc, "doc");

if (template === "doc") {
const Doc = await import(`@/templates/doc`);
return {
Component: <Doc.DocTemplate doc={pageData.data.doc} />,
template: "doc",
};
} else if (template === "terminuspage") {
const Terminus = await import(`@/templates/terminus`);
return {
Component: <Terminus.TerminusTemplate terminus={pageData.data.doc} />,
template: "terminuspage",
};
} else if (template === "certificationpage") {
const Certification = await import(`@/templates/certification`);
return {
Component: (
<Certification.CertificationTemplate
certification={pageData.data.doc}
/>
),
template: "certification",
};
} else if (template === "video") {
const Video = await import(`@/templates/guide`);
return {
Component: (
<Video.GuideTemplate
guide={pageData.data.doc}
prev={null}
next={null}
/>
),
template: "video",
};
} else {
const Doc = await import(`@/templates/doc`);
return {
Component: <Doc.DocTemplate doc={pageData.data.doc} />,
template: "doc",
};
}
const Doc = await import(`@/templates/doc`);
return {
Component: <Doc.DocTemplate doc={pageData.data.doc} />,
template: "doc",
};
}

case "guide": {
const Guide = await import(`@/templates/guide`);
const Doc = await import(`@/templates/doc`);
return {
Component: (
<Guide.GuideTemplate
guide={pageData.data.guide}
<Doc.DocTemplate
doc={pageData.data.guide}
prev={pageData.data.prev}
next={pageData.data.next}
tocDefault={false}
/>
),
template: "guide",
Expand Down
2 changes: 0 additions & 2 deletions src/source/content/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ description: Understand frontend and backend caching on our platform.
contributors: [dwayne]
permalink: docs/cache
tags: [cache]
layout: video
searchboost: 50
type: video
contenttype: [doc]
innav: [true]
categories: [cache]
Expand Down
3 changes: 0 additions & 3 deletions src/source/content/certification/about.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
title: "Benefits of Becoming WebOps Certified"
subtitle: "Learn about the Pantheon WebOps Certification program"
showtoc: true
contributors: []
layout: certificationpage
permalink: docs/certification/about
---

Expand Down
3 changes: 0 additions & 3 deletions src/source/content/certification/exam.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
title: "WebOps Certification: Exam Overview"
subtitle: "Pantheon WebOps Certification Exam Overview"
contributors: []
showtoc: true
layout: certificationpage
permalink: docs/certification/exam
---
## Exam Instructions
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/00-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: Study Guide Introduction
description: Learn about the three failure modes of website operations.
certificationpage: true
type: certificationpage
layout: certificationpage
showtoc: true
tags: []
permalink: docs/certification/study-guide
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
nexturl: /certification/study-guide/webops
---

Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/01-webops.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 1: WebOps"
description: Learn about the principles and benefits of WebOps.
certificationpage: true
showtoc: true
type: certificationpage
layout: certificationpage
tags: []
permalink: docs/certification/study-guide/webops
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide
nexturl: /certification/study-guide/platform
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/02-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 2: Pantheon Platform"
description: Understand the layers of Pantheon's platform and how it can be used to solve problems using WebOps best practicies.
certificationpage: true
showtoc: true
type: certificationpage
layout: certificationpage
tags: []
permalink: docs/certification/study-guide/platform
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/webops
nexturl: /certification/study-guide/create
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/03-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 3: Site Creation"
description: Learn how to create a site on Pantheon.
certificationpage: true
showtoc: true
type: certificationpage
layout: certificationpage
tags: []
permalink: docs/certification/study-guide/create
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/platform
nexturl: /certification/study-guide/cdn
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/04-cdn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 4: Content Delivery Network"
description: Pantheon's edge layer increases the speed and scalability of all sites on the platform. The Advanced Global CDN can be customized for tailored usage.
certificationpage: true
type: certificationpage
layout: certificationpage
showtoc: true
tags: []
permalink: docs/certification/study-guide/cdn
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/create
nexturl: /certification/study-guide/cms
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/05-cms.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 5: CMS Infrastructure"
description: Pantheon's containerized infrastructure makes CMS applications faster, more scalable, and more secure.
certificationpage: true
type: certificationpage
layout: certificationpage
showtoc: true
tags: []
permalink: docs/certification/study-guide/cms
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/cdn
nexturl: /certification/study-guide/deploy
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/06-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 6: The Deployment Pipeline"
description: Learn about the deployment pipeline for CMS Sites on Pantheon as it relates to code, files, and databases.
certificationpage: true
type: certificationpage
layout: certificationpage
showtoc: true
tags: []
permalink: docs/certification/study-guide/deploy
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/cms
nexturl: /certification/study-guide/people
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/07-people.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 7: Connecting People"
description: Learn how to manage teams, workspaces and permissions before connecting DNS.
certificationpage: true
type: certificationpage
layout: certificationpage
showtoc: true
tags: []
permalink: docs/certification/study-guide/people
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/deploy
nexturl: /certification/study-guide/extend
---
Expand Down
11 changes: 0 additions & 11 deletions src/source/content/certification/study-guide-cms/08-extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
title: WebOps Certification
subtitle: "Chapter 8: Extend with CLI and Hooks"
description: "Terminus and Quicksilver can work together to help facilitate complex WebOps workflows"
certificationpage: true
type: certificationpage
layout: certificationpage
showtoc: true
tags: []
permalink: docs/certification/study-guide/extend
contenttype: [guide]
innav: [false]
categories: []
cms: [drupal, wordpress]
audience: []
product: []
integration: [--]
previousurl: /certification/study-guide/people
nexturl: /certification/study-guide/automate
---
Expand Down
Loading
Loading