DELETING CONTENT
SAFE DELETION PRACTICES
Learn how to safely delete content files and check for broken links.
CLI DELETION
Safe removal with confirmation
Using CLI:
BASH
# Remove content (with confirmation)
./fyt content remove pricing
# Remove without confirmation
./fyt content remove pricing --forceConfirmation Prompt:
TEXT
Remove content/pages/pricing.yaml? (y/N): y
✓ Removed content/pages/pricing.yaml
⚠ Check for broken links: ./fyt validateMANUAL DELETION
Delete files directly
Using rm Command:
BASH
# Delete file
rm content/pages/pricing.yaml
# Delete with confirmation
rm -i content/pages/pricing.yamlUsing Git:
BASH
# Remove and stage for commit
git rm content/pages/pricing.yaml
# Commit deletion
git commit -m "Remove pricing page"CHECKING FOR BROKEN LINKS
Validate after deletion
Validation Workflow:
BASH
# 1. Delete content
./fyt content remove pricing
# 2. Check for broken links
./fyt validate
# 3. Fix broken links
vi content/pages/home.yaml
# 4. Validate again
./fyt validateFinding References:
BASH
# Search for references to deleted page
grep -r "/pricing" content/DELETION CHECKLIST
Steps to follow
Before Deletion:
☐
Backup the file
☐
Search for references
☐
Note all linking pages
After Deletion:
☐
Run validation
☐
Fix broken links
☐
Update navigation
☐
Test affected pages
RECOVERY
Restore deleted content
From Git:
BASH
# Restore specific file
git checkout HEAD~1 content/pages/pricing.yaml
# Or restore from specific commit
git checkout <commit-hash> content/pages/pricing.yamlUndo Recent Deletion:
BASH
# If not committed
git restore content/pages/pricing.yaml
# If committed
git revert <commit-hash>NEXT STEPS
Learn More:
- Content Validation - Validate after deletion
- CLI Reference - Complete CLI documentation
- Editing Content - Fix broken links