chore: update readme
This commit is contained in:
@@ -2,35 +2,40 @@
|
|||||||
|
|
||||||
Personal portfolio website for Schreifuchs, featuring photography, informatics, music, and video.
|
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
|
## Features
|
||||||
|
|
||||||
- **Dynamic Content:** Pages are automatically discovered based on the folder structure in Nextcloud.
|
- **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.
|
- **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.
|
- **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.
|
- **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).
|
- **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.
|
- **Responsive Design:** Styled with **Tailwind CSS**, optimized for all screen sizes.
|
||||||
|
|
||||||
## Tech Stack
|
## 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
|
- **Styling:** Tailwind CSS
|
||||||
- **Backend:** Node.js (via `@sveltejs/adapter-node`)
|
- **Caching:** Valkey
|
||||||
- **Integration:** `webdav` library for Nextcloud communication
|
- **Integration:** `gowebdav` for Nextcloud communication
|
||||||
- **Content:** `@ts-stack/markdown` for rendering
|
- **Content:** `github.com/gomarkdown/markdown` for rendering
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The application requires the following environment variables in a `.env` file:
|
The application requires the following environment variables in a `.env` file:
|
||||||
|
|
||||||
```env
|
```env
|
||||||
NEXTCLOUD_URL=https://your-nextcloud-instance.com
|
FILESYSTEM_URL=https://your-nextcloud-instance.com/remote.php/dav/files/user/
|
||||||
NEXTCLOUD_USER=your_username
|
FILESYSTEM_USERNAME=your_username
|
||||||
NEXTCLOUD_PASSWORD=your_app_password
|
FILESYSTEM_PASSWORD=your_app_password
|
||||||
NEXTCLOUD_BASE_DIR=WebsiteContent # Optional: Root folder for site content
|
CACHE_ADDRESS=localhost:6379
|
||||||
|
CACHE_PASSWORD=your_valkey_password
|
||||||
|
PORT=8080
|
||||||
|
LOG_LEVEL=DEBUG
|
||||||
```
|
```
|
||||||
|
|
||||||
## Content Management
|
## Content Management
|
||||||
@@ -45,28 +50,40 @@ To add or update content, manage files in your configured Nextcloud directory:
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Install dependencies:
|
Install dependencies (Go, pnpm, and the `templ` binary):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Install Go dependencies
|
||||||
|
go mod tidy
|
||||||
|
# Install JS/CSS dependencies
|
||||||
pnpm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the development server:
|
Start the development server with hot reloading:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm run dev
|
air
|
||||||
|
```
|
||||||
|
|
||||||
|
For CSS changes, run in a separate terminal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm run watch:css
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Build for production (Node.js):
|
Build the project for production:
|
||||||
|
|
||||||
```bash
|
```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
|
## Image Processing
|
||||||
|
|
||||||
To optimize images before uploading to Nextcloud:
|
To optimize images before uploading to Nextcloud:
|
||||||
@@ -74,3 +91,4 @@ To optimize images before uploading to Nextcloud:
|
|||||||
```bash
|
```bash
|
||||||
convert input.png -resize 3000 -quality 80 output.webp
|
convert input.png -resize 3000 -quality 80 output.webp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user