From 257239257130b6b3197757748497202c70a9ee7e Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Sun, 21 Jul 2024 22:09:11 +0200 Subject: [PATCH] feat: :sparkles: Add friendly message after doctype on every page --- server/plugins/DocumentComment.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 server/plugins/DocumentComment.ts diff --git a/server/plugins/DocumentComment.ts b/server/plugins/DocumentComment.ts new file mode 100644 index 0000000..c099ac7 --- /dev/null +++ b/server/plugins/DocumentComment.ts @@ -0,0 +1,27 @@ +const art = ` + +██╗ ██╗ ██╗███████╗ █████╗ ███╗ ██╗██████╗ +██║ ╚██╗ ██╔╝██╔════╝██╔══██╗████╗ ██║██╔══██╗ +██║ ╚████╔╝ ███████╗███████║██╔██╗ ██║██║ ██║ +██║ ╚██╔╝ ╚════██║██╔══██║██║╚██╗██║██║ ██║ +███████╗██║ ███████║██║ ██║██║ ╚████║██████╔╝ +╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ + +* Hello from the Lysand development team! +* If you are seeing this, we may need your help! +* Join development at https://github.com/lysand-org +* +* With ❤️ from us: +* - @jessew@social.lysand.org +* - @aprl@social.lysand.org +* - @graphite@social.lysand.org +`; + +export default defineNitroPlugin((nitroApp) => { + nitroApp.hooks.hook("render:response", (ctx) => { + ctx.body = ctx.body.replace( + "", + `\n\n`, + ); + }); +});