Home / Function/ addCanonicalUrl() — supabase Function Reference

addCanonicalUrl() — supabase Function Reference

Architecture documentation for the addCanonicalUrl() function in Troubleshooting.script.mjs from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  9f54ef0f_95e0_5c5a_ac3f_760c863599e6["addCanonicalUrl()"]
  34c95dd3_9362_604e_4560_37203bbf5659["createGithubDiscussion()"]
  34c95dd3_9362_604e_4560_37203bbf5659 -->|calls| 9f54ef0f_95e0_5c5a_ac3f_760c863599e6
  1dbedd6f_a4f8_c098_dc20_7090d63d4f6b["updateGithubDiscussion()"]
  1dbedd6f_a4f8_c098_dc20_7090d63d4f6b -->|calls| 9f54ef0f_95e0_5c5a_ac3f_760c863599e6
  7a2a3c0f_f9d5_d0e0_f601_c8e8d1cb9b3d["getArticleSlug()"]
  9f54ef0f_95e0_5c5a_ac3f_760c863599e6 -->|calls| 7a2a3c0f_f9d5_d0e0_f601_c8e8d1cb9b3d
  b2c82e4c_703b_a66f_7fa8_79d3c3b4ccea["rewriteRelativeLinks()"]
  9f54ef0f_95e0_5c5a_ac3f_760c863599e6 -->|calls| b2c82e4c_703b_a66f_7fa8_79d3c3b4ccea
  style 9f54ef0f_95e0_5c5a_ac3f_760c863599e6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/features/docs/Troubleshooting.script.mjs lines 297–304

function addCanonicalUrl(entry) {
  const docsUrl = 'https://supabase.com/docs/guides/troubleshooting/' + getArticleSlug(entry)
  const contentWithAbsoluteLinks = rewriteRelativeLinks(entry.contentWithoutJsx)
  const content =
    `_This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the [original article](${docsUrl})._\n\n` +
    contentWithAbsoluteLinks
  return content
}

Subdomains

Frequently Asked Questions

What does addCanonicalUrl() do?
addCanonicalUrl() is a function in the supabase codebase.
What does addCanonicalUrl() call?
addCanonicalUrl() calls 2 function(s): getArticleSlug, rewriteRelativeLinks.
What calls addCanonicalUrl()?
addCanonicalUrl() is called by 2 function(s): createGithubDiscussion, updateGithubDiscussion.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free