krautgortna/statamic-disqus 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

krautgortna/statamic-disqus

最新稳定版本:v1.2

Composer 安装命令:

composer require krautgortna/statamic-disqus

包简介

This Statamic Addon adds a Disqus comment section to your Statamic views

README 文档

README

Statamic 3 Software License Downloads Create Release

Features

  • Provides Antlers tags that can be used in any frontend view
  • Easily provide a discussion thread id as a parameter
  • For API calls: decide if you want to make a server- or client-side API call

Tags

  • {{ disqus:comments id="id" }} to load the Disqus embed plugin for a given thread
  • {{ disqus:count id="id" }} to show the number of comments ("posts") of a given thread
  • {{ disqus:likes id="id" }} to show the number of likes of a given thread

How to Use

First of all, provide your Disqus forum's shortname via the .env file:

DISQUS_SHORTNAME="your_shortname"

In the Antlers template, you can now use

{{ disqus:comments id="id" }}

Provide a variable as the thread id, e.g. when the slug is the Disqus thread id:

{{ disqus:comments :id="slug" }}

All .env Parameters

  • DISQUS_SHORTNAME="your_shortname" to identify your account
  • DISQUS_SECRET used for server-side API calls
  • DISQUS_API_KEY used for client-side API calls
  • DISQUS_METHOD choose between 'server' or 'client' API calls (note that the Disqus embed is always loaded on client side)

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

composer require krautgortna/statamic-disqus

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-08