diff --git a/api/serveindex.mjs b/api/serveindex.mjs
index be57fb3..2b1603e 100644
--- a/api/serveindex.mjs
+++ b/api/serveindex.mjs
@@ -8,6 +8,7 @@ import Article from './article/model.mjs'
const body = readFileSync('./public/index.html').toString()
const bodyTemplate = dot.template(body)
+const frontend = config.get('frontend:url')
function mapArticle(x) {
return {
@@ -76,7 +77,8 @@ export async function serveIndex(ctx, path) {
let tree = null
let data = 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 description = 'Small fansubbing and scanlation group translating and encoding our favourite shows from Japan.'
try {
@@ -139,6 +141,7 @@ export async function serveIndex(ctx, path) {
tree: JSON.stringify(tree),
data: JSON.stringify(data),
links: JSON.stringify(links),
+ url: url,
image: image,
title: title,
description: description,
diff --git a/config/config.default.json b/config/config.default.json
index 8e8e998..1a0093b 100644
--- a/config/config.default.json
+++ b/config/config.default.json
@@ -27,7 +27,7 @@
]
},
"frontend": {
- "url": "http://localhost:8080"
+ "url": "http://beta01.nfp.moe"
},
"jwt": {
"secret": "this-is-my-secret",
diff --git a/public/index.html b/public/index.html
index 9704155..1a8212a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -8,8 +8,10 @@
-
+
+
+
{{? it.image === '/assets/img/heart.jpg' }}