A web editor at /edit for managing pages and widgets without hand-editing YAML:
- Page list and per-page widget views with breadcrumb navigation
- Add/delete pages, add/delete/reorder widgets within a column
- Per-widget textarea editor with curated starter templates, widget-specific
help (example, full field reference, link to upstream docs), and inline
error rendering that preserves the user's edits on validation failure
- Pre-save validation via newConfigFromYAML; atomic temp+rename writes with
.bak backup; YAML edits go through yaml.Node so comments and unresolved
${env:X}/${secret:X} tokens survive round-trips
- Auth gate: editing requires auth.users to be configured, or
admin.allow-without-auth: true as an explicit opt-in for trusted networks
- Pencil button on the dashboard near the theme picker for quick access
- Admin views read fresh from disk so the list updates immediately after
saves rather than lagging the fsnotify watcher
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
120 lines
3.9 KiB
YAML
120 lines
3.9 KiB
YAML
# --- Edit access ---
|
|
# /edit is locked down by default. Pick ONE of the two blocks below.
|
|
#
|
|
# Option A (recommended): require login.
|
|
# Generate values with:
|
|
# go run . secret:make
|
|
# go run . password:hash <your-password>
|
|
#
|
|
# auth:
|
|
# secret-key: <paste base64 secret here>
|
|
# users:
|
|
# yourname:
|
|
# password-hash: <paste bcrypt hash here>
|
|
#
|
|
# Option B: open /edit without authentication. ONLY on a trusted network —
|
|
# anyone who can reach this server can rewrite your config.
|
|
# (The config key is still named `admin` for backward compatibility.)
|
|
#
|
|
admin:
|
|
allow-without-auth: true
|
|
pages:
|
|
- name: Home
|
|
# Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look
|
|
# hide-desktop-navigation: true
|
|
columns:
|
|
- size: small
|
|
widgets:
|
|
- type: calendar
|
|
first-day-of-week: monday
|
|
- type: rss
|
|
limit: 10
|
|
collapse-after: 3
|
|
cache: 12h
|
|
feeds:
|
|
- url: https://selfh.st/rss/
|
|
title: selfh.st
|
|
limit: 4
|
|
- url: https://ciechanow.ski/atom.xml
|
|
- url: https://www.joshwcomeau.com/rss.xml
|
|
title: Josh Comeau
|
|
- url: https://samwho.dev/rss.xml
|
|
- url: https://ishadeed.com/feed.xml
|
|
title: Ahmad Shadeed
|
|
- url: https://www.techmeme.com/feed.xml
|
|
title: TechMeme
|
|
- type: twitch-channels
|
|
channels:
|
|
- theprimeagen
|
|
- j_blow
|
|
- giantwaffle
|
|
- cohhcarnage
|
|
- christitustech
|
|
- EJ_SA
|
|
- size: full
|
|
widgets:
|
|
- type: group
|
|
widgets:
|
|
- type: hacker-news
|
|
- type: lobsters
|
|
- type: videos
|
|
channels:
|
|
- UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
|
|
- UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling
|
|
- UCsBjURrPoezykLs9EqgamOA # Fireship
|
|
- UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee
|
|
- UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium
|
|
- type: group
|
|
widgets:
|
|
- type: reddit
|
|
subreddit: technology
|
|
show-thumbnails: true
|
|
- type: reddit
|
|
subreddit: selfhosted
|
|
show-thumbnails: true
|
|
- size: small
|
|
widgets:
|
|
- type: weather
|
|
location: London, United Kingdom
|
|
units: metric # alternatively "imperial"
|
|
hour-format: 12h # alternatively "24h"
|
|
# Optionally hide the location from being displayed in the widget
|
|
# hide-location: true
|
|
- type: markets
|
|
markets:
|
|
- symbol: SPY
|
|
name: S&P 500
|
|
- symbol: BTC-USD
|
|
name: Bitcoin
|
|
- symbol: NVDA
|
|
name: NVIDIA
|
|
- symbol: AAPL
|
|
name: Apple
|
|
- symbol: MSFT
|
|
name: Microsoft
|
|
- type: releases
|
|
cache: 1d
|
|
# Without authentication the Github API allows for up to 60 requests per hour. You can create a
|
|
# read-only token from your Github account settings and use it here to increase the limit.
|
|
# token: ...
|
|
repositories:
|
|
- glanceapp/glance
|
|
- go-gitea/gitea
|
|
- immich-app/immich
|
|
- syncthing/syncthing
|
|
|
|
# Add more pages here:
|
|
# - name: Your page name
|
|
# columns:
|
|
# - size: small
|
|
# widgets:
|
|
# # Add widgets here
|
|
|
|
# - size: full
|
|
# widgets:
|
|
# # Add widgets here
|
|
|
|
# - size: small
|
|
# widgets:
|
|
# # Add widgets here
|