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) }}
Supporting organizations:
Project information
Maintenance fixes only
Considered feature-complete by its maintainers.20 sites report using this module
- Created by radheymkumar on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.



