The --all-pages flag provides a streamlined way to export all Confluence pages (not blog posts) without any user interaction. This is designed for automation and batch processing scenarios.
When --all-pages is used:
- Content Type: Only pages (not blog posts) are exported
- Content Format: Both markdown and HTML are exported
- Attachments: Automatically skipped
- Index File: Automatically created
- User Input: No prompts or selections required
The flag is implemented in src/index.js:
.option('--all-pages', 'Export all pages (not blog posts) without user input - exports as markdown and HTML, skips attachments')- Flag Detection: Check
options.allPagesbefore interactive mode - API Call: Use
api.fetchAllPages()to get all pages - Export Options: Set predefined options:
contentFormat: 'both'includeAttachments: falsecreateIndex: true
- User Feedback: Display clear status messages about what will be exported
npm start -- --all-pages- Exports all pages as both
.mdand.htmlfiles - Creates
export-index.jsonwith metadata - Skips all attachments
- No user prompts or selections
- Simplicity: Single flag for complete automation
- Predictability: Fixed export options for consistent results
- Performance: Skips attachments for faster processing
- Completeness: Exports both formats for maximum compatibility
- Consider adding
--all-blog-postsflag for blog-only exports - May add
--content-type <type>for more granular control - Could add
--formatoverride for the all-pages mode
Test the flag with:
npm start -- --all-pages --devThis will show verbose output to verify the behavior.