1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01: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

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

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

@ -8,7 +8,7 @@ exports[`template custom body after 1`] = `
<meta charset="utf-8"> <meta charset="utf-8">
<base href="http://domain.com"> <base href="http://domain.com">
<title></title> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script> <script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"} window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
@ -33,7 +33,7 @@ exports[`template custom body before 1`] = `
<meta charset="utf-8"> <meta charset="utf-8">
<base href="http://domain.com"> <base href="http://domain.com">
<title></title> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script> <script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"} window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
@ -58,7 +58,7 @@ exports[`template custom render 1`] = `
<meta charset="utf-8"> <meta charset="utf-8">
<base href="http://domain.com"> <base href="http://domain.com">
<title></title> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script> <script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"} window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
@ -83,7 +83,7 @@ exports[`template custom title 1`] = `
<meta charset="utf-8"> <meta charset="utf-8">
<base href="http://domain.com"> <base href="http://domain.com">
<title>foo title</title> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script> <script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com","title":"foo title"} 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"> <meta charset="utf-8">
<base href="http://domain.com"> <base href="http://domain.com">
<title>foo title</title> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script> <script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com","title":"foo title"} 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"> <meta charset="utf-8">
<base href="http://domain.com"> <base href="http://domain.com">
<title></title> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script> <script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"} window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}