aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta/metadoc.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-08 19:26:13 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-01-13 16:06:43 -0500
commit99de6c56f71bcc0588aa1d888a5278aba15ec237 (patch)
treedc064ccaafafac75d40f2022829b10de9d14bec4 /src/doc_reform/meta/metadoc.d
parentsrc without pod.manifest, report on verbose (diff)
yaml doc headers, protect harvest
- protect harvest from missing doc header metadata - title & author required - removed crude rgx yaml check (rely on yaml parser)
Diffstat (limited to 'src/doc_reform/meta/metadoc.d')
-rw-r--r--src/doc_reform/meta/metadoc.d26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d
index b81dfb2..e45139d 100644
--- a/src/doc_reform/meta/metadoc.d
+++ b/src/doc_reform/meta/metadoc.d
@@ -26,7 +26,7 @@ template spineAbstraction() {
mixin spineBiblio;
mixin spineRgxInitFlags;
mixin outputHub;
- enum headBody { header, body_content, header_type, insert_file_list, image_list }
+ enum headBody { header, body_content, insert_file_list, image_list }
enum makeMeta { make, meta }
enum docAbst { doc_abstract_obj, doc_has }
static auto rgx = Rgx();
@@ -39,10 +39,8 @@ template spineAbstraction() {
){
{ /+ document config/make file +/
auto _config_document_struct = readConfigDoc!()(_manifest, _env);
- if (_config_document_struct.filetype == "yaml") {
- import doc_reform.meta.conf_make_meta_yaml;
- _make_and_meta_struct = _config_document_struct.configParseYAMLreturnSpineStruct!()(_make_and_meta_struct, _manifest);
- }
+ import doc_reform.meta.conf_make_meta_yaml;
+ _make_and_meta_struct = _config_document_struct.configParseYAMLreturnSpineStruct!()(_make_and_meta_struct, _manifest);
}
/+ ↓ read file (filename with path) +/
/+ ↓ file tuple of header and content +/
@@ -55,7 +53,7 @@ template spineAbstraction() {
auto _header_body_insertfilelist_imagelist
= spineRawMarkupContent!()(_opt_action, _manifest.src.path_and_fn);
static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist));
- static assert(_header_body_insertfilelist_imagelist.length==5);
+ static assert(_header_body_insertfilelist_imagelist.length==4);
if ((_opt_action.debug_do)
|| (_opt_action.very_verbose)
) {
@@ -72,15 +70,13 @@ template spineAbstraction() {
) {
writeln("step2 commence → (read document header (yaml) return struct)");
}
- if (_header_body_insertfilelist_imagelist[headBody.header_type] == "yaml") {
- import doc_reform.meta.conf_make_meta_yaml;
- _make_and_meta_struct =
- docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct!()(
- _header_body_insertfilelist_imagelist[headBody.header],
- _make_and_meta_struct,
- _manifest,
- );
- }
+ import doc_reform.meta.conf_make_meta_yaml;
+ _make_and_meta_struct =
+ docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct!()(
+ _header_body_insertfilelist_imagelist[headBody.header],
+ _make_and_meta_struct,
+ _manifest,
+ );
if ((_opt_action.debug_do)
|| (_opt_action.very_verbose)
) {