Add integrations framework for third-party plugins#4
Merged
pfefferle merged 2 commits intoadd/content-parserfrom Mar 21, 2026
Merged
Add integrations framework for third-party plugins#4pfefferle merged 2 commits intoadd/content-parserfrom
pfefferle merged 2 commits intoadd/content-parserfrom
Conversation
084d296 to
0765005
Compare
b41a516 to
90cd150
Compare
a17857b to
c5a534b
Compare
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.
90cd150 to
0d9c5d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
integrations/directory with aLoadclass and documentationatmosphere_markpub_blockfilter so plugins can handle their custom block types in the Markpub content parserLoad::init()intoAtmosphere->init()for consistent initializationHow it works
Integrations are static classes with an
init()method that registers hooks. They are loaded conditionally inLoad::register()when the target plugin is active. Custom blocks are handled via theatmosphere_markpub_blockfilter — return a markdown string to override, ornullto pass through to the default handler.See
integrations/README.mdfor the full pattern and example.Depends on: #3
Test plan
npm run env-test)atmosphere_markpub_blockfilter is called for each block during content parsingnullfalls through to default handling