Skip to content

Commit

Permalink
Apply canonicals for integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Jan 29, 2025
1 parent 96ef091 commit 1029420
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/core_docs/src/theme/SiteMetadata/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ function useDefaultCanonicalUrl() {
});
const canonicalPathnameNoVersion = canonicalPathname.startsWith('/v0.') ? "/"+canonicalPathname.split('/').slice(2).join('/') : canonicalPathname;
const suggestedLookup = suggestedLinks[canonicalPathnameNoVersion];
const finalPathname = suggestedLookup?.canonical || canonicalPathname;
let finalPathname;
if (suggestedLookup?.canonical) {
finalPathname = suggestedLookup.canonical;
} else if (canonicalPathnameNoVersion.startsWith("/docs/integrations/")) {
finalPathname = canonicalPathnameNoVersion;
} else {
finalPathname = canonicalPathname;
}
if (finalPathname.startsWith("https://")) {
return finalPathname;
}
Expand Down Expand Up @@ -280,7 +287,7 @@ const suggestedLinks = {
]
},
"/docs/get_started/installation/": {
"canonical": "/docs/tutorials/",
"canonical": "/docs/how_to/installation/",
"alternative": [
"/v0.1/docs/get_started/installation/"
]
Expand Down
2 changes: 2 additions & 0 deletions libs/langchain-community/src/indexes/sqlite.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// eslint-disable-next-line ban-ts-comment
// @ts-nocheck
// eslint-disable-next-line import/no-extraneous-dependencies
import Database, { Database as DatabaseType, Statement } from "better-sqlite3";
import {
Expand Down

0 comments on commit 1029420

Please sign in to comment.