fix metadata on homepage

This commit is contained in:
Jeremy Kauffman 2019-10-07 08:48:14 -04:00 committed by Sean Yesmunt
parent 6a58cd0265
commit 0b7e4a8bb0
2 changed files with 12 additions and 4 deletions

View file

@ -54,14 +54,14 @@ function truncateDescription(description) {
}
function insertToHead(fullHtml, htmlToInsert) {
return fullHtml.replace('<!-- HEAD_REPLACEMENT_TOKEN -->', htmlToInsert);
return fullHtml.replace(/<!-- VARIABLE_HEAD_BEGIN -->.*<!-- VARIABLE_HEAD_END -->/s, htmlToInsert);
}
const defaultHead =
'<title>lbry.tv</title>\n' +
`<meta property="og:url" content="${DOMAIN}" />\n` +
'<meta property="og:title" content="LBRY On The Web" />\n' +
'<meta property="og:site_name" content="LBRY.tv"/>\n' +
'<meta property="og:title" content="lbry.tv" />\n' +
'<meta property="og:site_name" content="lbry.tv"/>\n' +
'<meta property="og:description" content="All your favorite LBRY content in your browser." />\n' +
`<meta property="og:image" content="${DOMAIN}/og.png" />\n` +
'<meta property="fb:app_id" content="1673146449633983" />';

View file

@ -2,7 +2,15 @@
<html>
<head>
<meta charset="utf-8" />
<!-- HEAD_REPLACEMENT_TOKEN -->
<!-- VARIABLE_HEAD_BEGIN -->
<title>lbry.tv</title>
<meta property="og:url" content="https://beta.lbry.tv" />
<meta property="og:title" content="lbry.tv" />
<meta property="og:site_name" content="lbry.tv"/>
<meta property="og:description" content="All your favorite LBRY content in your browser." />
<meta property="og:image" content="https://beta.lbry.tv/og.png" />
<meta property="fb:app_id" content="1673146449633983" />
<!-- VARIABLE_HEAD_END -->
</head>
<body>