diff --git a/README.md b/README.md index 1c55bff..e564056 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ Personal website and central hub for my projects, systems, and self-hosted servi This site is not just a portfolio — it acts as an entry point into a larger ecosystem of applications, infrastructure, and experiments. ---- - ## Overview The site is divided into three conceptual layers: @@ -38,8 +36,6 @@ Dedicated pages for deeper content: - About — personal background and context - CV — formal resume (if applicable) ---- - ## Philosophy This site is intentionally minimal and system-oriented. @@ -53,8 +49,6 @@ Instead of a traditional portfolio, it focuses on: It evolves alongside my personal development and technical interests. ---- - ## Stack - React @@ -63,8 +57,6 @@ It evolves alongside my personal development and technical interests. - Catppuccin theme - Self-hosted backend services (Forgejo, Nextcloud, etc.) ---- - ## Status This site is continuously evolving and serves as both a portfolio and experimental environment. diff --git a/frontend/package.json b/frontend/package.json index 9ac9bcb..37a0674 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,8 +14,6 @@ "react": "^19.2.4", "react-dom": "^19.2.4", "react-markdown": "^10.1.0", - "remark": "^15.0.1", - "remark-html": "^16.0.1", "tailwindcss": "^4.2.2" }, "devDependencies": { diff --git a/frontend/src.zip b/frontend/src.zip deleted file mode 100644 index 6b6f33f..0000000 Binary files a/frontend/src.zip and /dev/null differ diff --git a/frontend/src/components/ProjectsReadme.jsx b/frontend/src/components/ProjectsReadme.jsx index 92c40f0..09ab4bd 100644 --- a/frontend/src/components/ProjectsReadme.jsx +++ b/frontend/src/components/ProjectsReadme.jsx @@ -1,31 +1,149 @@ import { useEffect, useState } from "react"; import ReactMarkdown from "react-markdown"; -const fetchREADME = async (url) => { +const fetchREADME = async (repoUrl) => { try { - const response = await fetch(url); + let rawUrl = repoUrl; + + if (repoUrl.includes("/src/branch/")) { + rawUrl = repoUrl.replace("/src/branch/", "/raw/branch/"); + } else if ( + repoUrl.includes("github.com") && + !repoUrl.includes("raw.githubusercontent.com") + ) { + rawUrl = repoUrl + .replace("github.com", "raw.githubusercontent.com") + .replace("/blob/", "/"); + } + + const response = await fetch(rawUrl); if (!response.ok) throw new Error("Failed to fetch README"); return await response.text(); } catch (error) { console.error(error); - return "Error fetching README."; + return "Error fetching README. Make sure the URL points to a raw markdown file."; } }; -export default function ProjectsReadme() { +export default function ProjectsReadme({ + repoUrl, +}) { const [readmeContent, setReadmeContent] = useState(""); + const [isLoading, setIsLoading] = useState(true); useEffect(() => { - fetchREADME( - // "https://git.aramjonghu.nl/AramJonghu/aramjonghu-site/src/branch/master/README.md", - "../../../README.md", - ).then((content) => setReadmeContent(content)); - }, []); + setIsLoading(true); + fetchREADME(repoUrl).then((content) => { + setReadmeContent(content); + setIsLoading(false); + }); + }, [repoUrl]); return ( -
+ {children}
+
+ );
+ },
+ pre({ children, ...props }) {
+ return (
+
+ {children}
+
+ );
+ },
+ h1: ({ children }) => (
+ {children}
+ ), + ul: ({ children }) => ( ++ {children} ++ ), + img: ({ src, alt }) => ( +
Systems content goes here.
, }, { id: "about", title: "About", - content: "About content", + content:About content goes here.
, }, ]; @@ -36,13 +85,15 @@ export default function Home() { personal tooling.