Skip to content

Site Settings

Site settings are keys in the settings table and apply immediately — no environment variables, no restart (one pagination exception below). Admin entry: /admin/settings, with five tabs. This page covers identity, SEO, registration, pagination, maintenance, announcements.

  • Your account needs setting:manage and access to /admin; see Authentication and Security.
  • Raw access: POST /api/v1/admin/settings reads all, /{key}/update writes one, /batch many.

/admin/settings?tab=site → “Site Information”.

KeyDefaultPurpose
site_nameFeed ChamberSite name; used in navigation, title suffix, and the TOTP issuer
site_descriptionNoelOrin 的个人博客One-line description; fallback for seo_description
site_logoemptyLogo URL; fallback for og_image
site_urlemptyCanonical base for sitemap, robots.txt, canonical links, og:url

Set site_url to the full public address (with scheme, no trailing slash). Empty is allowed: crawler output falls back to http://localhost:8080 and the startup log warns.

Each field falls back to site identity, so filling fewer is valid:

KeyFalls back toPurpose
seo_titlesite_nameDefault site title, also the suffix on child page titles
seo_descriptionsite_descriptionSearch snippet and social card description
seo_keywordsseeded valueComma-separated keywords meta tag
og_imagesite_logoog:image and Twitter card image

google_site_verification and baidu_site_verification sit here too: paste each webmaster console token and the matching meta tag is emitted. Both are public settings — they end up in the HTML anyway. Whether other users’ profiles are indexed is controlled by user_profile_indexable (default false, emits noindex).

/admin/settings?tab=user → “Users and Registration”.

KeyDefaultNotes
register_enabledtrueWhen off, registration is rejected with code 1013
register_mode=alldefaultUsername or email, at least one
register_mode=email—Email required; a blank username comes from before @
register_mode=username—Username required
register_mode=invite—Valid invite code required; create codes in /admin/invites
register_mode=approve—Account starts as pending_user until approved

Approval uses the row actions in /admin/users (or POST /api/v1/admin/users/{id}/approve_registration): the role becomes user and the account’s sessions are revoked, so the user must sign in again.

/admin/settings?tab=content → “Posting and Comments” holds the pagination keys.

KeyDefaultNotes
page_default_size20Default page size
page_max_size100Ceiling; larger requests fall back to the default
article_page_size20Posts per page in front-end lists

Also under ?tab=content.

KeyDefaultNotes
site_maintenancefalseNon-admin writes return 5005 (HTTP 503)
site_maintenance_message站点维护中,请稍后再试Message shown to users

The allow-list is deliberate: admin is unaffected, read-only browsing (GET plus read RPCs such as /list, /search, /detail) keeps working, and health checks, login, registration, session refresh, password recovery, /swagger, and OAuth/OIDC endpoints stay up.

A separate module at /admin/announcements, not a settings key. Publish and unpublish are separate actions; with announcement_auth_required=true, reading requires a login.

FieldNotes
Title / contentContent is Markdown
Display type1 toast, 2 top banner, 3 modal, 4 iframe embed (content holds the URL)
Position / sortSix toast positions (default top-right); pinned items come first
Expires atStops showing after expiry
终端窗口
# Only the public subset is exposed; saved values show up here
curl -s -X POST http://localhost:8080/api/v1/settings/public \
| jq '.data | {site_name, register_mode, site_url}'

Reload ?tab=site to confirm the fields fill back in; check the home page title, social image, and the domain in /robots.txt and /sitemap.xml.

SymptomCauseFix
sitemap still uses localhostBatch save failed, or no restartCheck the batch call returned code: 0; restart
Name or description does not changeCached server-rendered pageHard refresh; trust the API response
Invite mode keeps asking for a codeNo invite code existsCreate one under /admin/invites