meta tags pls
This commit is contained in:
parent
379c178f59
commit
56918b9358
@ -27,9 +27,10 @@
|
|||||||
<title>Corgi Corner</title>
|
<title>Corgi Corner</title>
|
||||||
<meta name='author' content='{{META_author}}' />
|
<meta name='author' content='{{META_author}}' />
|
||||||
<meta property='og:url' content='{{META_url}}' />
|
<meta property='og:url' content='{{META_url}}' />
|
||||||
<meta property='og:image' content={{META_thumbnail}} />
|
<!-- <meta property='og:image' content={{META_thumbnail}} /> -->
|
||||||
|
<meta property='og:video' content='{{META_url}}' />
|
||||||
<meta property='og:video:url' content={{META_srcUrl}} />
|
<meta property='og:video:url' content={{META_srcUrl}} />
|
||||||
<meta property='og:video:type' content='text/html' />
|
<meta property='og:video:type' content='video/mp4' />
|
||||||
<meta property='og:type' content='video.other' />
|
<meta property='og:type' content='video.other' />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -37,12 +37,12 @@ class Home extends Endpoint {
|
|||||||
async get(req, res) {
|
async get(req, res) {
|
||||||
|
|
||||||
console.log('\n\n\nPATH', req.path, '\n\n\n');
|
console.log('\n\n\nPATH', req.path, '\n\n\n');
|
||||||
const { path, protocol } = req;
|
const { path } = req;
|
||||||
if ((/\/media\/.+/u).test(path)) {
|
if ((/\/media\/.+/u).test(path)) {
|
||||||
|
|
||||||
const title = decodeURI(path.replace('/media/', ''));
|
const title = decodeURI(path.replace('/media/', ''));
|
||||||
const clip = this.client.clipIndex.getByTitle(title);
|
const clip = this.client.clipIndex.getByTitle(title);
|
||||||
const baseUrl = `${protocol}://${this.client.domain}`;
|
const baseUrl = `https://${this.client.domain}`;
|
||||||
const clientUrl = `${baseUrl}${path}`;
|
const clientUrl = `${baseUrl}${path}`;
|
||||||
const thumbnailUrl = `${baseUrl}/thumbnails/${clip.thumbnail}`;
|
const thumbnailUrl = `${baseUrl}/thumbnails/${clip.thumbnail}`;
|
||||||
const clipUrl = `${baseUrl}/clips/${clip.filename}`;
|
const clipUrl = `${baseUrl}/clips/${clip.filename}`;
|
||||||
@ -50,10 +50,10 @@ class Home extends Endpoint {
|
|||||||
console.log(this.index);
|
console.log(this.index);
|
||||||
const html = this.index.
|
const html = this.index.
|
||||||
// replace(`<title>Corgi Corner</title>`, clip.name).
|
// replace(`<title>Corgi Corner</title>`, clip.name).
|
||||||
replace(`{{META_author}}`, clip.uploader.tag).
|
replace(/{{META_author}}/ug, clip.uploader.tag).
|
||||||
replace(`{{META_url}}`, clientUrl).
|
replace(/{{META_url}}/ug, clientUrl).
|
||||||
replace(`{{META_thumbnail}}`, thumbnailUrl).
|
replace(/{{META_thumbnail}}/ug, thumbnailUrl).
|
||||||
replace(`{{META_srcUrl}}`, clipUrl);
|
replace(/{{META_srcUrl}}/ug, clipUrl);
|
||||||
console.log(html);
|
console.log(html);
|
||||||
return res.send(html);
|
return res.send(html);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user