Skip to content

Clear glossary language directories before regeneration to remove stale entries#670

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-glossary-page-deletion
Draft

Clear glossary language directories before regeneration to remove stale entries#670
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-glossary-page-deletion

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

When glossary entries are deleted from the source spreadsheet, their corresponding markdown files were left behind — the generation script only added/updated files, never removed them.

Changes

  • content/glossary/_create_glossaries.py: Before writing markdown files for each language, remove the existing language directory entirely and recreate it fresh, so the output always mirrors the current spreadsheet state exactly.
# Remove existing directory to ensure deleted entries don't persist
if os.path.exists(language_dir):
    shutil.rmtree(language_dir)
os.makedirs(language_dir)
Original prompt

This section details on the original issue you should resolve

<issue_title>Make deleted glossary pages go away in update</issue_title>
<issue_description>The data processing action can update glossary entries and then opens a PR. However, this only appears to add and change files - while it should also delete any files that are no longer generated. Assess the current behaviour and fix if needed - possibly by deleting the glossary folder before regeneration in the action.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…e deleted entries

Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix glossary pages not being deleted in update Clear glossary language directories before regeneration to remove stale entries Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make deleted glossary pages go away in update

2 participants