feat: add getSyndicationUrl hook to syndicator interface - #882
Draft
aciccarello wants to merge 4 commits into
Draft
feat: add getSyndicationUrl hook to syndicator interface#882aciccarello wants to merge 4 commits into
aciccarello wants to merge 4 commits into
Conversation
aciccarello
marked this pull request as ready for review
August 17, 2026 03:48
aciccarello
marked this pull request as draft
August 17, 2026 18:10
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.
Closes #860
Summary
Adds an optional
getSyndicationUrl(publication)hook to the syndicator plugin interface, enabling syndication URLs to be written into post files at creation time — without requiring a database or async syndication step.This is needed for webmention-based syndication targets where the syndication URL is known at post creation time, but
mp-syndicate-tois stripped before the file is written (correct per the Micropub spec — it is a server command, not a content property).Changes
endpoint-syndicatesyndicate()is now optional on syndicator targets. Targets without it are skipped rather than throwing. This allows syndicators that only implementgetSyndicationUrl()to register without providing an empty no-op.endpoint-micropubpost-content.jscreate(), after resolving syndication targets and beforegetPostTemplateProperties()stripsmp-*keys, callsgetSyndicationUrl(publication)on any target whoseinfo.uidis inmp-syndicate-to.syndicationvalues (exact string match), and appended toproperties.syndication.getSyndicationUrl()are caught and logged viadebug()— the create request is never failed.Interface
A syndicator implementing this hook can return the syndication URL synchronously at post creation time. The endpoint handles appending it to
syndicationbefore the file is written.This is scoped to
create()only. Update behaviour is a separate concern.