Skip to content

Conversation

@sgort
Copy link
Collaborator

@sgort sgort commented Nov 26, 2025

Closes #48

Tasks log

  • Created migrate-image.js migration script that helps reorganize the images
  • Ran from Docusaurus project root directory with const dryRun: true (ie shows what would happen without making any changes)
  • Reviewed the output and fixed all malformed image references with toolkit/fix-malformed-images.js script
  • Ran script dry run again
  • Reviewed the output and updated the script to fix the path resolution issue for images without ./ prefix and fix the sidebar section detection logic
  • Ran script dry run again
  • Reviewed the output and saved output in toolkit/migrate-images-dry-run.txt
  • Ran script live run
  • Reviewed the output and saved output in toolkit/migrate-images-live-run.txt
  • Looked at a few crucial pages and saw no issue with images
  • Kept backup and committed
  • Created cleanup-old-images.js script
  • Ran cleanup script dry run
  • Reviewed the output and saved output in toolkit/cleanup-old-images-dry-run.txt
  • Ran cleanup script live run
  • Reviewed the output and saved output in toolkit/cleanup-old-images-live-run.txt
  • Deleted backup-images dir
  • Looked at a few crucial pages and saw no issue with images

@sgort sgort marked this pull request as ready for review November 26, 2025 16:16
@sgort sgort requested a review from a-m-zill November 26, 2025 16:16
@sgort sgort marked this pull request as draft November 27, 2025 06:23
@sgort
Copy link
Collaborator Author

sgort commented Nov 27, 2025

I haven't tested the scripted approach sufficiently. Files were deleted that should not have been deleted. Fortunately, I was alerted to this in time. PR is back in draft form for further investigation and a fix.

@sgort
Copy link
Collaborator Author

sgort commented Nov 27, 2025

Ok, looks like the migration script only moved image files (png, jpg, svg, etc.) but the cleanup script deleted entire directories.

I will start from scratch with a new branch. This PR can be closed an deleted.

@sgort sgort closed this Nov 27, 2025
@sgort sgort deleted the chore/refactoring-images-issue-48 branch November 27, 2025 07:36
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.

Reorganize images into a structured hierarchy that mirrors the documentation structure

1 participant