aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-04-20 13:12:53 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2020-05-20 11:27:26 -0400
commit437e3e7c363a0f876e551609518718bce2c89218 (patch)
treecd59ccaf9ea71908fbb4a0ca49b50e331555487a /src/doc_reform/meta
parentcgi search form, no date_published breaks regex, initialize to "0000" (diff)
cgi search form title
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/conf_make_meta_structs.d1
-rw-r--r--src/doc_reform/meta/conf_make_meta_yaml.d10
-rw-r--r--src/doc_reform/meta/metadoc_show_config.d10
3 files changed, 15 insertions, 6 deletions
diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d
index 34b30a3..3c749df 100644
--- a/src/doc_reform/meta/conf_make_meta_structs.d
+++ b/src/doc_reform/meta/conf_make_meta_structs.d
@@ -156,6 +156,7 @@ struct ConfCompositeSiteLocal {
string w_srv_cgi_domain; // if not set same as webserv_domain
string w_srv_cgi_bin_part;
string w_srv_cgi_bin_path;
+ string w_srv_cgi_search_title;
string w_srv_cgi_search_script;
string w_srv_cgi_search_script_raw_fn_d;
string w_srv_cgi_port;
diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d
index d6f9e22..9dac231 100644
--- a/src/doc_reform/meta/conf_make_meta_yaml.d
+++ b/src/doc_reform/meta/conf_make_meta_yaml.d
@@ -282,6 +282,16 @@ template contentYAMLtoSpineStruct() {
) {
_struct_composite.conf.w_srv_cgi_bin_path = _yaml["webserv"]["cgi_bin_path"].get!string;
}
+ if (_opt_action.cgi_search_title.length > 0) {
+ _struct_composite.conf.w_srv_cgi_search_title = _opt_action.cgi_search_title;
+ } else if ("cgi_search_title" in _yaml["webserv"]
+ && _yaml["webserv"]["cgi_search_title"].type.string
+ && _yaml["webserv"]["cgi_search_title"].tag.match(rgx.yaml_tag_is_str)
+ ) {
+ _struct_composite.conf.w_srv_cgi_search_title = _yaml["webserv"]["cgi_search_title"].get!string;
+ } else {
+ _struct_composite.conf.w_srv_cgi_search_title = "≅ SiSU spine search form";
+ }
if (_opt_action.cgi_sqlite_search_filename.length > 0) {
_struct_composite.conf.w_srv_cgi_search_script = _opt_action.cgi_sqlite_search_filename;
} else if ("cgi_search_script" in _yaml["webserv"]
diff --git a/src/doc_reform/meta/metadoc_show_config.d b/src/doc_reform/meta/metadoc_show_config.d
index 4c2b976..057d7ba 100644
--- a/src/doc_reform/meta/metadoc_show_config.d
+++ b/src/doc_reform/meta/metadoc_show_config.d
@@ -22,7 +22,7 @@ template spineShowSiteConfig() {
auto char_repeat_number = 66;
if (opt_action.show_config) {
writefln(
- "\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
+ "\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
markup.repeat_character_by_number_provided("-", char_repeat_number),
"- webserv domain name:",
config.conf.w_srv_domain,
@@ -52,6 +52,8 @@ template spineShowSiteConfig() {
config.conf.w_srv_cgi_bin_url,
"- webserv cgi action:",
config.conf.w_srv_cgi_action,
+ "- webserv cgi title:",
+ config.conf.w_srv_cgi_title,
// "- webserv cgi file links:",
// config.conf.w_srv_cgi_file_links,
"- webserv sqlite db:",
@@ -116,7 +118,7 @@ template spineShowConfig() {
}
if (doc_matters.opt.action.show_config) {
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
+ "%s\n\"%s\", %s\n%s\n%s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n%40-s%10-s\n",
markup.repeat_character_by_number_provided("-", char_repeat_number),
doc_matters.conf_make_meta.meta.title_full,
doc_matters.conf_make_meta.meta.creator_author,
@@ -142,10 +144,6 @@ template spineShowConfig() {
doc_matters.conf_make_meta.conf.w_srv_cgi_search_script,
"- webserv cgi search script in d:",
doc_matters.conf_make_meta.conf.w_srv_cgi_search_script_raw_fn_d,
- "- webserv cgi port:",
- doc_matters.conf_make_meta.conf.w_srv_cgi_port,
- "- webserv cgi user:",
- doc_matters.conf_make_meta.conf.w_srv_cgi_user,
"- webserv cgi url:",
doc_matters.conf_make_meta.conf.w_srv_cgi_bin_url,
"- webserv cgi action:",