diff --git a/CHANGELOG.md b/CHANGELOG.md index cb64d5e..f0a6943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased +### Added +- Nested tag support - "parent/child" tags used with the "Tag" hierarchy create nested folders. + ## [0.8.1] - 2021-03-14 ### Changed - Use local time instead of UTC for search (Issue [#77](https://github.com/out-of-cheese-error/gooseberry/issues/77)) diff --git a/src/gooseberry/knowledge_base.rs b/src/gooseberry/knowledge_base.rs index 846a65c..5eb2117 100644 --- a/src/gooseberry/knowledge_base.rs +++ b/src/gooseberry/knowledge_base.rs @@ -367,6 +367,10 @@ impl Gooseberry { .collect::, _>>()?, raw_annotations: inner_annotations, }; + // TODO: check if nested tags work on Windows + if let Some(prefix) = path.parent() { + fs::create_dir_all(prefix)?; + } fs::File::create(&path)? .write_all(hbs.render("page", &page_data)?.as_bytes())?; } else {