fn: delete_content
Purpose
Preview or archive one canonical content page and optional descendants.
Signature
def delete_content(source: str | Path, content_file: str, *, recursive: bool=False, all_languages: bool=False, commit: bool=False) -> DeleteResult:
Deletion is recoverable: committed files are moved to `deleted/YYYY-MM-DD/<original relative content path>`. Main-navigation section roots and the site homepage are protected because deleting them requires a matching navigation change, which is outside this page-only operation.
Usage
# Preview the recoverable deletion without changing content.
preview = delete_content(source, content_file, commit=False)
# Archive the selected page only after reviewing the preview.
result = delete_content(source, content_file, commit=True)
