Skip to content

feat: add syndicator-indienews package - #880

Draft
aciccarello wants to merge 15 commits into
getindiekit:mainfrom
aciccarello:feat/syndication-preprocess-hook
Draft

feat: add syndicator-indienews package#880
aciccarello wants to merge 15 commits into
getindiekit:mainfrom
aciccarello:feat/syndication-preprocess-hook

Conversation

@aciccarello

@aciccarello aciccarello commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Extends #882
Closes #860

Summary

Adds an indienews syndicator for webmention based syndication.

Note

This plugin writes the IndieNews URL into the syndication property of the post file. For IndieNews to actually discover the post, the post template must expose u-syndication in the HTML markup, and the site must send a Webmention to the IndieNews channel URL after publishing.

Changes

syndicator-indienews (new package)

  • New @indiekit/syndicator-indienews package for IndieNews.
  • Accepts a single options object or an array of options objects (for multiple language channels).
  • Each configured language registers as a separate syndication target.
  • Implements getSyndicationUrl(), returning the IndieNews channel URL.
  • No syndicate() method — IndieNews syndication is webmention-based; this plugin handles the file-write step only.

Interface

// Optional method on syndicator targets
async getSyndicationUrl(publication) {
  // return string | string[] | null | undefined
}

Configuration example

{
  "plugins": ["@indiekit/syndicator-indienews"],
  "@indiekit/syndicator-indienews": { "language": "en" }
}

Multiple languages:

{
  "@indiekit/syndicator-indienews": [
    { "language": "en" },
    { "language": "es" }
  ]
}

@aciccarello
aciccarello marked this pull request as ready for review August 17, 2026 03:01
@aciccarello aciccarello changed the title feat: add getSyndicationUrl hook and syndicator-indienews package feat: add syndicator-indienews package Aug 17, 2026
@aciccarello
aciccarello marked this pull request as draft August 17, 2026 18:10
@aciccarello

Copy link
Copy Markdown
Collaborator Author

Alright, I tested this locally and confirmed it worked. I just needed to make sure the format file passed the syndication property through.

  indiekit:endpoint-micropub:post-content Create {
  indiekit:endpoint-micropub:post-content   postData: {
  indiekit:endpoint-micropub:post-content     path: 'posts/notes/2026-08-20-with-formatting-fixed.md',
  indiekit:endpoint-micropub:post-content     properties: {
  indiekit:endpoint-micropub:post-content       type: 'entry',
  indiekit:endpoint-micropub:post-content       content: [Object],
  indiekit:endpoint-micropub:post-content       'mp-slug': 'with-formatting-fixed',
  indiekit:endpoint-micropub:post-content       'mp-syndicate-to': [Array],
  indiekit:endpoint-micropub:post-content       published: '2026-08-20T05:07:48.171Z',
  indiekit:endpoint-micropub:post-content       slug: 'with-formatting-fixed',
  indiekit:endpoint-micropub:post-content       'post-type': 'note',
  indiekit:endpoint-micropub:post-content       url: 'http://localhost:8080/posts/2026/08/20/with-formatting-fixed',
  indiekit:endpoint-micropub:post-content       'post-status': 'published'
  indiekit:endpoint-micropub:post-content     }
  indiekit:endpoint-micropub:post-content   }
  indiekit:endpoint-micropub:post-content } +0ms
Processing postTemplate {
        "type": "entry",
        "content": {
                "html": "<p>With formatting fixed?</p>",
                "text": "With formatting fixed?"
        },
        "published": "2026-08-20T05:07:48.171Z",
        "slug": "with-formatting-fixed",
        "url": "http://localhost:8080/posts/2026/08/20/with-formatting-fixed",
        "post-status": "published",
        "syndication": [
                "https://news.indieweb.org/en"
        ]
}

That works for my setup but I'm leaving this PR in draft since there's a few key questions that this depends on:

  1. Is the change to the syndicator plugin api the right choice? (feat: add getSyndicationUrl hook to syndicator interface #882)
  2. Is passing the URLs of these plugins as an array property the right output choice?
  3. Should this indienews syndicator be a more general webmention/url syndicator where the config takes a list of name, url, and checked flag options and creates syndicators for each (not tied to indienews)?

I would say yes to all 3 (including reworking the plugin to be more general) but wanted to wait for feedback before I made additional changes.

@paulrobertlloyd paulrobertlloyd added the plugin-syndicator Syndicator plug-in label Aug 23, 2026
@paulrobertlloyd paulrobertlloyd changed the title feat: add syndicator-indienews package feat: add syndicator-indienews package Aug 23, 2026
@paulrobertlloyd
paulrobertlloyd force-pushed the main branch 2 times, most recently from 67b3847 to fa1d368 Compare August 27, 2026 20:07
@rmdes

rmdes commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

I maintain an IndieNews syndicator too, so for what it's worth: I think yours is the better default, and I'd rather back it than argue for mine.

Mine implements syndicate() — it sends the webmention and returns the permalink, so it needs the async step you specifically don't have. Yours declares the URL and leaves sending to the site, which works without a database and is the simpler contract. That covers more setups than mine does.

Two things from mine that might be worth folding in, both small:

  • Language display names. Mine maps the code to a name, so targets read "IndieNews (Français)" rather than "IndieNews (fr)" in the client's target list. Cosmetic, but the picker is where people choose.
  • Sending the webmention, optionally. Declaring the URL and sending the webmention are separable, and your note already says the site must send it. A syndicator that can do both when a database is available would cover the other half without changing this design — happy to contribute that on top rather than as a competing package.

Neither is a blocker on this PR.

@aciccarello

Copy link
Copy Markdown
Collaborator Author

I'm glad you think the structure is good. As far as the language name I think that's a good option. I assume the Intl API has something for that. I also might not show the language if only one is set up to simplify it in a visual list.

I'll admit I don't have a good way to test the webmention sender as my server does not have a database configured nor do I have a hook set up to indicate when the build is complete. I'd appreciate some help with that portion.

@rmdes

rmdes commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

I'm going to setup a test environment so I can test this properly, will let you know when I have some results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin-syndicator Syndicator plug-in

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make syndication available to file at creation for webmention based syndication

3 participants