A lightweight SvelteKit site that renders a portfolio of projects from Markdown files. Content lives in src/lib/data, is loaded at build time with import.meta.glob(..., { query: '?raw' }), and metadata is parsed from simple front‑matter style lines.
- SvelteKit v2 + Vite 7
- Node adapter (
@sveltejs/adapter-node) for deployment - TypeScript tooling and
svelte-check - ESLint + Prettier
- highlight.js for code blocks
Markdown files are organized by category under src/lib/data/<Category>/<Post>.md. Metadata is declared using single‑line pragmas at the top of each file and parsed by src/lib/components/docMetaStripper.js via serverReader:
#! title: <Title>#! date: YYYY-MM-DD(optional)#! tags: tag1, tag2(optional)#! author: <Name>(optional)#! image: /img/...(optional)#! description: <Short summary>(optional)
Example link to a post from metadata: the loader builds links like /Akron/Brandee from the file path /src/lib/data/Akron/Brandee.md.
/— Homepage. Picks two random posts and shows cards (title, description, image) using metadata./[category]— Category page listing posts in that category./[category]/[post]— Individual post page (Markdown rendered with custom parsers undersrc/lib/components/)./all-projects— All posts across all categories./search— Search UI and server endpoints underroutes/search/androutes/api/search/./sitemap.xml— Static sitemap endpoint./policy— Combined privacy, licensing, copyright, and tool-input ownership page.
Components under src/lib/components include Markdown parsing helpers (MarkdownParser.svelte, mdBasicParser.svelte, mdCodeParser.svelte, etc.), media helpers (DynaImage.svelte, DynaVideo.svelte, DynaGallery.svelte), and layout (Header.svelte, Footer.svelte).
Install dependencies and start the dev server:
npm install
npm run devOpen the URL printed by Vite (typically http://localhost:5173).
Type checking and linting:
npm run check
npm run lint
npm run formatCreate a production build and preview it locally:
npm run build
npm run previewThis project uses @sveltejs/adapter-node. After building, start the server with Node in your target environment:
npm run build
node buildThe output directory is build/ and includes a self‑contained Node server.
dev— Vite dev serverbuild— Vite/SvelteKit production buildpreview— Preview the production buildcheck/check:watch—svelte-checkfor types and diagnosticslint— ESLint + Prettier (check only)format— Prettier write
Utility scripts help prepare media assets.
-
Images:
src/img/0ImgResize.py— Convert images (jpg/png/jpeg/gif) to WebP in place.- Uses Pillow. Walks the script folder and its immediate subfolders.
- Deletes originals after successful conversion.
- Run (PowerShell):
python .\src\img\0ImgResize.py
-
Video:
src/vid/0MovToWebM.py— Convert.movvideos to compressed.webm(VP9 + Opus).- Requires ffmpeg on PATH (Windows builds: https://www.gyan.dev/ffmpeg/builds/). Add
ffmpeg\binto PATH. - Scans the script folder and its immediate subfolders; replaces spaces in filenames with dashes.
- Deletes originals after successful conversion (configurable via env var below).
- Config via environment variables:
WEBM_CRF— VP9 quality (default32, lower is higher quality/larger files)WEBM_CPU_USED— Speed/quality tradeoff for VP9 (default4,0best/slowest →5fastest)WEBM_AUDIO_BITRATE— Opus bitrate (default96k)WEBM_DELETE_ORIGINALS—1to delete originals (default),0to keep
- Run examples (PowerShell):
python .\src\vid\0MovToWebM.py$env:WEBM_CRF=30; python .\src\vid\0MovToWebM.py$env:WEBM_DELETE_ORIGINALS=0; python .\src\vid\0MovToWebM.py
- Requires ffmpeg on PATH (Windows builds: https://www.gyan.dev/ffmpeg/builds/). Add
svelte.config.jssets permissive prerender error handling and usesmodulepreloadoutput.- Fonts and images are under
src/fontsandsrc/img; additional static assets live instatic/.
- Code (everything in this repo except the content folders listed below) is licensed under the MIT License. See
LICENSE. - Content assets are NOT open-licensed and are All Rights Reserved:
src/lib/data/**(Markdown posts and textual content)src/lib/img/**(images, graphics, diagrams)src/lib/vid/**(videos and motion content)
- The hosted website should be treated as a public environment, not a private workspace.
- Do not enter secrets, credentials, personal information, trade secrets, or other confidential material into hosted tools.
- User-entered tool data remains the user's work product; using the site does not transfer ownership of that input to the site owner.
- Ownership is separate from privacy: if confidentiality matters, run the tools locally instead of using the hosted site.
See CONTENT-LICENSE for details. Do not copy, redistribute, or reuse the content assets without explicit permission.