Discourse-a2a-bbcode

discourse-a2a-bbcode

Discourse 插件,允许在主题中插入 AddToAny 社交按钮。

仓库:https://github.com/sylque/discourse-a2a-bbcode

此插件与 DiscPage 配合使用尤为有用。可在 此处 查看 DiscPage 静态页面的演示。

安装

按照 这些说明 进行操作,将仓库 URL 设置为 https://github.com/sylque/discourse-a2a-bbcode.git

设置

  • discourse a2a bbcode enabled:开启或关闭该插件
  • discourse a2a bbcode categories:将社交按钮限制在指定的分类中。留空则允许在所有主题中显示社交按钮。

手册

提供了两种 BBCode:

  • abbfollow:用于插入“关注”按钮
  • abbshare:用于插入“分享”按钮

在编辑器预览窗格中,这些 BBCode 会渲染为标准的 HTML 链接。您需要保存主题后才能看到实际的按钮。

abbfollow

为指定的服务(参见 列表 1)和用户名插入“关注”按钮。

[abbfollow services=twitter,facebook,instagram user=Grendizer]
[/abbfollow]

您可以省略 services 参数,改为提供 href 参数。在这种情况下,按钮的唯一功能是打开提供的 URL。

[abbfollow services=email href=https://www.grendizer.com/mailing_list_form]
[/abbfollow]

abbshare

为指定的服务(参见 列表 2)插入“分享”按钮。分享的消息将由以下内容组成:

  • url 参数:要分享的 URL
  • BBCode 块的内容:要分享的标题
[abbshare services=twitter,facebook,email url=https://www.grendizer.com]
我发现了这个超棒的网站!
[/abbshare]

示例 Markdown 代码

# AddToAny BBCode

这是 **discourse-a2a-bbcode** 的演示,这是一个允许在主题中插入 AddToAny 社交按钮的 Discourse 插件。

**关注我们:** [abbfollow services=twitter,facebook user=PCastafiore][/abbfollow][abbfollow services=email href=https://docs.google.com/forms/d/e/1FAIpQLScrkDYdIYJtnA81Oqup828qmlHIv6oTvSE6rAczwB2gsx-gDg/viewform?usp=sf_link][/abbfollow]

**分享此页面:** [abbshare services=twitter,facebook,email,plus url=https://www.castafiore.org]我发现了这个超棒的网站![/abbshare]

7 个赞