- Add extract_preamble() to retain SEO metadata before the heading when rewriting the doc
- Add normalize_version() to map -preview suffix to -rc.1 (preview == RC1 in ABP versioning)
- Add unit tests (Test 17-19) covering preview, rc.N, and stable version normalization
Improved modularity and readability of add_seo_descriptions.py by refactoring functions, enhancing block handling, and adding statistics saving. Updated auto-add-seo.yml to correctly detect changed markdown files using PR head and base SHAs for more accurate file selection.
Enhanced the detection and updating of SEO description blocks in add_seo_descriptions.py. The script now checks for the presence and non-emptiness of the Description field, and updates or inserts the SEO block as needed, handling invalid JSON gracefully.
Moved the SEO description generation logic from an inline script in the GitHub Actions workflow to a dedicated Python script at .github/scripts/add_seo_descriptions.py. Updated the workflow to call this script directly, improving maintainability and readability.