Skip to content

Releases: matthiasott/webmention

v1.0.4

16 May 11:30
Compare
Choose a tag to compare

✨ Enhancement

Eager-loading Webmentions 🎉

This release adds support for eager-loading elements with the following values passed into the with param:

  • webmentions
  • webmentions:<type> (e.g. webmentions:like)
{% set entries = craft.entries()
  .section('blog')
  .with(['webmentions:like', 'webmentions:comment'])
  .all() %}

With that in place, calling element.getWebmentions() or element.getWebmentionsByType() will return the eager-loaded webmentions, rather than querying for them for each individual element.

New element.getTotalWebmentions() and getTotalWebmentionsByType() methods have also been added, which support eager-loading as well.

If all you want to do is output the total, you can set the with path’s criteria to {count: true}:

{% set entries = craft.entries()
  .section('blog')
  .with([
    ['webmentions:like', {count: true}],
    ['webmentions:comment', {count: true}],
  ])
  .all() %}

v1.0.3

12 May 20:33
Compare
Choose a tag to compare

✨ Enhancements

  • Added a new webmention/receive command, which processes the webmention for a given source and target. (#14)
  • Improved performance by automatically eager-loading avatars the first time getAvatar() is called. (#13)
  • Added the “Host” condition rule type. (#12)
  • “Source” and “Target” condition rules no longer have “has a value” or “is empty” operators. (#12)
  • authorName values now use the h-card’s nickname property as a fallback. (#10)

🐞 Bugfixes

  • Fixed a bug where webmention validation wasn’t catching ConnectException errors.
  • Fixed a bug where jobs for webmentions whithout a valid backlink to the target got stuck in the queue.
  • Fixed a bug where Bluesky source URLs from Brid.gy weren’t always being stored in their entirety. (#11)

v1.0.2

21 Mar 15:23
Compare
Choose a tag to compare

✨ Enhancement

  • Fixed a bug where getting the the avatar photo from the parsed representative h-card would fail because the URL was the value inside of an array instead of being a string. Now the plugin supports both cases.

v1.0.1

15 Mar 15:37
Compare
Choose a tag to compare

✨ Enhancements

  • Added avatarId, host, and properties as optional table attributes in the control panel Webmention view
  • Fixed Bluesky (via Bridgy) avatars: if an avatar image has no extension, the extension is now determined by the respective MIME type

v1.0.0

09 Mar 15:44
Compare
Choose a tag to compare

Webmention for Craft CMS 5. 🎉

Huge thanks to @brandonkelly for basically rewriting the plugin, adding Craft 5 support. 🙏💚

Warning

This update includes breaking changes and requires Craft CMS 5.6.10 or later. Please make sure you’re running at least this version of Craft and perform a database backup before upgrading the plugin.

Note

If you’re updating from Webmention v0.3, follow these instructions.

Changelog

Here’s what’s new:

  • Added Craft 5 compatibility.
  • Added the “Avatar Location” setting.
  • Avatar assets are now accessible via webmention.avatar.
  • Webmentions now store which element they are associated with.
  • Added the ability to update webmentions from the control panel.
  • Added the resave/webmentions CLI command.
  • Added the webmention/example-template CLI command.
  • Added the webmention/update CLI command.
  • Added the webmention/update-avatars CLI command.
  • Added the getWebmentions() and getWebmentionsByType() element behaviors
  • Added support for the Bridgy site types mastodon, bluesky, github, and reddit.
  • Added a new icon based on Paul Robert Lloyd’s IndieWeb icon designs
  • Fixed the regex that scans for URLs in entries so that it now correctly handles Markdown links
  • Lots of smaller bugfixes and improvements

Updating from v0.3

To update from Webmention 0.3 on Craft 2, do the following after upgrading Craft CMS:

  1. Follow the installation instructions.

  2. Go to SettingsWebmention and select the volume that avatars are stored in, from the Avatar Location setting.

  3. Run the following CLI command to update your existing webmentions’ avatar relations:

    php craft webmention/update-avatars
  4. Run the following CLI command to update search indexes for existing webmentions:

    php craft resave/webmentions --update-search-index
  5. Update your templates based on the following changes:

    Old New
    webmention.author_name webmention.authorName
    webmention.author_url webmention.authorUrl
    webmention.author_photo webmention.avatar.getUrl()
    webmention.url webmention.hEntryUrl
    webmention.site webmention.host
    craft.webmention.getAllWebmentionsForEntry(craft.request.url) craft.webmention.getWebmentions()
    craft.webmention.showWebmentions(craft.request.url) craft.webmention.showWebmentions()
    craft.webmention.webmentionForm(craft.request.url) craft.webmention.webmentionForm()

Note

If you have any webmentions which contain double-encoded HTML entities, you can update them via the “Update” action in the UI, or with the following command:

php craft webmention/update --webmention-id=123

0.3.1

02 Apr 09:09
Compare
Choose a tag to compare
  • Changed the retrieval method for links within an entry to fix a bug where a very long article with many links would lead to a PHP execution timeout
  • Minor bugfixes and improvements

0.3.0

06 Jan 21:12
Compare
Choose a tag to compare
  • Webmention sending functionality implemented
  • Setting added: Entry Types (for Webmention sending)
  • New “Webmention Switch” field type

0.2.0

06 Jan 21:11
Compare
Choose a tag to compare
  • Webmentions are now stored as Craft elements (ElementType: Webmention_webmention)
  • Improved backend functionality: Webmentions are displayed under the tab Webmentions and can be deleted
  • The plugin now sets the type property of an incoming Webmention correctly, based on the Microformats properties u-like-of, u-like, u-repost-of, and u-repost.

0.1.0

06 Jan 21:10
Compare
Choose a tag to compare

First version