fix(sharing): give context to title and use proper og:image

This commit is contained in:
Benedikt Rötsch
2017-10-25 13:24:39 +02:00
committed by Benedikt Rötsch
parent 5ddccf27d2
commit 490ec80f89
3 changed files with 14 additions and 4 deletions

View File

@@ -14,3 +14,10 @@ function removeIvalidDataURL (content) {
let regex = /data:\S+;base64\S*/gm
return content.replace(regex, '#')
}
exports.formatMetaTitle = (title) => {
if (!title) {
return 'The Example App'
}
return `${title.charAt(0).toUpperCase()}${title.slice(1)} — The Example App`
}