mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
docs: canonical url fix (#27554)
canonical wrong on e.g. https://python.langchain.com/v0.1/docs/modules/agents/concepts/
This commit is contained in:
parent
3b0e993e20
commit
bc6600d86f
@ -62,6 +62,9 @@ function useDefaultCanonicalUrl() {
|
||||
const canonicalPathnameNoVersion = canonicalPathname.startsWith('/v0.') ? "/"+canonicalPathname.split('/').slice(2).join('/') : canonicalPathname;
|
||||
const suggestedLookup = suggestedLinks[canonicalPathnameNoVersion];
|
||||
const finalPathname = suggestedLookup?.canonical || canonicalPathname;
|
||||
if (finalPathname.startsWith("https://")) {
|
||||
return finalPathname;
|
||||
}
|
||||
return siteUrl + finalPathname;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user