Skip to content

Add integrations framework for third-party plugins#4

Merged
pfefferle merged 2 commits intoadd/content-parserfrom
add/integrations
Mar 21, 2026
Merged

Add integrations framework for third-party plugins#4
pfefferle merged 2 commits intoadd/content-parserfrom
add/integrations

Conversation

@pfefferle
Copy link
Copy Markdown
Member

Summary

  • Adds integrations/ directory with a Load class and documentation
  • Adds atmosphere_markpub_block filter so plugins can handle their custom block types in the Markpub content parser
  • Wires Load::init() into Atmosphere->init() for consistent initialization

How it works

Integrations are static classes with an init() method that registers hooks. They are loaded conditionally in Load::register() when the target plugin is active. Custom blocks are handled via the atmosphere_markpub_block filter — return a markdown string to override, or null to pass through to the default handler.

See integrations/README.md for the full pattern and example.

Depends on: #3

Test plan

  • Verify all existing tests pass (npm run env-test)
  • Verify the atmosphere_markpub_block filter is called for each block during content parsing
  • Verify returning a string from the filter overrides the default block handling
  • Verify returning null falls through to default handling

@pfefferle pfefferle added the enhancement New feature label Mar 21, 2026
@pfefferle pfefferle self-assigned this Mar 21, 2026
@pfefferle pfefferle force-pushed the add/content-parser branch from 084d296 to 0765005 Compare March 21, 2026 11:37
@pfefferle pfefferle force-pushed the add/integrations branch 2 times, most recently from b41a516 to 90cd150 Compare March 21, 2026 11:42
@pfefferle pfefferle force-pushed the add/content-parser branch from a17857b to c5a534b Compare March 21, 2026 11:46
Introduce a pluggable integrations system so plugins can register
custom block handlers for the Markpub content parser.

- Add integrations/ directory with Load class and README.
- Add atmosphere_markpub_block filter for custom block-to-markdown
  conversion (e.g. jetpack/slideshow, woocommerce/product).
- Wire Load::init() into Atmosphere->init().
- Add integrations/ to Composer classmap autoloader.
@github-actions github-actions bot added [Feature] Content Parser Content parser for AT Protocol [Feature] Integrations Third-party plugin integrations Docs labels Mar 21, 2026
@pfefferle pfefferle merged commit c925d59 into add/content-parser Mar 21, 2026
8 checks passed
@pfefferle pfefferle deleted the add/integrations branch March 21, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs enhancement New feature [Feature] Content Parser Content parser for AT Protocol [Feature] Integrations Third-party plugin integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant