diff --git a/src/components/omniSideBarNav.tsx b/src/components/omniSideBarNav.tsx index 7d4f8e35fc..66950239f2 100644 --- a/src/components/omniSideBarNav.tsx +++ b/src/components/omniSideBarNav.tsx @@ -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 ( - - ); - } else if (menuItems) { + if (menuItems) { const OmniLinks = turnItemsIntoLinks(menuItems, activePage); return ( ); - } else if (fallbackItems && fallbackItems.length > 0) { - return ( - <> - - - ); } else { return
; } diff --git a/src/lib/page-utils.ts b/src/lib/page-utils.ts index 7e02fed419..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" | "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("/")) { diff --git a/src/lib/resolve-component.tsx b/src/lib/resolve-component.tsx index a3c49ec160..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,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: , - template: "doc", - }; - } else if (template === "terminuspage") { - const Terminus = await import(`@/templates/terminus`); - return { - Component: , - template: "terminuspage", - }; - } else if (template === "certificationpage") { - const Certification = await import(`@/templates/certification`); - return { - Component: ( - - ), - template: "certification", - }; - } 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/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/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 --- 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 --- 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/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 87da7efe3e..81d00a991b 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/certification.tsx b/src/templates/certification.tsx deleted file mode 100644 index 4a95d799b8..0000000000 --- a/src/templates/certification.tsx +++ /dev/null @@ -1,125 +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 && ( -
- -
- )} -
-
-
-
- ); -}; diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index c79fd0c31c..a14de0ba07 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -5,20 +5,55 @@ 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 - - let image = "/images/" + doc.frontmatter.image; - if (image === "/images/null") { - image = "/images/default-thumb-guides.png"; +const ContentLayoutType = ({ + children, + hasTOC, +}: { + children: React.ReactNode; + hasTOC: boolean; +}) => { + if (hasTOC) { + return ( + + {children} + + ); } + return {children}; +}; + +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 ?? ""; + + // Use frontmatter if set, otherwise use the default for this content type + const hasTOC = doc.frontmatter.showtoc ?? tocDefault; + return ( { >
- +
@@ -78,13 +103,18 @@ export const DocTemplate = ({ doc }: { doc: ProcessedFile }) => { }} componentMap={{}} /> + {(prevUrl || nextUrl) && ( + + )}
-
- -
-
+ {hasTOC && ( +
+ +
+ )} +
diff --git a/src/templates/guide.tsx b/src/templates/guide.tsx deleted file mode 100644 index 9e0df04cbd..0000000000 --- a/src/templates/guide.tsx +++ /dev/null @@ -1,127 +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 items: any[] = []; // todo: add items @aniketbiprojit - - const hasTOC = guide.frontmatter.showtoc ?? false; - - let image = "/images/" + guide.frontmatter.image; - if (image === "/images/null") { - image = "/images/default-thumb-guides.png"; - } - - return ( - - -
- -
- -
- -
- -
-
-
-
- - - -
-
-
- {hasTOC && ( -
- -
- )} -
-
-
-
- ); -}; 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 }) => { >
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" >
-
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 && ( -
- -
- )} -
-
-
-
- ); -};