krautgortna / statamic-disqus
This Statamic Addon adds a Disqus comment section to your Statamic views
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:addon
pkg:composer/krautgortna/statamic-disqus
Requires
- php: >= 7.0
- statamic/cms: ^3.0
README
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 accountDISQUS_SECRETused for server-side API callsDISQUS_API_KEYused for client-side API callsDISQUS_METHODchoose 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