0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix(middleware): link to favicon in template (#4727)

This commit is contained in:
Marc Bernard 2024-07-21 12:00:37 -04:00 committed by GitHub
parent 39f7fd6057
commit 6c5f7a4fa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 7 deletions

View file

@ -0,0 +1,5 @@
---
'@verdaccio/middleware': patch
---
fix(middleware): link to favicon in template

View file

@ -30,7 +30,7 @@ export default function renderTemplate(template: Template, manifest: WebpackMani
<meta charset="utf-8">
<base href="${template?.options.base}">
<title>${template?.options?.title ?? ''}</title>
<link rel="icon" href="${template?.options.base}-/static/favicon.ico"/>
<link rel="icon" href="${template?.options.base}/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS=${JSON.stringify(template.options)}

View file

@ -8,7 +8,7 @@ exports[`template custom body after 1`] = `
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<link rel="icon" href="http://domain.com/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
@ -33,7 +33,7 @@ exports[`template custom body before 1`] = `
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<link rel="icon" href="http://domain.com/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
@ -58,7 +58,7 @@ exports[`template custom render 1`] = `
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<link rel="icon" href="http://domain.com/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
@ -83,7 +83,7 @@ exports[`template custom title 1`] = `
<meta charset="utf-8">
<base href="http://domain.com">
<title>foo title</title>
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<link rel="icon" href="http://domain.com/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com","title":"foo title"}
@ -108,7 +108,7 @@ exports[`template custom title 2`] = `
<meta charset="utf-8">
<base href="http://domain.com">
<title>foo title</title>
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<link rel="icon" href="http://domain.com/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com","title":"foo title"}
@ -133,7 +133,7 @@ exports[`template meta scripts 1`] = `
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<link rel="icon" href="http://domain.com/-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}