Skip to content

Commit

Permalink
feat: rename tp templates to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nijikokun authored and inconshreveable committed Jan 24, 2025
1 parent d40f79b commit 37a367e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 0
title: Overview
pagination_label: Gallery
pagination_label: Examples
---

import {
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/traffic-policy/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Learn how traffic policies work, key concepts, examples, and identity management
</div>
</Link>

<Link to={`/traffic-policy/templates/`}>
<Link to={`/traffic-policy/examples/`}>
<div className="ngrok--card hover:bg-card-hover">
<div className="ngrok--card-heading">
<h3 className="text-md sm:text-base">Examples / Use-Cases</h3>
Expand Down
6 changes: 3 additions & 3 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
],
},
Expand Down
12 changes: 7 additions & 5 deletions static/scripts/fix-redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,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` ],
Expand Down Expand Up @@ -238,10 +238,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` ],

// JAN 2025
[ fromIncludes(`/docs/tls/tls-termination/`), `/docs/tls/termination/` ],
[ fromIncludes(`/docs/traffic-policy/templates/`), `/docs/traffic-policy/examples/` ],
]

// get current href from window
Expand Down

0 comments on commit 37a367e

Please sign in to comment.