From 433f0b2ed0f9d5461c0fdf2b49e41eb26802cc2e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 9 Oct 2019 15:21:34 -0400 Subject: 0.8.2 yaml pod.manifest, read site config first - yaml (configuration & metadata) site config, pod: pod.manifest, doc header: make, meta - pod.manifest in yaml breaks - older program reading new pod and - newer program reading old pod - read config first, - get site default language in case it is absent in pod.manifest - ensure config is not read too many times (it is at present, revisit) --- org/default_paths.org | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'org/default_paths.org') diff --git a/org/default_paths.org b/org/default_paths.org index 6fa9078..d122c9a 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -49,7 +49,7 @@ template PodManifest() { mixin DocReformRgxInit; static auto rgx = Rgx(); auto PodManifest(P)( - P _pth + P _pth="" ) { struct ManifestFile_ { string pod_manifest_filename() { @@ -424,9 +424,8 @@ template PathMatters() { if (!exists(_output_path)) { try { _output_path.mkdirRecurse; - } - // catch (ErrnoException ex) { - catch (Exception ex) { + // } catch (ErrnoException ex) { + } catch (Exception ex) { // Handle error } } @@ -697,6 +696,10 @@ template DocReformPathsPods() { pth ~ " == " ~ _base_dir_pod ~ "/" ~ base_filename_(fn_src) ~ "?"); return pth; } + string output_pod_manifest_file(string fn_src) { + string pth = base_filesystem_(fn_src).chainPath("pod.manifest").array; + return pth; + } string base_pod_(string fn_src) { string pth = _base_dir_pod.chainPath(base_filename_(fn_src)).array; // change this return pth; @@ -741,8 +744,8 @@ template DocReformPathsPods() { return _pods(); } auto pod_root(string fn_src) { - auto pth_1_ = ""; - auto pth_2_ = ((base(fn_src).filesystem_open_zpod.chainPath("")).asNormalizedPath).array; + auto pth_1_ = "pod"; + auto pth_2_ = ((base(fn_src).filesystem_open_zpod.chainPath("")).asNormalizedPath).array; // "dr_doc" struct _pods { auto zpod() { return pth_1_; @@ -783,9 +786,24 @@ template DocReformPathsPods() { } return _pods(); } + auto pod_manifest(string fn_src) { + auto pod_root_ = pod_root(fn_src); + auto pth_1_ = ((pod_root(fn_src).zpod.chainPath("pod.manifest")).asNormalizedPath).array; + auto pth_2_ = ((pod_root(fn_src).filesystem_open_zpod.chainPath("pod.manifest")).asNormalizedPath).array; + struct _pods { + auto zpod() { + return pth_1_; + } + auto filesystem_open_zpod() { + assert(pod_root_.filesystem_open_zpod.chainPath(zpod).array == pth_2_); + return pth_2_; + } + } + return _pods(); + } auto media_root(string fn_src) { auto pod_root_ = pod_root(fn_src); - auto pth_1_ = "media"; + auto pth_1_ = ((pod_root(fn_src).zpod.chainPath("media")).asNormalizedPath).array; auto pth_2_ = ((pod_root(fn_src).filesystem_open_zpod.chainPath("media")).asNormalizedPath).array; struct _pods { auto zpod() { -- cgit v1.2.3