chore: update readme

This commit is contained in:
2026-03-19 18:30:42 +01:00
parent 16e5107185
commit 1c67eb0cff
+38 -20
View File
@@ -2,35 +2,40 @@
Personal portfolio website for Schreifuchs, featuring photography, informatics, music, and video.
The site is built with **Svelte 5** and **SvelteKit**, and it is powered by a dynamic **Nextcloud** backend via WebDAV.
The site is built with **Go**, **templ**, and **HTMX**, and it is powered by a dynamic **Nextcloud** backend via WebDAV.
## Features
- **Dynamic Content:** Pages are automatically discovered based on the folder structure in Nextcloud.
- **Hidden Sites:** Folders starting with `_` are excluded from the navigation menu but remain accessible via direct links.
- **Markdown Driven:** Content for each page is fetched from a corresponding Markdown file.
- **Markdown Driven:** Content for each page is fetched from a corresponding Markdown file and rendered via `gomarkdown`.
- **Image Optimization:** Automatic image resizing via Nextcloud's Preview API for optimized delivery and `srcset` support.
- **Asset Proxying:** Images and attachments are securely streamed from Nextcloud through a server-side proxy.
- **Performance:** In-memory caching for Nextcloud requests (15-minute TTL).
- **Responsive Design:** Styled with Tailwind CSS, optimized for all screen sizes.
- **Performance:** Multi-layer caching using **Valkey** (Redis-compatible) for WebDAV requests and image scaling.
- **Responsive Design:** Styled with **Tailwind CSS**, optimized for all screen sizes.
## Tech Stack
- **Framework:** Svelte 5 (Runes) & SvelteKit
- **Backend:** Go (Golang)
- **UI Components:** [templ](https://templ.guide/)
- **Frontend Interactivity:** [HTMX](https://htmx.org/)
- **Styling:** Tailwind CSS
- **Backend:** Node.js (via `@sveltejs/adapter-node`)
- **Integration:** `webdav` library for Nextcloud communication
- **Content:** `@ts-stack/markdown` for rendering
- **Caching:** Valkey
- **Integration:** `gowebdav` for Nextcloud communication
- **Content:** `github.com/gomarkdown/markdown` for rendering
## Configuration
The application requires the following environment variables in a `.env` file:
```env
NEXTCLOUD_URL=https://your-nextcloud-instance.com
NEXTCLOUD_USER=your_username
NEXTCLOUD_PASSWORD=your_app_password
NEXTCLOUD_BASE_DIR=WebsiteContent # Optional: Root folder for site content
FILESYSTEM_URL=https://your-nextcloud-instance.com/remote.php/dav/files/user/
FILESYSTEM_USERNAME=your_username
FILESYSTEM_PASSWORD=your_app_password
CACHE_ADDRESS=localhost:6379
CACHE_PASSWORD=your_valkey_password
PORT=8080
LOG_LEVEL=DEBUG
```
## Content Management
@@ -45,32 +50,45 @@ To add or update content, manage files in your configured Nextcloud directory:
## Development
Install dependencies:
Install dependencies (Go, pnpm, and the `templ` binary):
```bash
# Install Go dependencies
go mod tidy
# Install JS/CSS dependencies
pnpm install
```
Start the development server:
Start the development server with hot reloading:
```bash
pnpm run dev
air
```
For CSS changes, run in a separate terminal:
```bash
pnpm run watch:css
```
## Building
Build for production (Node.js):
Build the project for production:
```bash
pnpm run build
# Generate Go code from Templ files
go generate ./...
# Build CSS
pnpm run build:css
# Build Go binary
go build -o ./tmp/main ./cmd/schreifuchs-ch/main.go
```
The output will be in the `build/` directory, ready to be served by Node.
## Image Processing
To optimize images before uploading to Nextcloud:
```bash
convert input.png -resize 3000 -quality 80 output.webp
```
```