feat: add 'default' as valid Content-Appearance value

This commit is contained in:
moia-sven-ole
2026-04-24 13:15:19 +02:00
committed by Manuel Rüger
parent 13e7b496ee
commit 7fab1755d6
4 changed files with 35 additions and 9 deletions

View File

@@ -169,7 +169,7 @@ var Flags = []cli.Flag{
&cli.StringFlag{
Name: "content-appearance",
Value: "",
Usage: "default content appearance for pages without a Content-Appearance header. Possible values: full-width, fixed.",
Usage: "default content appearance for pages without a Content-Appearance header. Possible values: full-width, fixed, default.",
Sources: cli.NewValueSourceChain(
cli.EnvVar("MARK_CONTENT_APPEARANCE"),
altsrctoml.TOML("content-appearance", altsrc.NewStringPtrSourcer(&filename)),
@@ -236,11 +236,11 @@ func CheckFlags(context context.Context, command *cli.Command) (context.Context,
contentAppearance := strings.TrimSpace(command.String("content-appearance"))
if contentAppearance != "" {
switch contentAppearance {
case "full-width", "fixed":
case "full-width", "fixed", "default":
// ok
default:
return context, fmt.Errorf(
"invalid value for --content-appearance: %q (expected: full-width or fixed)",
"invalid value for --content-appearance: %q (expected: full-width, fixed, or default)",
contentAppearance,
)
}