added local export support and refined program logic

This commit is contained in:
2026-02-08 05:30:55 -05:00
parent 8ee2b39809
commit 6565a8546f
11 changed files with 488 additions and 32 deletions

View File

@@ -48,21 +48,28 @@ Top-level fields:
Inherited category paths for this directory and its children.
2. `tags` (object, optional)
Inherited tags for this directory and its children.
3. `subdirectories` (object, optional)
3. `author` (object, optional)
Inherited author for this directory and its children. Must resolve to a single author.
4. `subdirectories` (object, optional)
Explicit list of subdirectories to traverse.
4. `files` (object, optional)
5. `files` (object, optional)
Mapping of Markdown file names to file-level configuration.
`categories`, `tags`, and `subdirectories` objects:
`categories`, `tags`, `author`, and `subdirectories` objects:
1. `content` (array of strings, optional)
List of values for the given field.
For `categories`, each string is a hierarchical path such as `Systems/Infrastructure`.
For `subdirectories`, each string is a directory name under the current directory.
For `author`, exactly one string must remain after inheritance is applied.
2. `inherit` (boolean, optional, default `true`)
If `true`, append to the parent effective list.
If `false`, replace the parent list entirely.
Note: Root directory manifests do not need to specify `inherit` for these top-level
fields (the default is `true`). File-level overrides inside `files` still support
inheritance via their own `inherit` fields.
`files` entries:
Each key is a Markdown file name (relative to the manifest directory).
@@ -73,10 +80,14 @@ Each value is an object with the following fields:
2. `use_heading_as_title` (object, optional)
Extracts a heading from the Markdown as the title and removes that heading
from the body while promoting remaining headings by one level.
3. `categories` (object, optional)
3. `created_on` (string, optional)
Manual override for the post creation time in `YYYY-MM-DD hh:mm` format.
4. `last_modified` (string, optional)
Manual override for the post modified time in `YYYY-MM-DD hh:mm` format.
5. `categories` (object, optional)
Overrides categories for this file. Uses the same `content` and `inherit` fields
as the top-level `categories` object.
4. `tags` (object, optional)
6. `tags` (object, optional)
Overrides tags for this file. Uses the same `content` and `inherit` fields
as the top-level `tags` object.
@@ -87,6 +98,11 @@ Each value is an object with the following fields:
2. `strict` (boolean, optional, default `true`)
If `true`, exactly one matching heading must exist.
If `created_on` or `last_modified` is not provided, the system infers the value.
For `git_repositories` sources it uses git commit timestamps; for `directories`
sources it uses filesystem timestamps. The system does not auto-detect git for
entries declared under `directories`, even if the path is inside a git repo.
## Post Identity
Each post is identified with:
@@ -97,3 +113,8 @@ _wp_materialize_source = <source_name>:<relative_path>
`source_name` is the `name` from the global config entry, and `relative_path` is
relative to the repo or directory root used for identity resolution.
## Tag and Category Creation
Missing categories and tags are created automatically during apply, after a successful
dry-run evaluation and before any post updates.