Skip to content

Normalise document titles #1407

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

Merged
merged 15 commits into from
Aug 16, 2024
Merged

Normalise document titles #1407

merged 15 commits into from
Aug 16, 2024

Conversation

bradlc
Copy link
Member

@bradlc bradlc commented Aug 7, 2024

Important

🚨 https://github.com/clerk/clerk/pull/568 must be merged before this PR.

title refers to a document title defined in frontmatter, e.g. title: Example. "h1" refers to a document title specified in Markdown, e.g. # Example

This PR removes h1 elements from content, in favour of the title frontmatter field. See discussion for more info.

The transform was applied according to the following rules:

  • If a document only has a title, skip it
  • If a document only has a h1, move it to title
  • If a document has both a h1 and a title:
    • if they are equal, remove the h1
    • if they are equal except for additional Markdown syntax in the h1, replace the title with the h1, and remove the h1

The following files contain both a h1 and a title but a resolution is not obvious to me. @alexisintech would you mind taking a look at these and settling on a single title for each?

Files
  • docs/authentication/overview.mdx
  • docs/deployments/exporting-users.mdx
  • docs/guides/basic-rbac.mdx
  • docs/guides/overview.mdx
  • docs/guides/transferring-your-app.mdx
  • docs/organizations/overview.mdx
  • docs/upgrade-guides/overview.mdx
  • docs/backend-requests/versioning/overview.mdx
  • docs/components/customization/layout.mdx
  • docs/components/customization/organization-profile.mdx
  • docs/authentication/social-connections/x-twitter.mdx
  • docs/integrations/databases/neon.mdx
  • docs/integrations/webhooks/loops.mdx
  • docs/references/astro/clerk-middleware.mdx
  • docs/references/nextjs/auth-middleware.mdx
  • docs/references/nextjs/clerk-middleware.mdx
  • docs/references/nextjs/overview.mdx
  • docs/references/ruby/available-methods.mdx
  • docs/references/ruby/rack-rails.mdx
  • docs/upgrade-guides/core-2/backend.mdx
  • docs/upgrade-guides/core-2/chrome-extension.mdx
  • docs/upgrade-guides/core-2/expo.mdx
  • docs/upgrade-guides/core-2/fastify.mdx
  • docs/upgrade-guides/core-2/javascript.mdx
  • docs/upgrade-guides/core-2/nextjs.mdx
  • docs/upgrade-guides/core-2/node.mdx
  • docs/upgrade-guides/core-2/react.mdx
  • docs/upgrade-guides/core-2/remix.mdx
  • docs/references/javascript/user/totp.mdx

@bradlc bradlc requested a review from alexisintech August 12, 2024 12:31
@bradlc bradlc marked this pull request as ready for review August 12, 2024 12:31
@bradlc bradlc requested a review from a team as a code owner August 12, 2024 12:31
@alexisintech alexisintech merged commit b4385f7 into main Aug 16, 2024
4 checks passed
@alexisintech alexisintech deleted the bradlc/normalise-titles branch August 16, 2024 17:24
octoper pushed a commit that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants