import { compile } from "ejs"; import { readFileSync } from "fs"; var template = compile(readFileSync("./lib/template.ejs", "utf8")); export default function(code,message,displayOptions){ var msg; // const displayOptions = displayOptions || {}; if (code == 500 && !message){ msg = "

Sorry, we are having trouble fetching posts for this user. Please try again later.


If the issue persists, please open an issue on Gitea, or message sam@froth.zone

"; }else{ msg = message||""; } var options = { opts:{ header:true, theme:displayOptions.theme||null, size:displayOptions.size||null }, meta:{ title:code.toString(), description:msg, link:"#" // avatar:'', // headerImage:'' }, items:[], nextPageLink:null, isIndex:true }; return template(options); }