mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 04:42:40 +02:00
fix(v2): add base url to opensearch.xml (#4154)
* fix(v2): add base url to opensearch.xml * Apply suggestions from code review Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
parent
fe6b841642
commit
f5494af21c
2 changed files with 4 additions and 4 deletions
|
@ -59,8 +59,8 @@ function theme(context) {
|
|||
path.join(outDir, OPEN_SEARCH_FILENAME),
|
||||
renderOpenSearchTemplate({
|
||||
title,
|
||||
url,
|
||||
favicon: normalizeUrl([url, favicon]),
|
||||
url: url + baseUrl,
|
||||
favicon: normalizeUrl([url, baseUrl, favicon]),
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
|
|
|
@ -13,8 +13,8 @@ module.exports = `
|
|||
<Description>Search <%= it.title %></Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image width="16" height="16" type="image/x-icon"><%= it.favicon %></Image>
|
||||
<Url type="text/html" method="get" template="<%= it.url %>/search?q={searchTerms}"/>
|
||||
<Url type="application/opensearchdescription+xml" rel="self" template="<%= it.url %>/opensearch.xml" />
|
||||
<Url type="text/html" method="get" template="<%= it.url %>search?q={searchTerms}"/>
|
||||
<Url type="application/opensearchdescription+xml" rel="self" template="<%= it.url %>opensearch.xml" />
|
||||
<moz:SearchForm><%= it.url %></moz:SearchForm>
|
||||
</OpenSearchDescription>
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue