Skip to content

Commit

Permalink
chore: Remove useless toc.base reference in search
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Nov 19, 2024
1 parent fe036ea commit a0fe5d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/services/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {mkdirSync, writeFileSync} from 'node:fs';
import {Indexer} from '@diplodoc/search-extension/indexer';
import {langs} from '@diplodoc/search-extension/worker/langs';

import {ArgvService, TocService} from '.';
import {ArgvService} from '.';
import {generateStaticSearch} from '../pages';
import {copyFileSync} from 'fs';

Expand Down Expand Up @@ -45,10 +45,8 @@ function add(path: string, info: DocInnerProps) {
return;
}

const toc = TocService.getForPath(path)[1];
const base = (toc as {base?: string}).base || '';
// TODO: adopt for non html links
const url = base + router.pathname + '.html';
const url = router.pathname + '.html';

indexer.add(lang, url, data as DocPageData);
}
Expand Down

0 comments on commit a0fe5d4

Please sign in to comment.