Add missing meta tag

This commit is contained in:
Steven 2019-01-21 17:21:11 -05:00
parent 8238d21f2f
commit 6f12dbbfa4
3 changed files with 9 additions and 2 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
node_modules
package-lock.json
dev.html
dev.html
*.js.map
*.js

View File

@ -4,7 +4,9 @@
"description": "Generate an open graph image for twitter/facebook/etc",
"main": "card.js",
"scripts": {
"start": "node card.js"
"start": "node card.js",
"build": "tsc",
"watch": "tsc --watch"
},
"author": "styfle",
"repository": "github:styfle/og-image",

View File

@ -44,6 +44,9 @@ function getCss(fontWeight: FontWeight, fontSize: string) {
export function getHtml(text: string, fontWeight: FontWeight, fontSize: string, images: string[]) {
return `<html>
<meta charset="utf-8">
<title>Generated Image</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
${getCss(fontWeight, fontSize)}
</style>