Skip to content

Commit

Permalink
feat: add charset and viewport meta tags (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Sep 4, 2020
1 parent d2b6d39 commit 2e8e1f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/client/app/composables/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export function useUpdateHead(
const pageTitle = pageData && pageData.title
document.title = (pageTitle ? pageTitle + ` | ` : ``) + siteData.title
updateHeadTags([
['meta', { charset: 'utf-8' }],
[
'meta',
{
name: 'viewport',
content: 'width=device-width,initial-scale=1'
}
],
[
'meta',
{
Expand Down
2 changes: 2 additions & 0 deletions src/node/build/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export async function renderPage(
const html = `
<html lang="${siteData.lang}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>${pageData.title ? pageData.title + ` | ` : ``}${
siteData.title
}</title>
Expand Down

0 comments on commit 2e8e1f5

Please sign in to comment.