Skip to content

Commit

Permalink
chore: better string
Browse files Browse the repository at this point in the history
  • Loading branch information
MadCcc committed Dec 26, 2023
1 parent 3c5b150 commit b7bce5d
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions packages/renderer-react/src/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,27 @@ export function getServerHTMLStart({
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
${metadata?.title && `<title>${metadata.title}</title>`}
${metadata?.title ? `<title>${metadata.title}</title>` : ''}
${
metadata?.description &&
`<meta name="description" content="${metadata.description}" />`
metadata?.description
? `<meta name="description" content="${metadata.description}" />`
: ''
}
${
metadata?.keywords?.length &&
`<meta name="keywords" content="${metadata.keywords.join(',')}" />`
metadata?.keywords?.length
? `<meta name="keywords" content="${metadata.keywords.join(',')}" />`
: ''
}
${metadata?.metas?.map(
(em: any) =>
`<meta key="${em.name}" name="${em.name}" content="${em.content}" />`,
)}
${
manifest.assets['umi.css'] &&
`<link rel="stylesheet" href="${manifest.assets['umi.css']}" />`
metadata?.metas?.map(
(em: any) =>
`<meta key="${em.name}" name="${em.name}" content="${em.content}" />`,
) || ''
}
${
manifest.assets['umi.css']
? `<link rel="stylesheet" href="${manifest.assets['umi.css']}" />`
: ''
}
</head>
<body>
Expand Down

0 comments on commit b7bce5d

Please sign in to comment.