Bitly Shortener
This module connects your Drupal site to the Bitly URL shortening service. You can then generate shortened Bitly links for your content, either through a dedicated block or programmatically within your custom modules and Twig templates.
This Bitly Shortener module integrates drupal sites with the Bitly URL shortening service. We can use it in a custom module and twig template.
CONFIGURATION
Create an account on Bitly. Save the access token in the Bitly shortener configuration form. https://app.bitly.com/settings/api/
Block:
Bitly Shortener block assing in drupal block region. Generate the Bitly Shortener URL of the current page.
Services:
$bitly_url = \Drupal::service('bitly_shortener')->shortener('https://www.drupal.org/');
Twig:
{% set site_url = url("<current>") %}
{{ bitly_shortener(site_url|render|render) }}
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.