Skip to content

Commit 8c6f978

Browse files
authored
chore: remove canonical function and references (#2360)
* docs: remove CanonicalURL section from README.md * refactor: remove CanonicalUrl component and its usage from documentation * fix: code formatting
1 parent 4e6c0ae commit 8c6f978

File tree

24 files changed

+1
-211
lines changed

24 files changed

+1
-211
lines changed

README.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
- [Formatting documentation](#formatting-documentation)
3939
- [Adding content to "Examples" page](#adding-content-to-examples-page)
4040
- [CLI and API reference - auto-generated content](#cli-and-api-reference---auto-generated-content)
41-
- [CanonicalURL](#canonicalurl)
42-
- [When to use CanonicalURL](#when-to-use-canonicalurl)
43-
- [How to use CanonicalURL](#how-to-use-canonicalurl)
44-
- [How to verify CanonicalURL is working](#how-to-verify-canonicalurl-is-working)
4541

4642
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
4743

@@ -546,61 +542,3 @@ The `cmd/clidoc/main.go` is the general path for all Ory projects.
546542

547543
The command to generate the CLI docs can be found here:
548544
https://github.com/ory/x/blob/master/clidoc/generate.go#L96
549-
550-
## CanonicalURL
551-
552-
The `CanonicalURL` component specifies the authoritative URL for a page to
553-
search engines. Docusaurus adds trailing slashes to `index.mdx` files and files
554-
matching their parent directory names before Vercel's trailing slash removal
555-
takes effect. This means search engines can crawl both versions (with and
556-
without trailing slashes). The component ensures search engines know which
557-
version is canonical by explicitly setting a URL without a trailing slash.
558-
559-
### When to use CanonicalURL
560-
561-
Use this component on:
562-
563-
- **Any `index.mdx` file**: These files serve content at their parent path
564-
(e.g., `/api/index.mdx`)
565-
- **Files matching parent directory names**: When a file shares its parent
566-
directory's name (e.g., `docs/kratos/organizations/organizations.mdx`)
567-
568-
Common examples include:
569-
570-
- Index Path (`/api/index.mdx`, `/elements/index.mdx`, `/identities/index.mdx`)
571-
- Matching parent directory names
572-
(`docs/kratos/organizations/organizations.mdx`,
573-
`docs/self-hosted/oel/monitoring/monitoring.mdx`)
574-
575-
### How to use CanonicalURL
576-
577-
Add the component at the beginning of your MDX file after the front matter:
578-
579-
````md
580-
---
581-
id: your-page-id
582-
title: Your Page Title
583-
---
584-
585-
```mdx-code-block
586-
import CanonicalURL from "@site/src/components/CanonicalUrl"
587-
588-
<CanonicalURL path="your/canonical/path" />
589-
590-
Your content here...
591-
```
592-
````
593-
594-
### How to verify CanonicalURL is working
595-
596-
1. Open the page in your browser
597-
2. Right-click and select "View Page Source" (not "Inspect")
598-
3. Search for `<link rel="canonical"` in the HTML
599-
4. Confirm the canonical URL exists and points to the correct path without
600-
trailing slash
601-
602-
Example:
603-
604-
```html
605-
<link rel="canonical" href="https://www.ory.com/docs/kratos/organizations" />
606-
```

docs/account-experience/index.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ title: Account Experience Overview
44
sidebar_label: Account Experience
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/account-experience" />
117
```
128
139
The Ory Account Experience is the default user interface for all self-service screens like login, registration, or consent. It can
@@ -123,3 +119,4 @@ override the default translations.
123119
## Custom Domains
124120
125121
The Account Experience is also available under custom domains the same way it works on the slug URL.
122+
```

docs/api/index.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ title: gRPC + REST API Overview
44
sidebar_label: APIs
55
---
66

7-
```mdx-code-block
8-
import ApiTypes from './_common/api-types.mdx'
9-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
10-
11-
<ApiTypes />
12-
<CanonicalUrl path="/api" />
13-
```
14-
157
## REST API
168

179
All services at Ory provide REST APIs. Check the [REST API Reference](../reference/api.mdx) for a complete API overview.

docs/elements/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ id: index
33
title: Ory Elements Introduction
44
---
55

6-
```mdx-code-block
7-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
8-
9-
<CanonicalUrl path="/elements" />
10-
```
11-
126
import WelcomePageSection from "@site/src/components/Welcome/welcome"
137
import { elements } from "@site/src/pages/_assets/welcome-content"
148
import { elementsArchitectureGraph } from "@site/src/pages/_assets/ui-graphs"

docs/elements/reference/@ory/elements-react/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ title: "@ory/elements-react"
44
sidebar_label: "@ory/elements-react"
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/elements/reference/@ory/elements-react" />
11-
```
12-
137
# @ory/elements-react
148

159
This package provides the core functionality for Ory Elements in React.

docs/elements/reference/@ory/elements-react/theme/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ title: "@ory/elements-react/theme"
44
sidebar_label: "theme"
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/elements/reference/@ory/elements-react/theme" />
11-
```
12-
137
# @ory/elements-react/theme
148

159
This package provides the default theme for Ory Elements React.

docs/elements/reference/@ory/nextjs/app/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ title: "@ory/nextjs/app"
44
sidebar_label: "app"
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/elements/reference/@ory/nextjs/app" />
11-
```
12-
137
# @ory/nextjs/app
148

159
## Interfaces

docs/elements/reference/@ory/nextjs/middleware/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ title: "@ory/nextjs/middleware"
44
sidebar_label: "middleware"
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/elements/reference/@ory/nextjs/middleware" />
11-
```
12-
137
# @ory/nextjs/middleware
148

159
## Functions

docs/elements/reference/@ory/nextjs/pages/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ title: "@ory/nextjs/pages"
44
sidebar_label: "pages"
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/elements/reference/@ory/nextjs/pages" />
11-
```
12-
137
# @ory/nextjs/pages
148

159
## Hooks

docs/identities/get-started/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ title: Identity management guide - Day 1 essentials
44
sidebar_label: Overview
55
---
66

7-
```mdx-code-block
8-
import CanonicalUrl from "@site/src/components/CanonicalUrl"
9-
10-
<CanonicalUrl path="/identities/get-started" />
11-
```
12-
137
# Identity management guide
148

159
This guide shows how to implement basic authentication flows with Ory. It covers the essential setup and implementation details

0 commit comments

Comments
 (0)