Skip to content

Conversation

NicolasRitouet
Copy link
Collaborator

@NicolasRitouet NicolasRitouet commented Oct 12, 2025

Purpose

Add Outline import functionality to allow users to migrate their documentation from Outline by uploading a .zip export file.

Proposal

  • Add backend API endpoint to handle Outline .zip upload
    • Implement Outline export processing service that:
      • Extracts markdown files from the archive
      • Converts markdown content to BlockNote format (Yjs)
      • Preserves document hierarchy and nested documents
      • Handles image attachments by uploading them to object storage
    • Add frontend import page at /import/outline
    • Fix CSRF token handling in upload request
    • Prevent duplicate documents for nested structures (e.g., Doc.md + Doc/ directory)
    • Add French translations for the import UI

outline-import

External contributions

Thank you for your contribution! 🎉

Please ensure the following items are checked before submitting your pull request:

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)
  • I have added corresponding tests for new features or bug fixes (if applicable)

…kend:\n- Add POST /api/v1.0/outline_import/upload (zip)\n- Parse .md files, create doc tree from folders, rewrite image links to attachments, convert to Yjs via Y-provider\nFrontend:\n- Add /import/outline page with zip file picker + POST\n- Add menu entry 'Import from Outline' in left panel header\n- Add minimal i18n keys (en, fr)
…ous forbidden\n- Authenticated happy path with local image and mocked conversion
…import.py and call from view\n- Keep view thin; service handles zip, images, conversion, attachments\n- Fix imports accordingly
…ject unsafe paths)\n- Ignore __MACOSX and hidden entries\n- Service unit tests (happy path + zip slip)\n- Change API path to /imports/outline/upload and update front + tests
…kNote elements

- Convert H4/H5/H6 headings to compatible formats (H4→H3 with marker, H5→bold with arrow, H6→paragraph with bullet)
- Convert horizontal rules (---, ***, ___) to [DIVIDER_BLOCK] markers
- Preserve task lists formatting for proper checkbox rendering
- Add comprehensive unit tests for all conversion cases

This ensures Outline exports with all 6 heading levels and other markdown features
are properly imported into BlockNote.js which only supports 3 heading levels.
Resolved conflict in translations.json by keeping Outline import translations
- Add CSRF token to Outline import upload request
- Fix content save by removing invalid update_fields parameter
- Handle nested documents properly to avoid duplicates when a document
  has child documents (e.g., Doc.md with Doc/ directory)
@NicolasRitouet NicolasRitouet marked this pull request as draft October 12, 2025 15:03
@NicolasRitouet
Copy link
Collaborator Author

In progress:

  • UI is ugly
  • attachments are not uploaded
  • not all content blocks have been tested

@NicolasRitouet NicolasRitouet changed the title Feature/outline import Feat: Outline import Oct 12, 2025
@virgile-dev virgile-dev requested a review from rl-83 October 13, 2025 08:57
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.

1 participant