mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-05 05:07:14 +02:00
fix: make successful build if missing favicon (#5290)
This commit is contained in:
parent
33b88ab717
commit
bc6c67720a
2 changed files with 4 additions and 2 deletions
|
@ -60,7 +60,7 @@ function theme(context) {
|
|||
renderOpenSearchTemplate({
|
||||
title,
|
||||
url: url + baseUrl,
|
||||
favicon: normalizeUrl([url, baseUrl, favicon]),
|
||||
favicon: favicon ? normalizeUrl([url, baseUrl, favicon]) : null,
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
|
|
|
@ -12,7 +12,9 @@ module.exports = `
|
|||
<ShortName><%= it.title %></ShortName>
|
||||
<Description>Search <%= it.title %></Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<% if (it.favicon) { _%>
|
||||
<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" />
|
||||
<moz:SearchForm><%= it.url %></moz:SearchForm>
|
||||
|
|
Loading…
Add table
Reference in a new issue