init elas atelier
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Narlblog
|
||||
# Ela's Atelier
|
||||
|
||||
A single-author blog. Rust/Axum API backed by markdown files on disk; Astro/React frontend with a glass-effect Catppuccin theme. KaTeX math, GFM tables, server-side syntax highlighting, draft posts, RSS feed.
|
||||
A single-curator art portfolio. Rust/Axum API backed by markdown files on disk; Astro/React frontend with a parchment "Salon Hang" aesthetic. Each entry is a markdown post that must contain at least one image; the first image becomes the cover plate in the catalogue.
|
||||
|
||||
```
|
||||
backend/ Rust + Axum API (filesystem-backed)
|
||||
@@ -28,15 +28,15 @@ sudo chown -R 1000:1000 data/
|
||||
|
||||
## Environment
|
||||
|
||||
| Variable | Required | Default | Notes |
|
||||
| ----------------- | -------- | ----------------- | --------------------------------------------------------------------------- |
|
||||
| `ADMIN_TOKEN` | yes | — | Long random string. Stored as an HttpOnly cookie after login. |
|
||||
| `PORT` | no | `3000` | Backend port. |
|
||||
| `DATA_DIR` | no | `/app/data` | Where posts/uploads/config live. |
|
||||
| `COOKIE_SECURE` | no | `true` | Set `false` only for local HTTP development. |
|
||||
| `FRONTEND_ORIGIN` | no | _empty_ | Set to your frontend's URL only if you expose the backend directly. |
|
||||
| `RUST_LOG` | no | `info` | tracing-subscriber filter. |
|
||||
| `PUBLIC_API_URL` | no | `http://backend:3000` | Backend URL the Astro proxy hits server-to-server. |
|
||||
| Variable | Required | Default | Notes |
|
||||
| ----------------- | -------- | --------------------- | --------------------------------------------------------------------------- |
|
||||
| `ADMIN_TOKEN` | yes | — | Long random string. Stored as an HttpOnly cookie after login. |
|
||||
| `PORT` | no | `3000` | Backend port. |
|
||||
| `DATA_DIR` | no | `/app/data` | Where posts/uploads/config live. |
|
||||
| `COOKIE_SECURE` | no | `true` | Set `false` only for local HTTP development. |
|
||||
| `FRONTEND_ORIGIN` | no | _empty_ | Set to your frontend's URL only if you expose the backend directly. |
|
||||
| `RUST_LOG` | no | `info` | tracing-subscriber filter. |
|
||||
| `PUBLIC_API_URL` | no | `http://backend:3000` | Backend URL the Astro proxy hits server-to-server. |
|
||||
|
||||
## Local development
|
||||
|
||||
@@ -58,27 +58,31 @@ npm run dev
|
||||
|
||||
For a fully local stack, set `PUBLIC_API_URL=http://localhost:3000` in `frontend/.env`.
|
||||
|
||||
## Authoring posts
|
||||
## Authoring a work
|
||||
|
||||
Posts are markdown files at `data/posts/<slug>.md` with YAML frontmatter:
|
||||
Each work is a markdown file at `data/posts/<slug>.md` with YAML frontmatter. Every work **must** contain at least one markdown image — the first image becomes the cover plate on the gallery index. Image alt text becomes the figure caption on the work page.
|
||||
|
||||
```markdown
|
||||
---
|
||||
date: 2026-05-09
|
||||
summary: Optional summary; falls back to auto-extracted excerpt.
|
||||
summary: Optional short caption shown beneath the plate on the index.
|
||||
tags:
|
||||
- rust
|
||||
- astro
|
||||
- oil
|
||||
- 2026
|
||||
draft: false
|
||||
---
|
||||
# My post
|
||||
# Untitled (charcoal on paper)
|
||||
|
||||
Body in **markdown**, with $LaTeX$ via `$…$` / `$$…$$`, GFM tables, and fenced code blocks (```rust, ```ts, …).
|
||||

|
||||
|
||||
Notes on the piece: materials, references, what worked, what didn't.
|
||||
|
||||

|
||||
```
|
||||
|
||||
Posts with `draft: true` are hidden from the public list and 404 when accessed by anyone without an admin session. Posts are sorted by `date` descending on the frontpage.
|
||||
|
||||
The web editor at `/admin/editor` writes the same format and updates atomically (write to `.tmp`, rename over target).
|
||||
- `draft: true` hides a work from the public catalogue and 404s for non-curators.
|
||||
- Works are sorted by `date` descending on the index.
|
||||
- The web editor at `/admin/editor` writes the same format and updates atomically.
|
||||
|
||||
## Uploads
|
||||
|
||||
@@ -86,12 +90,18 @@ Allowlisted extensions: jpg, jpeg, png, webp, gif, avif, pdf, txt, md, mp3, wav,
|
||||
|
||||
Max upload size: 50 MB.
|
||||
|
||||
## Theme
|
||||
|
||||
The default theme is **Salon** — aged parchment, oxblood ink, Fraunces/EB Garamond/Caveat typography. A **Salon Noir** variant (black gallery wall) is available via the theme switcher in the header.
|
||||
|
||||
Influences: Friedrich, Goya, Kahlo, Tillmans, Basquiat, Sherman, Matisse, Dix, Abramović.
|
||||
|
||||
## Backups
|
||||
|
||||
The deployed `data/` directory is the entire blog. Back it up with whatever you trust — `rsync`, restic, borg, a sidecar container; nothing fancy is built in.
|
||||
The deployed `data/` directory is the entire gallery. Back it up with whatever you trust — `rsync`, restic, borg, a sidecar container; nothing fancy is built in.
|
||||
|
||||
```sh
|
||||
rsync -av data/ backup-host:/path/to/narlblog-data/
|
||||
rsync -av data/ backup-host:/path/to/gallery-data/
|
||||
```
|
||||
|
||||
## Stack
|
||||
|
||||
Reference in New Issue
Block a user