fix(sharing): give context to title and use proper og:image
This commit is contained in:
committed by
Benedikt Rötsch
parent
5ddccf27d2
commit
490ec80f89
@@ -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`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user