aboutsummaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
authornetop://ウィビ <paul@webb.page>2026-05-30 12:36:33 -0700
committernetop://ウィビ <paul@webb.page>2026-05-30 12:36:33 -0700
commitf606f5572883e84ffceaf2b67c763946cab868db (patch)
tree4a4abb29da88cbb677bf24e0f1c532488ea38c53 /src/routes
parentecafa83e14045ebda8a00b251ab62cfc2d7f3012 (diff)
downloadhomepage-f606f5572883e84ffceaf2b67c763946cab868db.tar.gz
homepage-f606f5572883e84ffceaf2b67c763946cab868db.zip
updates blog panel and modularizes about panel
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/api/about.json/+server.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/routes/api/about.json/+server.ts b/src/routes/api/about.json/+server.ts
new file mode 100644
index 0000000..cdfd7b7
--- /dev/null
+++ b/src/routes/api/about.json/+server.ts
@@ -0,0 +1,27 @@
+
+
+
+/*** IMPORT ------------------------------------------- ***/
+
+import { error, json } from "@sveltejs/kit";
+
+/*** UTILITY ------------------------------------------ ***/
+
+import { default as markdown } from "$lib/utility/markdown.ts";
+
+/*** EXPORT ------------------------------------------- ***/
+
+export const POST = async({ fetch, request }) => {
+ try {
+ const response = await fetch("https://about.webb.page", {
+ headers: { "Content-Type": "text/plain" },
+ method: "GET"
+ });
+
+ const content = await response.text();
+ return json({ content: markdown(content) });
+ } catch(welp) {
+ console.error(`Error fetching About: ${String(welp)}`);
+ return error(500);
+ }
+};