|
1 | 1 | <h1 align="center">Ory Documentation</h1> |
2 | 2 |
|
3 | 3 | <h4 align="center"> |
4 | | - <a href="https://www.ory.sh/chat">Chat</a> | |
5 | | - <a href="https://www.ory.sh/l/sign-up-newsletter">Newsletter</a><br/><br/> |
6 | | - <a href="https://www.ory.sh/docs/">Documentation</a> | |
| 4 | + <a href="https://www.ory.com/chat">Chat</a> | |
| 5 | + <a href="https://www.ory.com/l/sign-up-newsletter">Newsletter</a><br/><br/> |
| 6 | + <a href="https://www.ory.com/docs/">Documentation</a> | |
7 | 7 | <a href="https://opencollective.com/ory">Support this project!</a><br/><br/> |
8 | | - <a href="https://www.ory.sh/jobs/">Work in Open Source, Ory is hiring!</a> |
| 8 | + <a href="https://www.ory.com/jobs/">Work in Open Source, Ory is hiring!</a> |
9 | 9 | </h4> |
10 | 10 |
|
11 | 11 | <!-- START doctoc generated TOC please keep comment here to allow auto update --> |
|
32 | 32 | - [Screenshots and videos](#screenshots-and-videos) |
33 | 33 | - [Compressing images](#compressing-images) |
34 | 34 | - [Recording and compressing videos](#recording-and-compressing-videos) |
| 35 | + - [Ory Console](#ory-console) |
| 36 | + - [Navigate to Ory Console Pages](#navigate-to-ory-console-pages) |
35 | 37 | - [Testing](#testing) |
36 | 38 | - [Formatting documentation](#formatting-documentation) |
37 | 39 | - [Adding content to "Examples" page](#adding-content-to-examples-page) |
38 | 40 | - [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) |
39 | 45 |
|
40 | 46 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> |
41 | 47 |
|
42 | 48 | # Overview |
43 | 49 |
|
44 | 50 | Ory documentation is the single source of truth for usage, implementation, |
45 | 51 | configuration, and troubleshooting of the Ory Network and all projects of the |
46 | | -[Ory Ecosystem](https://www.ory.sh/docs/ecosystem/projects/). The documentation |
| 52 | +[Ory Ecosystem](https://www.ory.com/docs/ecosystem/projects/). The documentation |
47 | 53 | is best consumed through the |
48 | | -[Ory documentation portal](https://www.ory.sh/docs/). |
| 54 | +[Ory documentation portal](https://www.ory.com/docs/). |
49 | 55 |
|
50 | 56 | To see the source code of each of the projects, visit the project repository: |
51 | 57 |
|
@@ -419,7 +425,7 @@ import VideoEmbed from '@site/src/components/VideoEmbed' |
419 | 425 | You can use the `/current/` route to navigate users to their active Ory Network |
420 | 426 | project. For example, to access the Custom UI settings for the active Ory |
421 | 427 | Network project in the Console, you can link to: |
422 | | -https://console.ory.sh/projects/current/ui |
| 428 | +https://console.ory.com/projects/current/ui |
423 | 429 |
|
424 | 430 | When referencing a page of the Ory Console, use the |
425 | 431 | `<ConsoleLink route="project..." />` component in MDX files. |
@@ -540,3 +546,61 @@ The `cmd/clidoc/main.go` is the general path for all Ory projects. |
540 | 546 |
|
541 | 547 | The command to generate the CLI docs can be found here: |
542 | 548 | 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 | +``` |
0 commit comments