MediaWiki extension that gives article links custom Discord embeds using Discord's component embeds using <link rel="discord:component-embed">.
It pulls the description from description property of the page written by the Description2 extension, and the image from the page_image/page_image_free property of the page written by the PageImages extension.
Derived from the Discord feature set of the WikimediaCustomizations
extension (GPL-2.0-or-later) in src/Discord
Endpoint: /rest.php/discord-embed?title=Page_name
You should have the Description2 and PageImages extensions installed and enabled for this extension to work properly, it won't break your wiki but the embeds will be missing the description and image if they aren't installed.
Copy this folder to extensions/DiscordEmbed, then in LocalSettings.php:
wfLoadExtension('DiscordEmbed');For the custom Main Page embed to work, you also need to have set $wgSitename and $wgLogos (icon) in your LocalSettings.php file. You should also set a value in MediaWiki:Discordembed-mainpage-description to fill the description of the main page embed.
This extension is licensed under the GPL-2.0-or-later license. See LICENSE for details.