add some more meta data
This commit is contained in:
parent
5b0e9d1d2d
commit
ecbf015cb6
3 changed files with 8 additions and 3 deletions
|
@ -8,6 +8,7 @@ import Article from './article/model.mjs'
|
||||||
|
|
||||||
const body = readFileSync('./public/index.html').toString()
|
const body = readFileSync('./public/index.html').toString()
|
||||||
const bodyTemplate = dot.template(body)
|
const bodyTemplate = dot.template(body)
|
||||||
|
const frontend = config.get('frontend:url')
|
||||||
|
|
||||||
function mapArticle(x) {
|
function mapArticle(x) {
|
||||||
return {
|
return {
|
||||||
|
@ -76,7 +77,8 @@ export async function serveIndex(ctx, path) {
|
||||||
let tree = null
|
let tree = null
|
||||||
let data = null
|
let data = null
|
||||||
let links = null
|
let links = null
|
||||||
let image = '/assets/img/heart.jpg'
|
let url = frontend + ctx.request.url
|
||||||
|
let image = frontend + '/assets/img/heart.jpg'
|
||||||
let title = 'NFP Moe - Anime/Manga translation group'
|
let title = 'NFP Moe - Anime/Manga translation group'
|
||||||
let description = 'Small fansubbing and scanlation group translating and encoding our favourite shows from Japan.'
|
let description = 'Small fansubbing and scanlation group translating and encoding our favourite shows from Japan.'
|
||||||
try {
|
try {
|
||||||
|
@ -139,6 +141,7 @@ export async function serveIndex(ctx, path) {
|
||||||
tree: JSON.stringify(tree),
|
tree: JSON.stringify(tree),
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
links: JSON.stringify(links),
|
links: JSON.stringify(links),
|
||||||
|
url: url,
|
||||||
image: image,
|
image: image,
|
||||||
title: title,
|
title: title,
|
||||||
description: description,
|
description: description,
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"frontend": {
|
"frontend": {
|
||||||
"url": "http://localhost:8080"
|
"url": "http://beta01.nfp.moe"
|
||||||
},
|
},
|
||||||
"jwt": {
|
"jwt": {
|
||||||
"secret": "this-is-my-secret",
|
"secret": "this-is-my-secret",
|
||||||
|
|
|
@ -8,8 +8,10 @@
|
||||||
<meta name="twitter:card" value="summary">
|
<meta name="twitter:card" value="summary">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta id="ogimage" property="og:image" content="{{=it.image}}" />
|
<meta property="og:url" content="{{=it.url}}" />
|
||||||
|
<meta property="og:image" content="{{=it.image}}" />
|
||||||
<meta property="og:description" content="{{=it.description}}" />
|
<meta property="og:description" content="{{=it.description}}" />
|
||||||
|
<meta property="og:title" content="{{=it.title}}" />
|
||||||
{{? it.image === '/assets/img/heart.jpg' }}
|
{{? it.image === '/assets/img/heart.jpg' }}
|
||||||
<meta id="ogimagewidth" property="og:image:width" content="400" />
|
<meta id="ogimagewidth" property="og:image:width" content="400" />
|
||||||
<meta id="ogimageheight" property="og:image:height" content="500" />
|
<meta id="ogimageheight" property="og:image:height" content="500" />
|
||||||
|
|
Loading…
Reference in a new issue