From 8c34d810af95fae0ef846f54370a8c88bfab7123 Mon Sep 17 00:00:00 2001 From: "netop://ウィビ" Date: Sat, 11 Apr 2026 14:24:49 -0700 Subject: initial commit --- src/utility/constant.ts | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/utility/constant.ts (limited to 'src/utility/constant.ts') diff --git a/src/utility/constant.ts b/src/utility/constant.ts new file mode 100644 index 0000000..d734164 --- /dev/null +++ b/src/utility/constant.ts @@ -0,0 +1,64 @@ + + + +/*** IMPORT ------------------------------------------- ***/ + +import { join } from "dep/std.ts"; + +/*** UTILITY ------------------------------------------ ***/ + +const baseDirectory = await Deno.realPath("."); +const isDevelopment = Deno.args.includes("development"); + +/*** EXPORT ------------------------------------------- ***/ + +export const author = "Paul Anthony Webb"; +export const description = "Welcome to Paul Anthony Webb’s corner of the ’Net where he’ll regale you with whatever he finds interesting."; +export const descriptionRemarks = "Nifty notes and snippets I come across that aren’t suitable for long-form posts."; +export const email = "paul+blog@webb.page"; +export const environment = isDevelopment ? "development" : "production"; +export const feedDirectory = join(baseDirectory, "feed"); +export const memoDirectory = join(baseDirectory, "memos"); +export const port = Number(Deno.env.has("PORT") ? Deno.env.get("PORT") : 3465); +export const remarkDirectory = join(baseDirectory, "remarks"); +export const remarkRegex = /^(WR-\d*).txt$/; +export const title = "the webb blog"; +export const titleRemarks = "the webb blog • remarks"; +export const url = "https://blog.webb.page"; +export const urlRemarks = "https://blog.webb.page/remarks"; + +export async function getVersion() { + let version = ""; + + try { + version = await Deno.readTextFile("./version.txt"); + } catch { + /*** ignore ***/ + } + + return version.trim(); +} + +export const errorMessage = ` + + + + + + + +Document: HTTP 404 ERROR + 20XX + + Not Found + +Body + + Not sure what you were looking for but, it’s not here. Welp. Maybe + try the main page[1]? + +References + + [1] + +`; -- cgit v1.2.3