Configurable page title
This commit is contained in:
parent
eb6b87cf1f
commit
01b6581275
|
@ -6,4 +6,5 @@ export default {
|
||||||
https_proxy: process.env.RIMGU_HTTPS_PROXY || null,
|
https_proxy: process.env.RIMGU_HTTPS_PROXY || null,
|
||||||
imgur_client_id: process.env.RIMGU_IMGUR_CLIENT_ID || null,
|
imgur_client_id: process.env.RIMGU_IMGUR_CLIENT_ID || null,
|
||||||
disable_comments: process.env.RIMGU_DISABLE_COMMENTS === 'true',
|
disable_comments: process.env.RIMGU_DISABLE_COMMENTS === 'true',
|
||||||
|
page_title: process.env.RIMGU_PAGE_TITLE || 'rimgu',
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,7 @@ export const handleAlbum = async (request: Hapi.Request, h: Hapi.ResponseToolkit
|
||||||
const url = await fetchAlbumURL(request.params.albumID);
|
const url = await fetchAlbumURL(request.params.albumID);
|
||||||
return h.view('album', {
|
return h.view('album', {
|
||||||
url,
|
url,
|
||||||
|
title: CONFIG.page_title,
|
||||||
util,
|
util,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -44,6 +45,7 @@ export const handleGallery = async (request: Hapi.Request, h: Hapi.ResponseToolk
|
||||||
return h.view('gallery', {
|
return h.view('gallery', {
|
||||||
...gallery,
|
...gallery,
|
||||||
comments,
|
comments,
|
||||||
|
title: CONFIG.page_title,
|
||||||
util,
|
util,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
html
|
html
|
||||||
head
|
head
|
||||||
title imgur-proxy
|
title #{title}
|
||||||
include includes/head.pug
|
include includes/head.pug
|
||||||
body
|
body
|
||||||
img(src=util.proxyURL(url), alt='' class='album-img')
|
img(src=util.proxyURL(url), alt='' class='album-img')
|
||||||
|
|
|
@ -34,7 +34,7 @@ mixin commentbox(comment)
|
||||||
+commentbox(reply)
|
+commentbox(reply)
|
||||||
html
|
html
|
||||||
head
|
head
|
||||||
title imgur-proxy
|
title #{title}
|
||||||
include includes/head.pug
|
include includes/head.pug
|
||||||
body
|
body
|
||||||
div(class='Gallery-Content')
|
div(class='Gallery-Content')
|
||||||
|
|
Loading…
Reference in New Issue