bitly_shortener
15 sites
Security covered
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) }}