docs(site): disable highlightSearchTermsOnTargetPage to keep URLs clean (#12661)
The @easyops-cn/docusaurus-search-local option appends ?_highlight=<term>
query params to links from the search bar. Docusaurus puts the query string
before the #anchor, producing URLs like
/docs/foo?_highlight=bar#section
which look broken when copy-pasted. Turn the option off — Ctrl+F on the
landing page covers the same use case without polluting shareable links.
This commit is contained in:
parent
ef73367fc5
commit
cad3f8a37f
@ -37,7 +37,9 @@ const config: Config = {
|
||||
language: ['en'],
|
||||
indexBlog: false,
|
||||
docsRouteBasePath: '/',
|
||||
highlightSearchTermsOnTargetPage: true,
|
||||
// Disabled: appends ?_highlight=... to URLs (before the #anchor),
|
||||
// which makes copy/pasted doc links ugly. Ctrl+F on the page is fine.
|
||||
highlightSearchTermsOnTargetPage: false,
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user