Skip to content

Commit

Permalink
Add slug property to pageData in generateEmbeddings function
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterDePauw committed Nov 13, 2024
1 parent 0acb375 commit ad5e217
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94593,8 +94593,8 @@ function generateEmbeddings(_a) {
const markdownFiles = files.filter(({ path }) => /\.(md|mdx)$/.test(path)).filter(({ path }) => !ignoredFiles.includes(path));
const sources = yield Promise.all(markdownFiles.map((_a) => main_awaiter(this, [_a], void 0, function* ({ path, parentPath }) {
const source = new MarkdownSource("markdown", path, parentPath);
yield source.load();
return source;
const sourcePart2 = yield source.load();
return Object.assign(source, sourcePart2, {});
})));
console.log(`Discovered ${sources.length} pages.`);
for (const source of sources) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ async function generateEmbeddings({ databaseUrl, openaiApiKey, docsRootPath }: {
const sources = await Promise.all(
markdownFiles.map(async ({ path, parentPath }) => {
const source = new MarkdownSource("markdown", path, parentPath)
await source.load()
return source
const sourcePart2 = await source.load()
return Object.assign(source, sourcePart2, {})
}),
)

Expand Down

0 comments on commit ad5e217

Please sign in to comment.