aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/source
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-10-09 15:21:34 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-10-17 19:07:20 -0400
commit433f0b2ed0f9d5461c0fdf2b49e41eb26802cc2e (patch)
tree6f8855ab401dc146161ac104608828a3e302f57a /src/doc_reform/source
parent0.8.1 conf, make, meta: yaml only (toml removed) (diff)
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)
Diffstat (limited to 'src/doc_reform/source')
-rw-r--r--src/doc_reform/source/paths_source.d32
-rw-r--r--src/doc_reform/source/read_config_files.d1
2 files changed, 25 insertions, 8 deletions
diff --git a/src/doc_reform/source/paths_source.d b/src/doc_reform/source/paths_source.d
index b1622bd..86338af 100644
--- a/src/doc_reform/source/paths_source.d
+++ b/src/doc_reform/source/paths_source.d
@@ -17,7 +17,7 @@ template PodManifest() {
mixin DocReformRgxInit;
static auto rgx = Rgx();
auto PodManifest(P)(
- P _pth
+ P _pth=""
) {
struct ManifestFile_ {
string pod_manifest_filename() {
@@ -370,9 +370,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
}
}
@@ -581,6 +580,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;
@@ -625,8 +628,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_;
@@ -667,9 +670,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() {
diff --git a/src/doc_reform/source/read_config_files.d b/src/doc_reform/source/read_config_files.d
index 787f6e0..6c652fb 100644
--- a/src/doc_reform/source/read_config_files.d
+++ b/src/doc_reform/source/read_config_files.d
@@ -136,7 +136,6 @@ static template configReadDocYAML() {
doc_reform.source.paths_source,
std.file,
std.path;
- import yaml;
final YAMLDocument configReadDocYAML(M,E)(M _manifest, E _env) {
string _configuration = configReadInDocYAML!()(_manifest, _env);
auto _conf_file_details = ConfigFilePaths!()(_manifest, _env);