From 287f3ff45e0b5291762aa35eb69cbc947d9e55cf Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 16:42:25 -0600 Subject: [PATCH 01/22] deleting duplicative templates --- src/lib/resolve-component.tsx | 10 +++------- src/templates/certification.tsx | 1 + src/templates/doc.tsx | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/lib/resolve-component.tsx b/src/lib/resolve-component.tsx index a3c49ec160..6406606ede 100644 --- a/src/lib/resolve-component.tsx +++ b/src/lib/resolve-component.tsx @@ -53,14 +53,10 @@ export const resolveComponent = async ( template: "terminuspage", }; } else if (template === "certificationpage") { - const Certification = await import(`@/templates/certification`); + const Doc = await import(`@/templates/doc`); return { - Component: ( - - ), - template: "certification", + Component: , + template: "doc", }; } else if (template === "video") { const Video = await import(`@/templates/guide`); diff --git a/src/templates/certification.tsx b/src/templates/certification.tsx index 4a95d799b8..afd5095969 100644 --- a/src/templates/certification.tsx +++ b/src/templates/certification.tsx @@ -33,6 +33,7 @@ const ContentLayoutType = ({ ); } + return {children}; }; diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index c79fd0c31c..3ce77a1a47 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -5,12 +5,14 @@ import { ProcessedFile } from "@/server/processor/mdx"; import SearchBar from "@/components/header/search-bar"; import { MdxWrapper } from "@/components/ui/mdx-wrapper"; import HeaderBody from "@/components/common/header-body"; +import NavButtons from "@/components/common/nav-buttons"; import { TOC } from "@/components/common/toc"; const ContainerDiv = ({ children }: { children: React.ReactNode }) => (
{children}
); + export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { const items: any[] = []; // todo: add items @aniketbiprojit @@ -19,6 +21,14 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { image = "/images/default-thumb-guides.png"; } + // Determine submenuPathToUse based on content path + const slug = doc.fields.slug ?? ""; + const submenuPathToUse = slug.startsWith("certification/") ? "/learning" : ""; + + // Get prev/next URLs from frontmatter for NavButtons + const prevUrl = doc.frontmatter.previousurl ?? ""; + const nextUrl = doc.frontmatter.nexturl ?? ""; + return ( { activePage={doc.fields.slug} fallbackTitle={doc.frontmatter.title ?? ""} fallbackItems={items} - submenuPathToUse="" + submenuPathToUse={submenuPathToUse} /> @@ -78,6 +88,9 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { }} componentMap={{}} /> + {(prevUrl || nextUrl) && ( + + )} From 1b1d7de51777dac4367a717cc1af129a9627d442 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 16:47:08 -0600 Subject: [PATCH 02/22] simplify template --- src/templates/doc.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index 3ce77a1a47..adb2194515 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -8,10 +8,6 @@ import HeaderBody from "@/components/common/header-body"; import NavButtons from "@/components/common/nav-buttons"; import { TOC } from "@/components/common/toc"; -const ContainerDiv = ({ children }: { children: React.ReactNode }) => ( -
{children}
-); - export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { const items: any[] = []; // todo: add items @aniketbiprojit @@ -21,10 +17,6 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { image = "/images/default-thumb-guides.png"; } - // Determine submenuPathToUse based on content path - const slug = doc.fields.slug ?? ""; - const submenuPathToUse = slug.startsWith("certification/") ? "/learning" : ""; - // Get prev/next URLs from frontmatter for NavButtons const prevUrl = doc.frontmatter.previousurl ?? ""; const nextUrl = doc.frontmatter.nexturl ?? ""; @@ -44,7 +36,7 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { activePage={doc.fields.slug} fallbackTitle={doc.frontmatter.title ?? ""} fallbackItems={items} - submenuPathToUse={submenuPathToUse} + submenuPathToUse="" /> From c343650648237e4df32f2310edaf724655dae03f Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 16:50:36 -0600 Subject: [PATCH 03/22] removing unused frontmatter. --- .../content/certification/study-guide-cms/00-intro.md | 11 ----------- .../certification/study-guide-cms/01-webops.md | 11 ----------- .../certification/study-guide-cms/02-platform.md | 11 ----------- 3 files changed, 33 deletions(-) diff --git a/src/source/content/certification/study-guide-cms/00-intro.md b/src/source/content/certification/study-guide-cms/00-intro.md index 437ca3b87a..47792cbbf1 100644 --- a/src/source/content/certification/study-guide-cms/00-intro.md +++ b/src/source/content/certification/study-guide-cms/00-intro.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/01-webops.md b/src/source/content/certification/study-guide-cms/01-webops.md index 186a20f423..9caf7ad08b 100644 --- a/src/source/content/certification/study-guide-cms/01-webops.md +++ b/src/source/content/certification/study-guide-cms/01-webops.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/02-platform.md b/src/source/content/certification/study-guide-cms/02-platform.md index 4fefe124a0..2bbfce97dc 100644 --- a/src/source/content/certification/study-guide-cms/02-platform.md +++ b/src/source/content/certification/study-guide-cms/02-platform.md @@ -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 --- From d32f7c4cddb00db471ca8eb4a25c33ebdfc5626c Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 16:54:44 -0600 Subject: [PATCH 04/22] removing unused frontmatter. --- src/source/content/certification/about.md | 3 --- src/source/content/certification/exam.md | 3 --- .../certification/study-guide-cms/03-create.md | 11 ----------- .../content/certification/study-guide-cms/04-cdn.md | 11 ----------- .../content/certification/study-guide-cms/05-cms.md | 11 ----------- .../certification/study-guide-cms/06-deploy.md | 11 ----------- .../certification/study-guide-cms/07-people.md | 11 ----------- .../certification/study-guide-cms/08-extend.md | 11 ----------- .../certification/study-guide-cms/09-automate.md | 11 ----------- .../study-guide-cms/10-custom-upstreams.md | 13 +------------ 10 files changed, 1 insertion(+), 95 deletions(-) diff --git a/src/source/content/certification/about.md b/src/source/content/certification/about.md index f79249e3d0..2398aeb280 100644 --- a/src/source/content/certification/about.md +++ b/src/source/content/certification/about.md @@ -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 --- diff --git a/src/source/content/certification/exam.md b/src/source/content/certification/exam.md index 9181270e34..b5639e7a9a 100644 --- a/src/source/content/certification/exam.md +++ b/src/source/content/certification/exam.md @@ -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 diff --git a/src/source/content/certification/study-guide-cms/03-create.md b/src/source/content/certification/study-guide-cms/03-create.md index 882a5fe414..be311c875e 100644 --- a/src/source/content/certification/study-guide-cms/03-create.md +++ b/src/source/content/certification/study-guide-cms/03-create.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/04-cdn.md b/src/source/content/certification/study-guide-cms/04-cdn.md index 0659fb2083..978c534b78 100644 --- a/src/source/content/certification/study-guide-cms/04-cdn.md +++ b/src/source/content/certification/study-guide-cms/04-cdn.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/05-cms.md b/src/source/content/certification/study-guide-cms/05-cms.md index af2cee8cde..71256688b9 100644 --- a/src/source/content/certification/study-guide-cms/05-cms.md +++ b/src/source/content/certification/study-guide-cms/05-cms.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/06-deploy.md b/src/source/content/certification/study-guide-cms/06-deploy.md index ecf2268a48..55b84533a9 100644 --- a/src/source/content/certification/study-guide-cms/06-deploy.md +++ b/src/source/content/certification/study-guide-cms/06-deploy.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/07-people.md b/src/source/content/certification/study-guide-cms/07-people.md index 900f8fcd3b..08474300c4 100644 --- a/src/source/content/certification/study-guide-cms/07-people.md +++ b/src/source/content/certification/study-guide-cms/07-people.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/08-extend.md b/src/source/content/certification/study-guide-cms/08-extend.md index b62a124b48..ecffee8436 100644 --- a/src/source/content/certification/study-guide-cms/08-extend.md +++ b/src/source/content/certification/study-guide-cms/08-extend.md @@ -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 --- diff --git a/src/source/content/certification/study-guide-cms/09-automate.md b/src/source/content/certification/study-guide-cms/09-automate.md index 7e7dc30773..1052c8bc90 100644 --- a/src/source/content/certification/study-guide-cms/09-automate.md +++ b/src/source/content/certification/study-guide-cms/09-automate.md @@ -2,19 +2,8 @@ title: WebOps Certification subtitle: "Chapter 9: Additional Automation" description: "Learn how to leverage Integrated Composer and Autopilot" -certificationpage: true -type: certificationpage -layout: certificationpage -showtoc: true -tags: [] permalink: docs/certification/study-guide/automate -contenttype: [guide] -innav: [false] -categories: [] cms: [drupal, wordpress] -audience: [] -product: [] -integration: [--] previousurl: /certification/study-guide/extend nexturl: /certification/study-guide/custom-upstreams --- diff --git a/src/source/content/certification/study-guide-cms/10-custom-upstreams.md b/src/source/content/certification/study-guide-cms/10-custom-upstreams.md index a9591517f8..acaeadba66 100644 --- a/src/source/content/certification/study-guide-cms/10-custom-upstreams.md +++ b/src/source/content/certification/study-guide-cms/10-custom-upstreams.md @@ -1,20 +1,9 @@ --- title: WebOps Certification subtitle: "Chapter 10: Custom Upstreams" -description: "Understand the relationship between Pantheon’s Core Upstreams, Custom Upstreams, and individual site repositories." -certificationpage: true -type: certificationpage -layout: certificationpage -showtoc: true -tags: [] +description: "Understand the relationship between Pantheon's Core Upstreams, Custom Upstreams, and individual site repositories." permalink: docs/certification/study-guide/custom-upstreams -contenttype: [guide] -innav: [false] -categories: [] cms: [drupal, wordpress] -audience: [] -product: [] -integration: [--] previousurl: /certification/study-guide/automate --- From 576eae05a2e6897881502fa03c0d1cbfd3d137dd Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 16:58:38 -0600 Subject: [PATCH 05/22] removing now unused code. --- src/lib/page-utils.ts | 2 +- src/lib/resolve-component.tsx | 6 -- src/templates/certification.tsx | 126 -------------------------------- 3 files changed, 1 insertion(+), 133 deletions(-) delete mode 100644 src/templates/certification.tsx diff --git a/src/lib/page-utils.ts b/src/lib/page-utils.ts index 7e02fed419..2ed8ccf98d 100644 --- a/src/lib/page-utils.ts +++ b/src/lib/page-utils.ts @@ -146,7 +146,7 @@ export type PageData = PageDataWithoutComponent & { /* 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" + defaultTemplate: "doc" | "terminuspage" | "video" ) => { if ( node.frontmatter && diff --git a/src/lib/resolve-component.tsx b/src/lib/resolve-component.tsx index 6406606ede..0f3d0984b1 100644 --- a/src/lib/resolve-component.tsx +++ b/src/lib/resolve-component.tsx @@ -52,12 +52,6 @@ export const resolveComponent = async ( Component: , template: "terminuspage", }; - } else if (template === "certificationpage") { - const Doc = await import(`@/templates/doc`); - return { - Component: , - template: "doc", - }; } else if (template === "video") { const Video = await import(`@/templates/guide`); return { diff --git a/src/templates/certification.tsx b/src/templates/certification.tsx deleted file mode 100644 index afd5095969..0000000000 --- a/src/templates/certification.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import Layout from "@/components/layout"; -import { OmniSidebarNav } from "@/components/omniSideBarNav"; -import { DocsSidebarLayout } from "@/components/pds-middleware/docs-sidebar-layout"; -import { ProcessedFile } from "@/server/processor/mdx"; -import SearchBar from "@/components/header/search-bar"; -import { MdxWrapper } from "@/components/ui/mdx-wrapper"; -import HeaderBody from "@/components/common/header-body"; -import NavButtons from "@/components/common/nav-buttons"; -import { TOC } from "@/components/common/toc"; - -const ContainerDiv = ({ children }: { children: React.ReactNode }) => ( -
{children}
-); - -const ContentLayoutType = ({ - children, - hasTOC, -}: { - children: React.ReactNode; - hasTOC: boolean; -}) => { - if (hasTOC) { - return ( - - {children} - - ); - } - - - return {children}; -}; - -export const CertificationTemplate = ({ - certification, -}: { - certification: ProcessedFile; -}) => { - const items: any[] = []; // todo: add items @aniketbiprojit - - const hasTOC = certification.frontmatter.showtoc ?? false; - - let image = "/images/" + certification.frontmatter.image; - if (image === "/images/null") { - image = "/images/default-thumb-guides.png"; - } - - return ( - - -
- -
- -
- -
- -
-
-
-
- - - -
-
-
- {hasTOC && ( -
- -
- )} -
-
-
-
- ); -}; From 3b685ff949f24f66858b43445777e91910799528 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 17:03:30 -0600 Subject: [PATCH 06/22] deleting unused code --- src/templates/doc.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index adb2194515..49efdee072 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -12,11 +12,6 @@ import { TOC } from "@/components/common/toc"; export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { const items: any[] = []; // todo: add items @aniketbiprojit - let image = "/images/" + doc.frontmatter.image; - if (image === "/images/null") { - image = "/images/default-thumb-guides.png"; - } - // Get prev/next URLs from frontmatter for NavButtons const prevUrl = doc.frontmatter.previousurl ?? ""; const nextUrl = doc.frontmatter.nexturl ?? ""; From 849c67a8f9e03442db6dc200f29569f4f3e08fb0 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 17:21:46 -0600 Subject: [PATCH 07/22] show TOC logic --- src/lib/resolve-component.tsx | 6 +++--- src/source/content/terminus/01-introduction.md | 7 +------ src/source/content/terminus/02-install.md | 6 ------ src/source/content/terminus/03-examples.md | 7 +------ src/source/content/terminus/04-commands.md | 7 +------ src/source/content/terminus/05-scripting.md | 7 +------ src/source/content/terminus/06-plugins.md | 7 +------ src/source/content/terminus/07-create.md | 7 +------ src/source/content/terminus/08-directory.md | 7 +------ src/source/content/terminus/09-configuration.md | 7 +------ src/source/content/terminus/10-supported-terminus.md | 7 +------ src/source/content/terminus/11-updates.md | 7 +------ src/source/content/terminus/12-terminus-3-0.md | 7 +------ src/source/content/terminus/13-terminus-4-0.md | 7 +------ src/source/content/terminus/ci/bitbucket.md | 7 +------ src/source/content/terminus/ci/circleci.md | 7 +------ src/source/content/terminus/ci/github-actions.md | 7 +------ src/source/content/terminus/ci/gitlab.md | 7 +------ src/templates/doc.tsx | 11 ++++++++--- 19 files changed, 27 insertions(+), 108 deletions(-) diff --git a/src/lib/resolve-component.tsx b/src/lib/resolve-component.tsx index 0f3d0984b1..45994fc132 100644 --- a/src/lib/resolve-component.tsx +++ b/src/lib/resolve-component.tsx @@ -47,10 +47,10 @@ export const resolveComponent = async ( template: "doc", }; } else if (template === "terminuspage") { - const Terminus = await import(`@/templates/terminus`); + const Doc = await import(`@/templates/doc`); return { - Component: , - template: "terminuspage", + Component: , + template: "doc", }; } else if (template === "video") { const Video = await import(`@/templates/guide`); diff --git a/src/source/content/terminus/01-introduction.md b/src/source/content/terminus/01-introduction.md index 6f33a4773a..b2d5578016 100644 --- a/src/source/content/terminus/01-introduction.md +++ b/src/source/content/terminus/01-introduction.md @@ -2,20 +2,15 @@ title: Terminus Guide subtitle: Introduction description: Learn about Terminus, the command line interface for advanced interaction with the Pantheon platform. -terminuspage: true -type: terminuspage -layout: terminuspage contributors: [whitneymeredith] -contenttype: [guide] -innav: [true] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus reviewed: "2020-02-05" +showtoc: false --- Terminus is a command line interface that provides advanced interaction with Pantheon. Terminus enables you to do almost everything in a terminal that you can do in the Dashboard, as well as scripting and much more. diff --git a/src/source/content/terminus/02-install.md b/src/source/content/terminus/02-install.md index 8a6397e416..ea411e37ce 100644 --- a/src/source/content/terminus/02-install.md +++ b/src/source/content/terminus/02-install.md @@ -2,19 +2,13 @@ title: Terminus Guide subtitle: Install and Update Terminus description: Learn how to install and update Terminus to your local computer. -terminuspage: true -type: terminuspage -layout: terminuspage contributors: [whitneymeredith,jazzsequence] tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/install -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] showtoc: true reviewed: "2025-07-22" --- diff --git a/src/source/content/terminus/03-examples.md b/src/source/content/terminus/03-examples.md index 935a179d42..5e25894789 100644 --- a/src/source/content/terminus/03-examples.md +++ b/src/source/content/terminus/03-examples.md @@ -2,19 +2,14 @@ title: Terminus Guide subtitle: Get Started description: Learn how to apply updates, deploy code, switch upstreams, and install Drush and WP-CLI with Terminus. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/examples -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] reviewed: "2025-01-23" +showtoc: false --- This section provides information on how to apply updates, deploy code, switch upstreams, and install Drush and WP-CLI with Terminus, as well as information on command structure and automatic site and environment detection. diff --git a/src/source/content/terminus/04-commands.md b/src/source/content/terminus/04-commands.md index ca751d68f3..dad5cfe41c 100644 --- a/src/source/content/terminus/04-commands.md +++ b/src/source/content/terminus/04-commands.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Command Directory description: Review a complete list of Terminus commands. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/commands -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- This section provides a comprehensive list of Terminus commands. diff --git a/src/source/content/terminus/05-scripting.md b/src/source/content/terminus/05-scripting.md index b319df9470..22cb2f6aa7 100644 --- a/src/source/content/terminus/05-scripting.md +++ b/src/source/content/terminus/05-scripting.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Scripting with Terminus description: Automate your workflow with scripting via Terminus. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/scripting -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- This section provides information on how to automate your workflow with Terminus scripting. diff --git a/src/source/content/terminus/06-plugins.md b/src/source/content/terminus/06-plugins.md index b219337936..82671c1506 100644 --- a/src/source/content/terminus/06-plugins.md +++ b/src/source/content/terminus/06-plugins.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Install Plugins description: Learn how to install plugins with Terminus. -terminuspage: true -type: terminuspage -layout: terminuspage -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/plugins +showtoc: false --- This section provides information on how to install plugins with Terminus, and how to add new commands through third-party plugins. diff --git a/src/source/content/terminus/07-create.md b/src/source/content/terminus/07-create.md index 410f75bc9d..8612c809f6 100644 --- a/src/source/content/terminus/07-create.md +++ b/src/source/content/terminus/07-create.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Create Terminus Plugins description: Learn how to create your own Terminus plugins. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/create -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- This section provides information on how to create Terminus plugins. diff --git a/src/source/content/terminus/08-directory.md b/src/source/content/terminus/08-directory.md index 1fc26c3a1c..0b97e9fd91 100644 --- a/src/source/content/terminus/08-directory.md +++ b/src/source/content/terminus/08-directory.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Plugin Directory description: A non-exclusive directory of plugins to extend Terminus features. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/directory -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- You can extend Terminus functionality and add commands by installing [third-party plugins](https://github.com/terminus-plugin-project) or by [creating your own plugins](/terminus/create). diff --git a/src/source/content/terminus/09-configuration.md b/src/source/content/terminus/09-configuration.md index f44bc1ac9f..89f27263e5 100644 --- a/src/source/content/terminus/09-configuration.md +++ b/src/source/content/terminus/09-configuration.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Terminus Configuration File description: Learn how to configure your local Terminus configuration file. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/configuration -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- This section provides information on how to configure your local Terminus configuration file. diff --git a/src/source/content/terminus/10-supported-terminus.md b/src/source/content/terminus/10-supported-terminus.md index db9ead42a8..8dee36299c 100644 --- a/src/source/content/terminus/10-supported-terminus.md +++ b/src/source/content/terminus/10-supported-terminus.md @@ -2,19 +2,14 @@ title: Terminus Guide subtitle: Supported Terminus and PHP Versions description: Learn which versions of Terminus and PHP are currently supported. -terminuspage: true -type: terminuspage -layout: terminuspage contributors: [wordsmither] tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/supported-terminus -contenttype: [guide] -innav: [false] categories: [git] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- Each major and minor version of Terminus is fully supported for one year from the release of the subsequent version. During the supported period, serious bugs and security issues that have been reported are fixed in patch releases. Refer to the documentation on [Semantic Versioning](https://semver.org/) for more information on versioning. diff --git a/src/source/content/terminus/11-updates.md b/src/source/content/terminus/11-updates.md index 52f74a1607..2139e771f3 100644 --- a/src/source/content/terminus/11-updates.md +++ b/src/source/content/terminus/11-updates.md @@ -2,18 +2,13 @@ title: Terminus Guide subtitle: Terminus Changelog description: Stay up to date on the latest Terminus version. -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/updates -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- ## Changelog diff --git a/src/source/content/terminus/12-terminus-3-0.md b/src/source/content/terminus/12-terminus-3-0.md index ac039bb701..88a35ece52 100644 --- a/src/source/content/terminus/12-terminus-3-0.md +++ b/src/source/content/terminus/12-terminus-3-0.md @@ -2,19 +2,14 @@ title: Terminus Guide subtitle: Terminus 3 description: Learn what's new with the latest Terminus major version upgrade. -terminuspage: true -type: terminuspage -layout: terminuspage contributors: [greg-1-anderson] tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/terminus-3-0 -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- This section provides information about Terminus 3.0. Terminus 3.0 is the most recent major version of Terminus and is recommended in place of Terminus 2.0. diff --git a/src/source/content/terminus/13-terminus-4-0.md b/src/source/content/terminus/13-terminus-4-0.md index 94b6a034a8..5412508d17 100644 --- a/src/source/content/terminus/13-terminus-4-0.md +++ b/src/source/content/terminus/13-terminus-4-0.md @@ -2,19 +2,14 @@ title: Terminus Guide subtitle: Terminus 4 description: Learn what's new with the latest Terminus major version upgrade. -terminuspage: true -type: terminuspage -layout: terminuspage contributors: [kporras07] tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/terminus-4-0 -contenttype: [guide] -innav: [false] categories: [cli] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] +showtoc: false --- This section provides information about Terminus 4.0. Terminus 4.0 is the most recent major version of Terminus and is recommended in place of Terminus 3.x. diff --git a/src/source/content/terminus/ci/bitbucket.md b/src/source/content/terminus/ci/bitbucket.md index ea087b8690..95f3f448d4 100644 --- a/src/source/content/terminus/ci/bitbucket.md +++ b/src/source/content/terminus/ci/bitbucket.md @@ -4,18 +4,13 @@ subtitle: Authenticate Terminus in a Bitbucket CI Pipeline description: Learn how to authenticate Terminus in a Bitbucket CI pipeline without receiving errors. permalink: docs/terminus/ci/bitbucket contributors: [stovak] -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] -contenttype: [guide] -innav: [false] categories: [automate] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] reviewed: "2023-06-08" +showtoc: false --- This section provides information on how to to authenticate Terminus in a Bitbucket CI pipeline without receiving errors and avoiding authentication rate limits. diff --git a/src/source/content/terminus/ci/circleci.md b/src/source/content/terminus/ci/circleci.md index 9e429d815b..cc8e110cda 100644 --- a/src/source/content/terminus/ci/circleci.md +++ b/src/source/content/terminus/ci/circleci.md @@ -3,19 +3,14 @@ title: Terminus Guide subtitle: Authenticate Terminus in a CircleCI Pipeline description: Learn how to authenticate Terminus in a CircleCI pipeline without errors. contributors: [stovak] -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] permalink: docs/terminus/ci/circleci -contenttype: [guide] -innav: [false] categories: [automate] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] reviewed: "2023-06-08" +showtoc: false --- This section provides information on how to authenticate Terminus in a CircleCI pipeline without receiving errors and avoiding authentication rate limits. diff --git a/src/source/content/terminus/ci/github-actions.md b/src/source/content/terminus/ci/github-actions.md index 0420fac3ea..89378d524f 100644 --- a/src/source/content/terminus/ci/github-actions.md +++ b/src/source/content/terminus/ci/github-actions.md @@ -4,18 +4,13 @@ subtitle: Authenticate Terminus in a GitHub Actions Pipeline description: Learn how to authenticate Terminus in a GitHub Actions CI pipeline without receiving errors. permalink: docs/terminus/ci/github-actions contributors: [stovak] -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] -contenttype: [guide] -innav: [false] categories: [automate] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] reviewed: "2025-12-10" +showtoc: false --- This section provides information on how to to authenticate Terminus in a GitHub Actions CI pipeline without receiving errors and avoiding authentication rate limits. diff --git a/src/source/content/terminus/ci/gitlab.md b/src/source/content/terminus/ci/gitlab.md index d1499798e9..84c0374340 100644 --- a/src/source/content/terminus/ci/gitlab.md +++ b/src/source/content/terminus/ci/gitlab.md @@ -4,18 +4,13 @@ subtitle: Authenticate Terminus in a GitLab Pipeline description: Learn how to authenticate Terminus in a GitLab CI pipeline without receiving errors. permalink: docs/terminus/ci/gitlab contributors: [stovak] -terminuspage: true -type: terminuspage -layout: terminuspage tags: [reference, cli, local, terminus, workflow] -contenttype: [guide] -innav: [false] categories: [automate] cms: [drupal, wordpress] audience: [development] product: [terminus] -integration: [--] reviewed: "2023-06-08" +showtoc: false --- This section provides information on how to to authenticate Terminus in a GitLab CI pipeline without receiving errors and avoiding authentication rate limits. diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index 49efdee072..957cb7c32a 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -16,6 +16,9 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { const prevUrl = doc.frontmatter.previousurl ?? ""; const nextUrl = doc.frontmatter.nexturl ?? ""; + // Show TOC by default, but allow hiding via frontmatter + const hasTOC = doc.frontmatter.showtoc ?? true; + return ( { -
- -
+ {hasTOC && ( +
+ +
+ )}
From 7c0c5f88cf18e916b3f5c9df79efb31c8064e803 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 17:25:32 -0600 Subject: [PATCH 08/22] width handling with sidebar --- src/templates/doc.tsx | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index 957cb7c32a..4cfa08ae76 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -8,6 +8,33 @@ import HeaderBody from "@/components/common/header-body"; import NavButtons from "@/components/common/nav-buttons"; import { TOC } from "@/components/common/toc"; +const ContainerDiv = ({ children }: { children: React.ReactNode }) => ( +
{children}
+); + +const ContentLayoutType = ({ + children, + hasTOC, +}: { + children: React.ReactNode; + hasTOC: boolean; +}) => { + if (hasTOC) { + return ( + + {children} + + ); + } + + return {children}; +}; export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { const items: any[] = []; // todo: add items @aniketbiprojit @@ -39,13 +66,7 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => {
- +
@@ -89,7 +110,7 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => {
)} - +
From 78d370a42d18dd9769f2e46ea744b2cb6f8311fe Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 17:28:25 -0600 Subject: [PATCH 09/22] deleting unused terminus template code --- src/lib/page-utils.ts | 2 +- src/lib/resolve-component.tsx | 6 -- src/templates/terminus.tsx | 114 ---------------------------------- 3 files changed, 1 insertion(+), 121 deletions(-) delete mode 100644 src/templates/terminus.tsx diff --git a/src/lib/page-utils.ts b/src/lib/page-utils.ts index 2ed8ccf98d..e8c8628548 100644 --- a/src/lib/page-utils.ts +++ b/src/lib/page-utils.ts @@ -146,7 +146,7 @@ export type PageData = PageDataWithoutComponent & { /* This helper function helps determine which template should be applied to a piece of content */ export const calculateTemplate = ( node: ProcessedFile, - defaultTemplate: "doc" | "terminuspage" | "video" + defaultTemplate: "doc" | "video" ) => { if ( node.frontmatter && diff --git a/src/lib/resolve-component.tsx b/src/lib/resolve-component.tsx index 45994fc132..505448db6c 100644 --- a/src/lib/resolve-component.tsx +++ b/src/lib/resolve-component.tsx @@ -46,12 +46,6 @@ export const resolveComponent = async ( Component: , template: "doc", }; - } else if (template === "terminuspage") { - const Doc = await import(`@/templates/doc`); - return { - Component: , - template: "doc", - }; } else if (template === "video") { const Video = await import(`@/templates/guide`); return { diff --git a/src/templates/terminus.tsx b/src/templates/terminus.tsx deleted file mode 100644 index 7d8fde5698..0000000000 --- a/src/templates/terminus.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import Layout from "@/components/layout"; -import { OmniSidebarNav } from "@/components/omniSideBarNav"; -import { DocsSidebarLayout } from "@/components/pds-middleware/docs-sidebar-layout"; -import { ProcessedFile } from "@/server/processor/mdx"; -import SearchBar from "@/components/header/search-bar"; -import { MdxWrapper } from "@/components/ui/mdx-wrapper"; -import HeaderBody from "@/components/common/header-body"; -import { TOC } from "@/components/common/toc"; - -const ContainerDiv = ({ children }: { children: React.ReactNode }) => ( -
{children}
-); - -const ContentLayoutType = ({ - children, - hasTOC, -}: { - children: React.ReactNode; - hasTOC: boolean; -}) => { - if (hasTOC) { - return ( - - {children} - - ); - } - - return {children}; -}; - -export const TerminusTemplate = ({ terminus }: { terminus: ProcessedFile }) => { - const items: any[] = []; // todo: add items @aniketbiprojit - - const hasTOC = terminus.frontmatter.showtoc ?? false; - - let image = "/images/" + terminus.frontmatter.image; - if (image === "/images/null") { - image = "/images/default-thumb-guides.png"; - } - - return ( - - -
- -
- -
- -
- -
-
-
-
- - -
-
-
- {hasTOC && ( -
- -
- )} -
-
-
-
- ); -}; From d829b1e6e6904da79e1fe250ac9c326d96613dda Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 17:40:21 -0600 Subject: [PATCH 10/22] deleting unused code in omniSideBarNav --- src/components/omniSideBarNav.tsx | 19 +------------------ src/templates/doc.tsx | 6 ------ src/templates/guide.tsx | 6 ------ src/templates/landing.tsx | 4 ---- 4 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/components/omniSideBarNav.tsx b/src/components/omniSideBarNav.tsx index 7d4f8e35fc..c9330af8c4 100644 --- a/src/components/omniSideBarNav.tsx +++ b/src/components/omniSideBarNav.tsx @@ -5,23 +5,16 @@ import { } 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; + submenuPathToUse?: string; }) => { const OmniItems = await getOmniItems(); @@ -63,16 +56,6 @@ export const OmniSidebarNav = async ({ menuItems={OmniLinks.links} /> ); - } else if (fallbackItems && fallbackItems.length > 0) { - return ( - <> - - - ); } else { return
; } diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index 4cfa08ae76..80ea392aa3 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -37,8 +37,6 @@ const ContentLayoutType = ({ }; export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { - const items: any[] = []; // todo: add items @aniketbiprojit - // Get prev/next URLs from frontmatter for NavButtons const prevUrl = doc.frontmatter.previousurl ?? ""; const nextUrl = doc.frontmatter.nexturl ?? ""; @@ -57,11 +55,7 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { >
diff --git a/src/templates/guide.tsx b/src/templates/guide.tsx index 9e0df04cbd..aeeb63d6d7 100644 --- a/src/templates/guide.tsx +++ b/src/templates/guide.tsx @@ -45,8 +45,6 @@ export const GuideTemplate = ({ guide: ProcessedFile; next: null | { fields: { slug: string; guide_directory: string } }; }) => { - const items: any[] = []; // todo: add items @aniketbiprojit - const hasTOC = guide.frontmatter.showtoc ?? false; let image = "/images/" + guide.frontmatter.image; @@ -65,11 +63,7 @@ export const GuideTemplate = ({ >
diff --git a/src/templates/landing.tsx b/src/templates/landing.tsx index 439083869d..94e03fcb92 100644 --- a/src/templates/landing.tsx +++ b/src/templates/landing.tsx @@ -90,11 +90,7 @@ export const LandingTemplate = ({ topic }: { topic: Landing }) => { >
From 09384db0339d9fbc3254fca5b7ad8508d84b706e Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 30 Dec 2025 17:42:49 -0600 Subject: [PATCH 11/22] removing unused code --- src/components/omniSideBarNav.tsx | 34 ++----------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/components/omniSideBarNav.tsx b/src/components/omniSideBarNav.tsx index c9330af8c4..66950239f2 100644 --- a/src/components/omniSideBarNav.tsx +++ b/src/components/omniSideBarNav.tsx @@ -1,8 +1,5 @@ "use server"; -import { - findSubMenuItemsToUse, - getOmniSidebarActiveSection, -} from "./omni-components/helpers"; +import { getOmniSidebarActiveSection } from "./omni-components/helpers"; import { SideNavCompact } from "./ui/pds-re-export"; import { MOBILE_MENU_BREAKPOINT } from "@/constants"; @@ -11,41 +8,14 @@ import { turnItemsIntoLinks } from "./omni-components/client-helper"; export const OmniSidebarNav = async ({ activePage, - submenuPathToUse = "", }: { activePage: string; - submenuPathToUse?: 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 ( - - ); - } else if (menuItems) { + if (menuItems) { const OmniLinks = turnItemsIntoLinks(menuItems, activePage); return ( Date: Tue, 30 Dec 2025 18:12:08 -0600 Subject: [PATCH 12/22] removing extraneous guide and video template --- src/lib/page-utils.ts | 15 --- src/lib/resolve-component.tsx | 41 ++---- src/source/content/cache.md | 2 - .../guides/launch/02-create-site-launch.md | 3 +- src/templates/doc.tsx | 22 +++- src/templates/guide.tsx | 121 ------------------ 6 files changed, 27 insertions(+), 177 deletions(-) delete mode 100644 src/templates/guide.tsx diff --git a/src/lib/page-utils.ts b/src/lib/page-utils.ts index e8c8628548..0ede8c97e1 100644 --- a/src/lib/page-utils.ts +++ b/src/lib/page-utils.ts @@ -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" | "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("/")) { diff --git a/src/lib/resolve-component.tsx b/src/lib/resolve-component.tsx index 505448db6c..0ffc7d2d4e 100644 --- a/src/lib/resolve-component.tsx +++ b/src/lib/resolve-component.tsx @@ -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; @@ -38,43 +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: , - template: "doc", - }; - } else if (template === "video") { - const Video = await import(`@/templates/guide`); - return { - Component: ( - - ), - template: "video", - }; - } else { - const Doc = await import(`@/templates/doc`); - return { - Component: , - template: "doc", - }; - } + const Doc = await import(`@/templates/doc`); + return { + Component: , + template: "doc", + }; } case "guide": { - const Guide = await import(`@/templates/guide`); + const Doc = await import(`@/templates/doc`); return { Component: ( - ), template: "guide", diff --git a/src/source/content/cache.md b/src/source/content/cache.md index 3a0b73f668..bdf4ce7c01 100644 --- a/src/source/content/cache.md +++ b/src/source/content/cache.md @@ -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] diff --git a/src/source/content/guides/launch/02-create-site-launch.md b/src/source/content/guides/launch/02-create-site-launch.md index 8be48f69e6..75434bfe42 100644 --- a/src/source/content/guides/launch/02-create-site-launch.md +++ b/src/source/content/guides/launch/02-create-site-launch.md @@ -4,7 +4,6 @@ subtitle: Create Your Site on Pantheon description: Learn how to create your site on Pantheon. tags: [cms,] contributors: [whitneymeredith] -showtoc: true permalink: docs/guides/launch/create-site-launch contenttype: [guide] innav: [false] @@ -16,7 +15,7 @@ integration: [--] image: launchGuide-twitterLarge.png --- -This section provides information on how to create your Live environment. +This section provides information on how to create your Live environment. 1. [Create a New Site](/guides/getstarted/addsite/). diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index 80ea392aa3..a14de0ba07 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -36,13 +36,23 @@ const ContentLayoutType = ({ return {children}; }; -export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { - // Get prev/next URLs from frontmatter for NavButtons - const prevUrl = doc.frontmatter.previousurl ?? ""; - const nextUrl = doc.frontmatter.nexturl ?? ""; +export const DocTemplate = ({ + doc, + prev, + next, + tocDefault = true, +}: { + doc: ProcessedFile; + prev?: { fields: { slug: string } } | null; + next?: { fields: { slug: string } } | null; + tocDefault?: boolean; +}) => { + // Use props if provided, otherwise fall back to frontmatter + const prevUrl = prev?.fields.slug ?? doc.frontmatter.previousurl ?? ""; + const nextUrl = next?.fields.slug ?? doc.frontmatter.nexturl ?? ""; - // Show TOC by default, but allow hiding via frontmatter - const hasTOC = doc.frontmatter.showtoc ?? true; + // Use frontmatter if set, otherwise use the default for this content type + const hasTOC = doc.frontmatter.showtoc ?? tocDefault; return ( diff --git a/src/templates/guide.tsx b/src/templates/guide.tsx deleted file mode 100644 index aeeb63d6d7..0000000000 --- a/src/templates/guide.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import Layout from "@/components/layout"; -import { OmniSidebarNav } from "@/components/omniSideBarNav"; -import { DocsSidebarLayout } from "@/components/pds-middleware/docs-sidebar-layout"; -import { ProcessedFile } from "@/server/processor/mdx"; -import SearchBar from "@/components/header/search-bar"; -import { MdxWrapper } from "@/components/ui/mdx-wrapper"; -import HeaderBody from "@/components/common/header-body"; -import NavButtons from "@/components/common/nav-buttons"; -import { TOC } from "@/components/common/toc"; - -const ContainerDiv = ({ children }: { children: React.ReactNode }) => ( -
{children}
-); - -const ContentLayoutType = ({ - children, - hasTOC, -}: { - children: React.ReactNode; - hasTOC: boolean; -}) => { - if (hasTOC) { - return ( - - {children} - - ); - } - - return {children}; -}; - -export const GuideTemplate = ({ - guide, - prev, - next, -}: { - prev: null | { fields: { slug: string; guide_directory: string } }; - guide: ProcessedFile; - next: null | { fields: { slug: string; guide_directory: string } }; -}) => { - const hasTOC = guide.frontmatter.showtoc ?? false; - - let image = "/images/" + guide.frontmatter.image; - if (image === "/images/null") { - image = "/images/default-thumb-guides.png"; - } - - return ( - - -
- -
- -
- -
- -
-
-
-
- - - -
-
-
- {hasTOC && ( -
- -
- )} -
-
-
-
- ); -}; From fb218b11a30321e0b3aa66808bd0a3cfd6c34236 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 08:44:50 -0600 Subject: [PATCH 13/22] variable for site name --- .github/workflows/auto-tag.yml | 2 +- .github/workflows/pr-e2e.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 2f01367474..d898aa7bd1 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -30,4 +30,4 @@ jobs: with: expected_sha: ${{ github.sha }} target_env: live - pantheon_site_machine_name: documentation-in-nextjs + pantheon_site_machine_name: ${{ vars.PANTHEON_SITE_MACHINE_NAME }} diff --git a/.github/workflows/pr-e2e.yml b/.github/workflows/pr-e2e.yml index 3bc31ed08f..c09d107ec1 100644 --- a/.github/workflows/pr-e2e.yml +++ b/.github/workflows/pr-e2e.yml @@ -22,14 +22,14 @@ jobs: with: expected_sha: ${{ github.event.pull_request.head.sha }} target_env: pr-${{ github.event.pull_request.number }} - pantheon_site_machine_name: documentation-in-nextjs + pantheon_site_machine_name: ${{ vars.PANTHEON_SITE_MACHINE_NAME }} - name: warm containers id: warm_containers shell: bash env: - REFERENCE_BASE_URL: "https://dev-documentation-in-nextjs.pantheonsite.io" - DEPLOYED_BASE_URL: "https://pr-${{ github.event.pull_request.number }}-documentation-in-nextjs.pantheonsite.io" + REFERENCE_BASE_URL: "https://dev-${{ vars.PANTHEON_SITE_MACHINE_NAME }}.pantheonsite.io" + DEPLOYED_BASE_URL: "https://pr-${{ github.event.pull_request.number }}-${{ vars.PANTHEON_SITE_MACHINE_NAME }}.pantheonsite.io" run: | #!/bin/bash set +e @@ -54,7 +54,7 @@ jobs: - name: Check all status codes env: PR_NUMBER: ${{ github.event.pull_request.number }} - SITE_NAME: "documentation-in-nextjs" + SITE_NAME: "${{ vars.PANTHEON_SITE_MACHINE_NAME }}" run: | cd tests/404checking export URL="https://pr-${PR_NUMBER}-${SITE_NAME}.pantheonsite.io" @@ -86,8 +86,8 @@ jobs: id: backstop_tests shell: bash env: - REFERENCE_BASE_URL: "https://dev-documentation-in-nextjs.pantheonsite.io" - DEPLOYED_BASE_URL: "https://pr-${{ github.event.pull_request.number }}-documentation-in-nextjs.pantheonsite.io" + REFERENCE_BASE_URL: "https://dev-${{ vars.PANTHEON_SITE_MACHINE_NAME }}.pantheonsite.io" + DEPLOYED_BASE_URL: "https://pr-${{ github.event.pull_request.number }}-${{ vars.PANTHEON_SITE_MACHINE_NAME }}.pantheonsite.io" run: | #!/bin/bash set +e @@ -125,7 +125,7 @@ jobs: id: playwright_tests shell: bash env: - PLAYWRIGHT_DOMAIN: "pr-${{ github.event.pull_request.number }}-documentation-in-nextjs.pantheonsite.io" + PLAYWRIGHT_DOMAIN: "pr-${{ github.event.pull_request.number }}-${{ vars.PANTHEON_SITE_MACHINE_NAME }}.pantheonsite.io" run: | #!/bin/bash set +e From 81919661a7794745ed663720369045f6265c30a1 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 09:07:46 -0600 Subject: [PATCH 14/22] fixing flaky test --- tests/playwright/tests/search/search.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/tests/search/search.spec.ts b/tests/playwright/tests/search/search.spec.ts index 9fcdaad11f..5db3df5f50 100644 --- a/tests/playwright/tests/search/search.spec.ts +++ b/tests/playwright/tests/search/search.spec.ts @@ -43,7 +43,7 @@ test('searching from homepage redirects to search page and shows expected result await page.waitForSelector('#results .addsearch-searchresults'); - const expectedPolicyHeadline = ' Overages Policy | Traffic | Pantheon Docs'; + const expectedPolicyHeadline = ' Overages Policy | Pantheon Docs'; const h3s1 = await page.locator('h3').allTextContents(); expect(h3s1.some(text => text.includes(expectedPolicyHeadline))).toBeTruthy(); }); From da8bfc44a2be76b0e2965ec11a98a28602433de4 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 10:04:29 -0600 Subject: [PATCH 15/22] adding variable for site machine name --- src/middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware.ts b/src/middleware.ts index e0622be0b9..1b9689ddbe 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -226,7 +226,7 @@ export function middleware(request: NextRequest) { // This section handles the HTTP to HTTPS redirects for Pantheon sites. // See https://github.com/pantheon-systems/documentation/issues/9791 // for more context. - const siteMachineName = "documentation-in-nextjs"; + const siteMachineName = process.env.PANTHEON_SITE_MACHINE_NAME || "documentation-in-nextjs"; const incomingProtocol = request.headers.get('x-proto') || ''; const policyDocSurrogateKey = request.headers.get('policy-doc-surrogate-key') || ''; if (incomingProtocol === 'http://' && policyDocSurrogateKey) { From 23155dac1a64e4f7ccc70b3168270ea20a2eaf84 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 10:39:09 -0600 Subject: [PATCH 16/22] use onmi nav on terminus commands --- src/templates/terminus-command.tsx | 75 +----------------------------- 1 file changed, 2 insertions(+), 73 deletions(-) diff --git a/src/templates/terminus-command.tsx b/src/templates/terminus-command.tsx index 71673a3bfc..142dbbfadd 100644 --- a/src/templates/terminus-command.tsx +++ b/src/templates/terminus-command.tsx @@ -1,4 +1,5 @@ import Layout from "@/components/layout"; +import { OmniSidebarNav } from "@/components/omniSideBarNav"; import { DocsSidebarLayout } from "@/components/pds-middleware/docs-sidebar-layout"; import SearchBar from "@/components/header/search-bar"; import HeaderBody from "@/components/common/header-body"; @@ -7,7 +8,6 @@ import { CommandType } from "@/components/common/commands/types"; import { Partial } from "@/components/common/partial-component"; import Link from "next/link"; import { Pre } from "@/components/ui/mdx-wrapper/pre"; -import { Navbar } from "@/components/common/navbar"; const ContainerDiv = ({ children }: { children: React.ReactNode }) => (
{children}
@@ -37,75 +37,6 @@ const ContentLayoutType = ({ return {children}; }; -// @TODO relocate this list -// - To a YAML file and use GraphQL to pull data. -// - To a GraphQL query order by frontmatter weight/order/index field. -const items = [ - { - id: "docs-terminus", - link: "/terminus", - title: "Introduction", - }, - { - id: "docs-terminus-install", - link: "/terminus/install", - title: "Install Terminus", - }, - { - id: "docs-terminus-examples", - link: "/terminus/examples", - title: "Get Started", - }, - { - id: "docs-terminus-commands", - link: "/terminus/commands", - title: "Command Directory", - }, - { - id: "docs-terminus-scripting", - link: "/terminus/scripting", - title: "Scripting with Terminus", - }, - { - id: "docs-terminus-plugins", - link: "/terminus/plugins", - title: "Install Plugins", - }, - { - id: "docs-terminus-directory", - link: "/terminus/directory", - title: "Plugin Directory", - }, - { - id: "docs-terminus-create", - link: "/terminus/create", - title: "Create Terminus Plugins", - }, - { - id: "docs-terminus-configuration", - link: "/terminus/configuration", - title: "Terminus Configuration File", - }, - - { - id: "docs-supported-terminus", - link: "/terminus/supported-terminus", - title: "Supported Terminus and PHP Versions", - }, - - { - id: "docs-terminus-updates", - link: "/terminus/updates", - title: "Terminus Changelog", - }, - - { - id: "docs-terminus-terminus-4-0", - link: "/terminus/terminus-4-0", - title: "Terminus 4", - }, -]; - export const TerminusCommandTemplate = ({ command, slug, @@ -137,9 +68,7 @@ export const TerminusCommandTemplate = ({ className="pds-container pds-container--x-wide" >
-
From 44ef66a51b0da08bdbcf5fc9fb9c8809df846fe9 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 11:22:48 -0600 Subject: [PATCH 17/22] Update pr-e2e.yml --- .github/workflows/pr-e2e.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-e2e.yml b/.github/workflows/pr-e2e.yml index c09d107ec1..f0fafaf31b 100644 --- a/.github/workflows/pr-e2e.yml +++ b/.github/workflows/pr-e2e.yml @@ -140,6 +140,7 @@ jobs: vitest: runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 From abf972f21ff7d3f821e862be0dcb9782c245741f Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 11:43:03 -0600 Subject: [PATCH 18/22] adding logging --- src/middleware.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/middleware.ts b/src/middleware.ts index 1b9689ddbe..cc2ead8310 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -227,6 +227,9 @@ export function middleware(request: NextRequest) { // See https://github.com/pantheon-systems/documentation/issues/9791 // for more context. const siteMachineName = process.env.PANTHEON_SITE_MACHINE_NAME || "documentation-in-nextjs"; + +console.log('the siteMachineName is:' + siteMachineName) + const incomingProtocol = request.headers.get('x-proto') || ''; const policyDocSurrogateKey = request.headers.get('policy-doc-surrogate-key') || ''; if (incomingProtocol === 'http://' && policyDocSurrogateKey) { From 89b427a3f6c13bb70d7635196ed6693844d58719 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 12:19:05 -0600 Subject: [PATCH 19/22] more debugging --- src/middleware.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/middleware.ts b/src/middleware.ts index cc2ead8310..5d94595666 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -228,10 +228,15 @@ export function middleware(request: NextRequest) { // for more context. const siteMachineName = process.env.PANTHEON_SITE_MACHINE_NAME || "documentation-in-nextjs"; -console.log('the siteMachineName is:' + siteMachineName) +console.log('the siteMachineName is: ' + siteMachineName) const incomingProtocol = request.headers.get('x-proto') || ''; const policyDocSurrogateKey = request.headers.get('policy-doc-surrogate-key') || ''; + +console.log('the incoming protocol is: ' + incomingProtocol) +console.log('the policy doc surrogate key is: ' + policyDocSurrogateKey); + + if (incomingProtocol === 'http://' && policyDocSurrogateKey) { if (policyDocSurrogateKey.trim().endsWith(siteMachineName + '.pantheonsite.io')) { url.protocol = "https:"; From 2e7093963a98c8180b0a39d456897fcdd462b430 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 12:54:41 -0600 Subject: [PATCH 20/22] whitespace to retrigger build --- src/middleware.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/middleware.ts b/src/middleware.ts index 5d94595666..a482ec75ca 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -236,7 +236,6 @@ console.log('the siteMachineName is: ' + siteMachineName) console.log('the incoming protocol is: ' + incomingProtocol) console.log('the policy doc surrogate key is: ' + policyDocSurrogateKey); - if (incomingProtocol === 'http://' && policyDocSurrogateKey) { if (policyDocSurrogateKey.trim().endsWith(siteMachineName + '.pantheonsite.io')) { url.protocol = "https:"; From 2e6b46c2c1fbff9adace3f9c61a8bc9ea1f7b498 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 13:14:20 -0600 Subject: [PATCH 21/22] removing extra debugging --- src/middleware.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/middleware.ts b/src/middleware.ts index a482ec75ca..1b9689ddbe 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -227,15 +227,8 @@ export function middleware(request: NextRequest) { // See https://github.com/pantheon-systems/documentation/issues/9791 // for more context. const siteMachineName = process.env.PANTHEON_SITE_MACHINE_NAME || "documentation-in-nextjs"; - -console.log('the siteMachineName is: ' + siteMachineName) - const incomingProtocol = request.headers.get('x-proto') || ''; const policyDocSurrogateKey = request.headers.get('policy-doc-surrogate-key') || ''; - -console.log('the incoming protocol is: ' + incomingProtocol) -console.log('the policy doc surrogate key is: ' + policyDocSurrogateKey); - if (incomingProtocol === 'http://' && policyDocSurrogateKey) { if (policyDocSurrogateKey.trim().endsWith(siteMachineName + '.pantheonsite.io')) { url.protocol = "https:"; From ba5271b9e5e2e37c0e8bbad6ac927103fea08974 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 31 Dec 2025 13:38:27 -0600 Subject: [PATCH 22/22] Update pr-e2e.yml --- .github/workflows/pr-e2e.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-e2e.yml b/.github/workflows/pr-e2e.yml index f0fafaf31b..c09d107ec1 100644 --- a/.github/workflows/pr-e2e.yml +++ b/.github/workflows/pr-e2e.yml @@ -140,7 +140,6 @@ jobs: vitest: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4