macana

Static site generator for Obsidian Vault

Simplify content parsing / metadata generation - Remove Metadata Parser - Tree Builder now is also responsible for generating document metadata - Content Parser now can return document metadata The major factor motivating this refactor is the last bullet point. I wrote Metadata Parser with YAML frontmatter parsing...but that is definetely out of scope. What if one want to use HTML as a document and use `<title>` element? What if one want to use JPEG as a document and use EXIF for title and name? At all, metadata derived by content requires content parsing, thus Content Parser returns document metadata. Behaviors and options existed in VaultParser (Metadata Parser) and Tree Parser are re-implemented as a more flexible plugin, TreeBuildStrategy. I noticed those options are, in the end, `map` and `filter`. This design maintains both customizability and ease-of-use. Maybe the TreeBuildStrategy should be more generic so it's defined in the generic Tree Builder interface side (`tree_builder/interface.ts`). But I kept this form as I don't feel necessity for now. Maybe change later.

Changes

12 changed files (+540/-531)