{% if include.media_url contains "https://youtu.be/" %} {% assign media_url = include.media_url | replace: 'https://youtu.be/','https://youtube.com/embed/'%} {% else %} {% assign media_url = include.media_url%} {% endif %}