Team Docs Sync¶
Keep team documentation in sync between local files and Confluence.
Use Case¶
Your team maintains documentation in a Git repository. You want to:
- Write docs in markdown with your favorite editor
- Version control with Git
- Publish to Confluence for stakeholders
Setup¶
1. Initialize Directory¶
2. Pull Existing Content¶
3. Add to Git¶
Workflow¶
Daily Workflow¶
# Pull latest from Confluence
atlcli wiki docs pull ./team-docs
# Check for changes
git status
# Edit locally...
# Push changes to Confluence
atlcli wiki docs push ./team-docs
# Commit to Git
git add .
git commit -m "Update API documentation"
Conflict Resolution¶
When both local and Confluence have changes:
# Pull will warn about conflicts
atlcli wiki docs pull ./team-docs
# Review changes
git diff
# Choose resolution:
# Option 1: Keep local changes
atlcli wiki docs push ./team-docs --force
# Option 2: Accept remote changes
atlcli wiki docs pull ./team-docs --force
Automation¶
Git Pre-commit Hook¶
Sync before committing:
#!/bin/bash
# .git/hooks/pre-commit
atlcli wiki docs push ./team-docs --dry-run
if [ $? -ne 0 ]; then
echo "Docs sync would fail. Check changes."
exit 1
fi
Watch Mode¶
Auto-sync during editing:
Tips¶
- Use
.gitignoreto exclude generated files - Keep images in
./team-docs/images/ - Use frontmatter for page metadata
- Review
git diffbefore pushing to Confluence