Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename tp templates to examples #1129

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
15 changes: 8 additions & 7 deletions static/scripts/fix-redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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` ],
Expand Down Expand Up @@ -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/traffic-policy/examples` ],
]

// get current href from window
Expand Down
Loading