Skip to content

Commit bf62278

Browse files
committed
Restore previous behaviour for meta field
1 parent 4d0a515 commit bf62278

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.ejs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ const { options } = htmlWebpackPlugin;
33
44
const lang = options.lang || 'en';
55
const title = options.title;
6-
const description = options.description;
76
const mobile = options.mobile;
7+
const metaTags = Array.isArray(options.meta) ? options.meta : [options.meta];
88
const headHtmlSnippet = options.headHtmlSnippet;
99
const unsupportedBrowser = options.unsupportedBrowser;
1010
const bodyHtmlSnippet = options.bodyHtmlSnippet;
@@ -33,8 +33,8 @@ const scripts = (options.scripts || []).map(script => {
3333
<meta charset="utf-8">
3434
<meta content="ie=edge" http-equiv="x-ua-compatible">
3535
<title><%= title %></title><%
36-
if (description) { %>
37-
<meta name="description" content="<%= description %>"><%
36+
for (let item of metaTags) { %>
37+
<meta<% for (let [key, value] of Object.entries(item)){ %> <%= key %>="<%= value %>"<% } %>><%
3838
} %><%
3939
if (mobile) { %>
4040
<meta content="width=device-width, initial-scale=1" name="viewport"><%

0 commit comments

Comments
 (0)