From 9098f81d39bc60ac39dfd3a7b86c7623909d223d Mon Sep 17 00:00:00 2001 From: Jay Giang Date: Tue, 18 Nov 2025 20:09:49 -0800 Subject: [PATCH 1/3] docs: remove CanonicalURL section from README.md --- README.md | 64 +------------------------------------------------------ 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/README.md b/README.md index 9b46bff52..0d44b85af 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,6 @@ - [Formatting documentation](#formatting-documentation) - [Adding content to "Examples" page](#adding-content-to-examples-page) - [CLI and API reference - auto-generated content](#cli-and-api-reference---auto-generated-content) - - [CanonicalURL](#canonicalurl) - - [When to use CanonicalURL](#when-to-use-canonicalurl) - - [How to use CanonicalURL](#how-to-use-canonicalurl) - - [How to verify CanonicalURL is working](#how-to-verify-canonicalurl-is-working) @@ -545,62 +541,4 @@ https://github.com/ory/kratos/blob/master/cmd/clidoc/main.go The `cmd/clidoc/main.go` is the general path for all Ory projects. The command to generate the CLI docs can be found here: -https://github.com/ory/x/blob/master/clidoc/generate.go#L96 - -## CanonicalURL - -The `CanonicalURL` component specifies the authoritative URL for a page to -search engines. Docusaurus adds trailing slashes to `index.mdx` files and files -matching their parent directory names before Vercel's trailing slash removal -takes effect. This means search engines can crawl both versions (with and -without trailing slashes). The component ensures search engines know which -version is canonical by explicitly setting a URL without a trailing slash. - -### When to use CanonicalURL - -Use this component on: - -- **Any `index.mdx` file**: These files serve content at their parent path - (e.g., `/api/index.mdx`) -- **Files matching parent directory names**: When a file shares its parent - directory's name (e.g., `docs/kratos/organizations/organizations.mdx`) - -Common examples include: - -- Index Path (`/api/index.mdx`, `/elements/index.mdx`, `/identities/index.mdx`) -- Matching parent directory names - (`docs/kratos/organizations/organizations.mdx`, - `docs/self-hosted/oel/monitoring/monitoring.mdx`) - -### How to use CanonicalURL - -Add the component at the beginning of your MDX file after the front matter: - -````md ---- -id: your-page-id -title: Your Page Title ---- - -```mdx-code-block -import CanonicalURL from "@site/src/components/CanonicalUrl" - - - -Your content here... -``` -```` - -### How to verify CanonicalURL is working - -1. Open the page in your browser -2. Right-click and select "View Page Source" (not "Inspect") -3. Search for ` -``` +https://github.com/ory/x/blob/master/clidoc/generate.go#L96 \ No newline at end of file From ead7dd7bcce5aefc20870ba9c9e986e66fce845d Mon Sep 17 00:00:00 2001 From: Jay Giang Date: Tue, 18 Nov 2025 20:25:57 -0800 Subject: [PATCH 2/3] refactor: remove CanonicalUrl component and its usage from documentation --- docs/account-experience/index.mdx | 4 ---- docs/api/index.mdx | 8 -------- docs/elements/index.mdx | 6 ------ .../reference/@ory/elements-react/index.mdx | 6 ------ .../@ory/elements-react/theme/index.mdx | 6 ------ .../reference/@ory/nextjs/app/index.mdx | 6 ------ .../reference/@ory/nextjs/middleware/index.mdx | 6 ------ .../reference/@ory/nextjs/pages/index.mdx | 6 ------ docs/elements/reference/index.mdx | 6 ------ docs/identities/get-started/index.mdx | 6 ------ docs/identities/index.mdx | 6 ------ docs/keto/index.mdx | 6 ------ docs/kratos/organizations/organizations.mdx | 6 ------ docs/oathkeeper/index.mdx | 6 ------ docs/oauth2-oidc/index.mdx | 6 ------ docs/polis/admin-portal/index.mdx | 6 ------ docs/polis/directory-sync/index.mdx | 6 ------ docs/polis/index.mdx | 6 ------ docs/polis/saml-federation/index.mdx | 6 ------ docs/polis/sso-flow/index.mdx | 6 ------ docs/polis/sso-providers/index.mdx | 6 ------ docs/self-hosted/oel/index.mdx | 6 ------ docs/self-hosted/oel/monitoring/monitoring.mdx | 6 ------ src/components/CanonicalUrl/index.tsx | 17 ----------------- 24 files changed, 155 deletions(-) delete mode 100644 src/components/CanonicalUrl/index.tsx diff --git a/docs/account-experience/index.mdx b/docs/account-experience/index.mdx index c6dde4204..58b774ced 100644 --- a/docs/account-experience/index.mdx +++ b/docs/account-experience/index.mdx @@ -4,10 +4,6 @@ title: Account Experience Overview sidebar_label: Account Experience --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - ``` The Ory Account Experience is the default user interface for all self-service screens like login, registration, or consent. It can diff --git a/docs/api/index.mdx b/docs/api/index.mdx index ee68f4e06..34783847d 100644 --- a/docs/api/index.mdx +++ b/docs/api/index.mdx @@ -4,14 +4,6 @@ title: gRPC + REST API Overview sidebar_label: APIs --- -```mdx-code-block -import ApiTypes from './_common/api-types.mdx' -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - - -``` - ## REST API All services at Ory provide REST APIs. Check the [REST API Reference](../reference/api.mdx) for a complete API overview. diff --git a/docs/elements/index.mdx b/docs/elements/index.mdx index b2b1c67ac..8ad1988df 100644 --- a/docs/elements/index.mdx +++ b/docs/elements/index.mdx @@ -3,12 +3,6 @@ id: index title: Ory Elements Introduction --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - import WelcomePageSection from "@site/src/components/Welcome/welcome" import { elements } from "@site/src/pages/_assets/welcome-content" import { elementsArchitectureGraph } from "@site/src/pages/_assets/ui-graphs" diff --git a/docs/elements/reference/@ory/elements-react/index.mdx b/docs/elements/reference/@ory/elements-react/index.mdx index 8c52069bc..0ebfa42c1 100644 --- a/docs/elements/reference/@ory/elements-react/index.mdx +++ b/docs/elements/reference/@ory/elements-react/index.mdx @@ -4,12 +4,6 @@ title: "@ory/elements-react" sidebar_label: "@ory/elements-react" --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # @ory/elements-react This package provides the core functionality for Ory Elements in React. diff --git a/docs/elements/reference/@ory/elements-react/theme/index.mdx b/docs/elements/reference/@ory/elements-react/theme/index.mdx index a33b634d3..101411b18 100644 --- a/docs/elements/reference/@ory/elements-react/theme/index.mdx +++ b/docs/elements/reference/@ory/elements-react/theme/index.mdx @@ -4,12 +4,6 @@ title: "@ory/elements-react/theme" sidebar_label: "theme" --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # @ory/elements-react/theme This package provides the default theme for Ory Elements React. diff --git a/docs/elements/reference/@ory/nextjs/app/index.mdx b/docs/elements/reference/@ory/nextjs/app/index.mdx index dbf3560f5..80e1b901d 100644 --- a/docs/elements/reference/@ory/nextjs/app/index.mdx +++ b/docs/elements/reference/@ory/nextjs/app/index.mdx @@ -4,12 +4,6 @@ title: "@ory/nextjs/app" sidebar_label: "app" --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # @ory/nextjs/app ## Interfaces diff --git a/docs/elements/reference/@ory/nextjs/middleware/index.mdx b/docs/elements/reference/@ory/nextjs/middleware/index.mdx index 109bce2b5..34efbd55f 100644 --- a/docs/elements/reference/@ory/nextjs/middleware/index.mdx +++ b/docs/elements/reference/@ory/nextjs/middleware/index.mdx @@ -4,12 +4,6 @@ title: "@ory/nextjs/middleware" sidebar_label: "middleware" --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # @ory/nextjs/middleware ## Functions diff --git a/docs/elements/reference/@ory/nextjs/pages/index.mdx b/docs/elements/reference/@ory/nextjs/pages/index.mdx index 604f5f9dc..639238f8f 100644 --- a/docs/elements/reference/@ory/nextjs/pages/index.mdx +++ b/docs/elements/reference/@ory/nextjs/pages/index.mdx @@ -4,12 +4,6 @@ title: "@ory/nextjs/pages" sidebar_label: "pages" --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # @ory/nextjs/pages ## Hooks diff --git a/docs/elements/reference/index.mdx b/docs/elements/reference/index.mdx index e77a184d9..1050c45af 100644 --- a/docs/elements/reference/index.mdx +++ b/docs/elements/reference/index.mdx @@ -4,12 +4,6 @@ title: Ory Elements Reference sidebar_label: Reference --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # Ory Elements Reference ## Modules diff --git a/docs/identities/get-started/index.mdx b/docs/identities/get-started/index.mdx index 035e80691..a3e3eb6a3 100644 --- a/docs/identities/get-started/index.mdx +++ b/docs/identities/get-started/index.mdx @@ -4,12 +4,6 @@ title: Identity management guide - Day 1 essentials sidebar_label: Overview --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # Identity management guide This guide shows how to implement basic authentication flows with Ory. It covers the essential setup and implementation details diff --git a/docs/identities/index.mdx b/docs/identities/index.mdx index 8572a9080..e92daeb0c 100644 --- a/docs/identities/index.mdx +++ b/docs/identities/index.mdx @@ -4,12 +4,6 @@ title: Introduction to Ory Kratos Identities sidebar_label: Introduction --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - Ory Kratos Identities is an API-first identity and user management system built on top of the widely deployed open-source [Ory Kratos](https://github.com/ory/kratos) following [cloud architecture best practices](ecosystem/software-architecture-philosophy.mdx). It implements mechanisms that allow handling diff --git a/docs/keto/index.mdx b/docs/keto/index.mdx index 524a9072b..52938ca74 100644 --- a/docs/keto/index.mdx +++ b/docs/keto/index.mdx @@ -4,12 +4,6 @@ title: Introduction to Ory Keto Permissions sidebar_label: Introduction --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - Ory Permissions is a modern permission system you can use to create a complete authorization system for your application or website, no matter the size or the complexity of the ACLs (access-control lists) your use case requires. Ory Permissions, based on the open-source Ory Keto Permission Server, is the first open-source implementation of the design principles and specifications diff --git a/docs/kratos/organizations/organizations.mdx b/docs/kratos/organizations/organizations.mdx index af331d367..abe27e0f0 100644 --- a/docs/kratos/organizations/organizations.mdx +++ b/docs/kratos/organizations/organizations.mdx @@ -3,12 +3,6 @@ id: organizations title: Organizations --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # Organizations for B2B Single Sign-On OIDC & SAML ```mdx-code-block diff --git a/docs/oathkeeper/index.mdx b/docs/oathkeeper/index.mdx index 29c6798a1..bca94f02a 100644 --- a/docs/oathkeeper/index.mdx +++ b/docs/oathkeeper/index.mdx @@ -3,12 +3,6 @@ id: index title: Introduction to Ory Oathkeeper Zero Trust Proxy --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - ```mdx-code-block import Help from '@site/docs/_common/need-selfhosted-support.mdx' diff --git a/docs/oauth2-oidc/index.mdx b/docs/oauth2-oidc/index.mdx index a8cb333e2..c49c43232 100644 --- a/docs/oauth2-oidc/index.mdx +++ b/docs/oauth2-oidc/index.mdx @@ -4,12 +4,6 @@ title: Introduction to Ory Hydra OAuth2 sidebar_label: Introduction --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - OAuth2 is the industry-standard protocol that enables secure machine-to-machine communication and grants limited access to data and services on behalf of users. OpenID Connect, built on top of OAuth2, is required to become a social sign-in provider. diff --git a/docs/polis/admin-portal/index.mdx b/docs/polis/admin-portal/index.mdx index 33855adce..6d757e998 100644 --- a/docs/polis/admin-portal/index.mdx +++ b/docs/polis/admin-portal/index.mdx @@ -3,12 +3,6 @@ id: index title: Get started with Admin Portal --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - Ory Polis comes with an Admin Portal that allows you to manage **Enterprise SSO**, **Directory Sync** and **Setup Links** products via an easy to use web interface. diff --git a/docs/polis/directory-sync/index.mdx b/docs/polis/directory-sync/index.mdx index 78c1ad326..415bb4b0f 100644 --- a/docs/polis/directory-sync/index.mdx +++ b/docs/polis/directory-sync/index.mdx @@ -3,12 +3,6 @@ id: index title: Directory Sync --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - Directory sync helps organizations automate the provisioning and de-provisioning of their users. It is based on the System for Cross-domain Identity Management (SCIM) protocol. diff --git a/docs/polis/index.mdx b/docs/polis/index.mdx index 2b02518fc..ec6679538 100644 --- a/docs/polis/index.mdx +++ b/docs/polis/index.mdx @@ -4,12 +4,6 @@ title: Introduction to Ory Polis sidebar_label: Introduction --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # Introduction to Ory Polis Ory Polis - formerly known as BoxyHQ Jackson - is an Enterprise Single Sign-On (SSO) service for SAML and OIDC identity providers. diff --git a/docs/polis/saml-federation/index.mdx b/docs/polis/saml-federation/index.mdx index 7ab05b4d8..97b99f810 100644 --- a/docs/polis/saml-federation/index.mdx +++ b/docs/polis/saml-federation/index.mdx @@ -3,12 +3,6 @@ title: SAML Federation sidebar_label: SAML Federation --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - # SAML Federation SAML Federation is an enterprise feature and you need to have an enterprise license to use this feature. diff --git a/docs/polis/sso-flow/index.mdx b/docs/polis/sso-flow/index.mdx index 1a59685fe..5f2692ef2 100644 --- a/docs/polis/sso-flow/index.mdx +++ b/docs/polis/sso-flow/index.mdx @@ -3,12 +3,6 @@ id: index title: Single Sign-On --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - import Tabs from "@theme/Tabs" import TabItem from "@theme/TabItem" diff --git a/docs/polis/sso-providers/index.mdx b/docs/polis/sso-providers/index.mdx index c0967977c..31687cb73 100644 --- a/docs/polis/sso-providers/index.mdx +++ b/docs/polis/sso-providers/index.mdx @@ -4,12 +4,6 @@ title: SAML SSO Providers sidebar_label: SSO Providers --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - Ory Polis supports the following SSO providers: - [Generic SAML 2.0 Provider](./generic-saml.mdx) diff --git a/docs/self-hosted/oel/index.mdx b/docs/self-hosted/oel/index.mdx index 3be7b2596..56b5118c1 100644 --- a/docs/self-hosted/oel/index.mdx +++ b/docs/self-hosted/oel/index.mdx @@ -4,12 +4,6 @@ title: Introduction to Ory Enterprise License sidebar_label: Introduction --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - The Ory Enterprise License (OEL) is a commercial license designed for businesses and organizations that rely on Ory's open-source identity and access control software (Ory Hydra, Ory Kratos, Ory Keto, Ory Oathkeeper, and Ory Polis) in production and mission-critical environments. It grants access to enterprise-grade features, dedicated support, and builds optimized for diff --git a/docs/self-hosted/oel/monitoring/monitoring.mdx b/docs/self-hosted/oel/monitoring/monitoring.mdx index d2884d7ad..844bc8bc0 100644 --- a/docs/self-hosted/oel/monitoring/monitoring.mdx +++ b/docs/self-hosted/oel/monitoring/monitoring.mdx @@ -3,12 +3,6 @@ id: monitoring title: Monitoring --- -```mdx-code-block -import CanonicalUrl from "@site/src/components/CanonicalUrl" - - -``` - This guide presents exemplary monitoring configuration that will work with OEL applications. ## Prerequisites diff --git a/src/components/CanonicalUrl/index.tsx b/src/components/CanonicalUrl/index.tsx deleted file mode 100644 index d43ce5401..000000000 --- a/src/components/CanonicalUrl/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Head from "@docusaurus/Head" -import useBaseUrl from "@docusaurus/useBaseUrl" - -interface CanonicalUrlProps { - path: string -} - -export default function CanonicalUrl({ path }: CanonicalUrlProps) { - const absoluteUrl = useBaseUrl(path, { absolute: true }) - const canonicalUrl = absoluteUrl.replace(/\/$/, "") - - return ( - - - - ) -} From 4ba602af7b4462891e2c44d70a6c9a680daff912 Mon Sep 17 00:00:00 2001 From: Jay Giang Date: Fri, 21 Nov 2025 15:15:24 -0800 Subject: [PATCH 3/3] fix: code formatting --- README.md | 2 +- docs/account-experience/index.mdx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c6724bd8c..5ad71a9b7 100644 --- a/README.md +++ b/README.md @@ -541,4 +541,4 @@ https://github.com/ory/kratos/blob/master/cmd/clidoc/main.go The `cmd/clidoc/main.go` is the general path for all Ory projects. The command to generate the CLI docs can be found here: -https://github.com/ory/x/blob/master/clidoc/generate.go#L96 \ No newline at end of file +https://github.com/ory/x/blob/master/clidoc/generate.go#L96 diff --git a/docs/account-experience/index.mdx b/docs/account-experience/index.mdx index 58b774ced..5ecffc13b 100644 --- a/docs/account-experience/index.mdx +++ b/docs/account-experience/index.mdx @@ -119,3 +119,4 @@ override the default translations. ## Custom Domains The Account Experience is also available under custom domains the same way it works on the slug URL. +```