From 2e8e1f57cc7618c4cbc198153dde3927b076b08c Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Fri, 4 Sep 2020 21:36:40 +0900 Subject: [PATCH] feat: add charset and viewport meta tags (#77) --- src/client/app/composables/head.ts | 8 ++++++++ src/node/build/render.ts | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/client/app/composables/head.ts b/src/client/app/composables/head.ts index 448e3d260b5a..30b17770bcf2 100644 --- a/src/client/app/composables/head.ts +++ b/src/client/app/composables/head.ts @@ -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', { diff --git a/src/node/build/render.ts b/src/node/build/render.ts index 51ad2c3934c7..365f63b075a4 100644 --- a/src/node/build/render.ts +++ b/src/node/build/render.ts @@ -56,6 +56,8 @@ export async function renderPage( const html = ` + + ${pageData.title ? pageData.title + ` | ` : ``}${ siteData.title }