Skip to content

refactor(cli): move --public-url to the server flags - #1756

Merged
perber merged 1 commit into
mainfrom
refactor/public-url-server-flag
Oct 31, 2026
Merged

perber merged 1 commit into
mainfrom
refactor/public-url-server-flag

Conversation

@perber

@perber perber commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Part of the SEO series for #1292 (after #1732 and #1733).

Moves --public-url / LEAFWIKI_PUBLIC_URL from the Email flags to the Server flags. Later PRs in the series use it as the only source for canonical links and absolute sitemap URLs. Request headers such as X-Forwarded-Host are never used for those.

No behaviour change: with --smtp-host set, --public-url is still required and validated the same way, with the same error messages. Nothing else reads it yet.

  • cmd/leafwiki: the field and flag move from emailOptions to serverOptions. --help lists it under "Server".
  • New test TestRootCommand_PublicURLResolvesIntoServerOptions: the flag and the env var, both trimmed, land in the server options.
  • README flag/env tables and .env.example: the entry moves next to base path, and the description says it is the wiki's public base URL.

Checks: make test, make lint, make verify, make cross green.

🤖 Generated with Claude Code

The public base URL describes the wiki itself, not the mail transport.
Later SEO PRs (GitHub #1292) use it for canonical links and the sitemap,
so it now lives in serverOptions and is listed under Server in --help.
Behaviour is unchanged: with --smtp-host set it is still required and
validated the same way.
@perber
perber merged commit 714e036 into main Oct 31, 2026
17 checks passed
@perber
perber deleted the refactor/public-url-server-flag branch October 31, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant