From d119fd79754b7d2366e4f037bb683dfb3ac07c4f Mon Sep 17 00:00:00 2001 From: Niji Date: Mon, 13 Jan 2025 15:37:23 -0800 Subject: [PATCH 1/3] feat: rename tp templates to examples --- docs/traffic-policy/{templates => examples}/index.mdx | 6 +++--- sidebars.js | 6 +++--- static/scripts/fix-redirect.js | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) rename docs/traffic-policy/{templates => examples}/index.mdx (96%) diff --git a/docs/traffic-policy/templates/index.mdx b/docs/traffic-policy/examples/index.mdx similarity index 96% rename from docs/traffic-policy/templates/index.mdx rename to docs/traffic-policy/examples/index.mdx index 062804102c..41230ad75b 100644 --- a/docs/traffic-policy/templates/index.mdx +++ b/docs/traffic-policy/examples/index.mdx @@ -1,7 +1,7 @@ --- sidebar_position: 0 title: Overview -pagination_label: Gallery +pagination_label: Examples --- import { @@ -26,9 +26,9 @@ import { UserAgentFilter, } from "/traffic-policy/gallery.mdx"; -# Templates +# Traffic Policy Examples -Explore a curated collection of examples and configuration templates spanning from common to unconventional use cases for the Traffic Policy module. +Explore a curated collection of examples and configuration examples spanning from common to unconventional use cases for the Traffic Policy module. A number of these examples come from a longer article about how ngrok [makes policy management accessible](https://ngrok.com/blog-post/api-gateway-policy-management-examples) to developers, including a simple Go-based application for testing these and other configurations. diff --git a/sidebars.js b/sidebars.js index 2e05f24bcd..60e78e8d5b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -116,13 +116,13 @@ const sidebars = { ], }, { - label: "Templates", + label: "Examples", type: "category", - link: { type: "doc", id: "traffic-policy/templates/index" }, + link: { type: "doc", id: "traffic-policy/examples/index" }, items: [ { type: "autogenerated", - dirName: "traffic-policy/templates", + dirName: "traffic-policy/examples", }, ], }, diff --git a/static/scripts/fix-redirect.js b/static/scripts/fix-redirect.js index 53a1c9f284..38d5bddd40 100644 --- a/static/scripts/fix-redirect.js +++ b/static/scripts/fix-redirect.js @@ -232,11 +232,12 @@ const redirects = [ [ fromIncludes(`/docs/tls/traffic-policy/`), `/docs/traffic-policy/` ], [ fromIncludes(`/docs/tcp/traffic-policy/`), `/docs/traffic-policy/` ], - // DEC 2024 - New TP Getting Started + // DEC 2024 [ fromExact(`/docs/traffic-policy/getting-started/`), `/docs/traffic-policy/getting-started/agent-endpoints/cli` ], - [ fromExact(`/docs/tls/tls-termination/`), `/docs/tls/termination/` ], - [ fromExact(`/docs/tls/tls-termination`), `/docs/tls/termination` ], + // JAN 2025 + [ fromIncludes(`/docs/tls/tls-termination`), `/docs/tls/termination` ], + [ fromIncludes(`/docs/traffic-policy/templates`), `/docs/tls/examples` ], ] // get current href from window From c23b1a617e9c37d8962161309a0161de3370eb37 Mon Sep 17 00:00:00 2001 From: Shaquil Hansford Date: Tue, 14 Jan 2025 08:18:15 -0500 Subject: [PATCH 2/3] Update static/scripts/fix-redirect.js --- static/scripts/fix-redirect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/scripts/fix-redirect.js b/static/scripts/fix-redirect.js index 38d5bddd40..478a12245e 100644 --- a/static/scripts/fix-redirect.js +++ b/static/scripts/fix-redirect.js @@ -237,7 +237,7 @@ const redirects = [ // JAN 2025 [ fromIncludes(`/docs/tls/tls-termination`), `/docs/tls/termination` ], - [ fromIncludes(`/docs/traffic-policy/templates`), `/docs/tls/examples` ], + [ fromIncludes(`/docs/traffic-policy/templates`), `/docs/traffic-policy/examples` ], ] // get current href from window From 99d7dd969d71c1a27bf6740d6797178c453a4348 Mon Sep 17 00:00:00 2001 From: Shaquil Hansford Date: Tue, 14 Jan 2025 08:21:04 -0500 Subject: [PATCH 3/3] Replace /templates in other places in docs --- docs/traffic-policy/index.mdx | 2 +- static/scripts/fix-redirect.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/traffic-policy/index.mdx b/docs/traffic-policy/index.mdx index 026e150d0e..6f4ba99971 100644 --- a/docs/traffic-policy/index.mdx +++ b/docs/traffic-policy/index.mdx @@ -52,7 +52,7 @@ Learn how traffic policies work, key concepts, examples, and identity management - +

Examples / Use-Cases

diff --git a/static/scripts/fix-redirect.js b/static/scripts/fix-redirect.js index 478a12245e..51e0592cc2 100644 --- a/static/scripts/fix-redirect.js +++ b/static/scripts/fix-redirect.js @@ -187,10 +187,10 @@ const redirects = [ [ fromIncludes(`/docs/http-header-templates`), `/docs/http/request-headers/` ], // (DEC 2024) New Traffic Policy - [ fromIncludes(`/docs/traffic-policy/gallery/`), `/docs/traffic-policy/templates/` ], - [ fromIncludes(`/docs/http/traffic-policy/gallery/`), `/docs/traffic-policy/templates/` ], - [ fromIncludes(`/docs/tls/traffic-policy/gallery/`), `/docs/traffic-policy/templates/` ], - [ fromIncludes(`/docs/tcp/traffic-policy/gallery/`), `/docs/traffic-policy/templates/` ], + [ fromIncludes(`/docs/traffic-policy/gallery/`), `/docs/traffic-policy/examples/` ], + [ fromIncludes(`/docs/http/traffic-policy/gallery/`), `/docs/traffic-policy/examples/` ], + [ fromIncludes(`/docs/tls/traffic-policy/gallery/`), `/docs/traffic-policy/examples/` ], + [ fromIncludes(`/docs/tcp/traffic-policy/gallery/`), `/docs/traffic-policy/examples/` ], [ fromIncludes(`/docs/http/traffic-policy/expressions/writing-guide/`), `/docs/traffic-policy/concepts/expressions/#writing-expressions` ], [ fromIncludes(`/docs/tls/traffic-policy/expressions/writing-guide/`), `/docs/traffic-policy/concepts/expressions/#writing-expressions` ], [ fromIncludes(`/docs/tcp/traffic-policy/expressions/writing-guide/`), `/docs/traffic-policy/concepts/expressions/#writing-expressions` ],