tv2regionerne/statamic-iframely
Statamic Iframely
Statamic Iframely is a Statamic addon that enables integration with Iframely API.
Be aware that Iframely requires a paid subscription.
Features
Iframely is a uniform delivery service for all your various rich media embeds and URL data.
This addon provides a tag for easy embedding for social media and most websites.
The tag has a built in caching mechanism, to speed up requests and limit the API requests on Iframely.
How to Install
Run the following command from your project root:
composer require tv2regionerne/statamic-iframely
Publish the config
php artisan vendor:publish --tag statamic-iframely-config
Add your API key to your ENV and optionally adjust the cache configuration
IFRAMELY_API_KEY="Your API Key"
IFRAMELY_CACHE_ENABLED=true
IFRAMELY_CACHE_FOR="1 hour"
Please follow the documentation on the Iframely website on scripts and styles:
https://iframely.com/docs/omit-script
https://iframely.com/docs/omit-css
The parameters omit_script and omit_css are enabled by default.
You may change this through the parameters:
{{ iframely url="your url here" omit_script="0" omit_css="0" }}
How to Use
Update the config to enable private API's. Use the iframely antlers tag. The url parameter is required.
{{ iframely url="your url here" }}
There's a bunch of optional parameters which will be passed into the Iframely API call.
See the documentation for the below parameters on https://iframely.com/docs/iframely-api/
- iframe
- id
- omit_script
- omit_css
- import
- align
- lazy
- playerjs
- click_to_play
- consent
- theme
- language
- ssl
- media
- autoplay
- maxwidth
- maxheight
- origin
- title
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | License |
|---|---|---|
| v1.2.0 | ||
| v1.1.0 | ||
| v1.0.2 | ||
| v1.0.1 | ||
| v1.0.0 |