From fe036eac29854cafc75228856c27810d0fabbea4 Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Tue, 19 Nov 2024 19:18:54 +0300 Subject: [PATCH] fix: Fix search results urls Fixes diplodoc-platform/search-extension/#10 --- package.json | 2 +- src/services/search.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 097859a8..c7d7d61a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@diplodoc/cli", - "version": "4.47.0", + "version": "4.47.0-beta-1", "description": "Make documentation using yfm-docs in Markdown and HTML formats", "keywords": [ "markdown", diff --git a/src/services/search.ts b/src/services/search.ts index cafd028c..cffe0173 100644 --- a/src/services/search.ts +++ b/src/services/search.ts @@ -47,7 +47,8 @@ function add(path: string, info: DocInnerProps) { const toc = TocService.getForPath(path)[1]; const base = (toc as {base?: string}).base || ''; - const url = base + '/' + router.pathname; + // TODO: adopt for non html links + const url = base + router.pathname + '.html'; indexer.add(lang, url, data as DocPageData); }