docs: adds new options to .env.example and module.nix
This commit is contained in:
parent
21f8d5a6a5
commit
0534b315a3
2 changed files with 21 additions and 0 deletions
|
|
@ -28,6 +28,13 @@ BOOK_MAX_WEBSITE_LENGTH=100
|
||||||
# Allow new guestbook submissions. When false, the form is hidden and submissions are rejected.
|
# Allow new guestbook submissions. When false, the form is hidden and submissions are rejected.
|
||||||
BOOK_OPEN_REGISTRATION=true
|
BOOK_OPEN_REGISTRATION=true
|
||||||
|
|
||||||
|
# Show website field in submission form. When false, the input is hidden and submitted values are ignored.
|
||||||
|
BOOK_ENABLE_WEBSITE_FIELD=true
|
||||||
|
|
||||||
|
# Allow raw HTML/JS in entry names and message bodies. When false, HTML is escaped.
|
||||||
|
# Website URLs are always escaped regardless of this setting.
|
||||||
|
BOOK_ALLOW_HTML_INJECTION=true
|
||||||
|
|
||||||
# Separator between guestbook entries.
|
# Separator between guestbook entries.
|
||||||
BOOK_SEPARATOR=------------------------------------------------------------
|
BOOK_SEPARATOR=------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
14
module.nix
14
module.nix
|
|
@ -70,6 +70,18 @@ in
|
||||||
description = "Allow new guestbook submissions. When false, the form is hidden and submissions are rejected.";
|
description = "Allow new guestbook submissions. When false, the form is hidden and submissions are rejected.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableWebsiteField = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Show website field in submission form. When false, the input is hidden and submitted values are ignored.";
|
||||||
|
};
|
||||||
|
|
||||||
|
allowHtmlInjection = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Allow raw HTML/JS in entry names and message bodies. When false, HTML is escaped. Website URLs are always escaped.";
|
||||||
|
};
|
||||||
|
|
||||||
separator = mkOption {
|
separator = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "------------------------------------------------------------";
|
default = "------------------------------------------------------------";
|
||||||
|
|
@ -176,6 +188,8 @@ in
|
||||||
BOOK_MAX_MESSAGE_LENGTH = toString cfg.maxMessageLength;
|
BOOK_MAX_MESSAGE_LENGTH = toString cfg.maxMessageLength;
|
||||||
BOOK_MAX_WEBSITE_LENGTH = toString cfg.maxWebsiteLength;
|
BOOK_MAX_WEBSITE_LENGTH = toString cfg.maxWebsiteLength;
|
||||||
BOOK_OPEN_REGISTRATION = if cfg.openRegistration then "true" else "false";
|
BOOK_OPEN_REGISTRATION = if cfg.openRegistration then "true" else "false";
|
||||||
|
BOOK_ENABLE_WEBSITE_FIELD = if cfg.enableWebsiteField then "true" else "false";
|
||||||
|
BOOK_ALLOW_HTML_INJECTION = if cfg.allowHtmlInjection then "true" else "false";
|
||||||
BOOK_SEPARATOR = cfg.separator;
|
BOOK_SEPARATOR = cfg.separator;
|
||||||
BOOK_STYLE = cfg.style;
|
BOOK_STYLE = cfg.style;
|
||||||
} // lib.optionalAttrs (cfg.styleFile != null) {
|
} // lib.optionalAttrs (cfg.styleFile != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue