Content lives in data/profile.yaml and is edited as structured fields through Sveltia at /admin/, so the page is never hand-written HTML. The CMS bundle is vendored at a pinned version instead of loaded from unpkg, and the admin assets ship with the built site, so hosting and builds stay self-contained. PKCE sign-in activates once a Gitea OAuth application client ID is added to static/admin/config.yml.
This commit is contained in:
commit
0341edc73d
30 files changed
+4181
No files matched your search
@@ -0,0 +1,58 @@
|
||||
# williammiceli.me
|
||||
|
||||
Single-page contact and links site. Hugo renders one page from `data/profile.yaml`; Sveltia CMS at `/admin/` edits that file through Gitea.
|
||||
|
||||
## Structure
|
||||
|
||||
- `hugo.yaml` — site configuration.
|
||||
- `content/_index.md` — page title and meta description.
|
||||
- `data/profile.yaml` — name, tagline, initials, avatar, links.
|
||||
- `layouts/index.html` — the page.
|
||||
- `assets/css/main.css` — styles, light and dark.
|
||||
- `assets/icons/` — inline SVG icons (Bootstrap Icons, MIT).
|
||||
- `static/admin/` — Sveltia CMS: loader page, config, vendored bundle (Sveltia CMS 0.251.0, MIT).
|
||||
- `static/uploads/` — media uploaded through the CMS.
|
||||
|
||||
## Local preview
|
||||
|
||||
Requires Hugo 0.168 or newer; the standard (non-extended) binary builds this site.
|
||||
|
||||
```bash
|
||||
hugo server
|
||||
```
|
||||
|
||||
## Admin
|
||||
|
||||
The editor lives at `/admin/` and commits directly to this repository.
|
||||
|
||||
### Gitea OAuth (PKCE)
|
||||
|
||||
1. Gitea → Settings → Applications → OAuth2 Applications → Create.
|
||||
2. Redirect URI: `https://williammiceli.me/admin/` plus `http://localhost:1313/admin/` for local use.
|
||||
3. Leave "Confidential client" unchecked.
|
||||
4. Add the Client ID to `static/admin/config.yml`:
|
||||
|
||||
```yaml
|
||||
backend:
|
||||
name: gitea
|
||||
repo: William/williammiceli.me
|
||||
base_url: https://gitea.williammiceli.systems
|
||||
api_root: https://gitea.williammiceli.systems/api/v1
|
||||
app_id: <client-id>
|
||||
```
|
||||
|
||||
Without `app_id`, the admin offers personal-access-token sign-in instead.
|
||||
|
||||
The local workflow (editing a working copy without committing) needs a Chromium-based browser.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
hugo --minify --gc
|
||||
```
|
||||
|
||||
Output lands in `public/`. The Gitea Actions workflow runs the same build on every push.
|
||||
|
||||
## Deploy
|
||||
|
||||
Not wired yet: the site is static output; publishing means serving `public/` from the cluster and pointing `williammiceli.me` at it.
|
||||
Reference in new issue
Block a user