{{encodeUrl}} helper

Helper used if you need to use an URL inside the other URL i.e. when you are using the social sharing scripts. To encode plain text for a URL, use encodeUrlFragment.

Syntax:

{{encodeUrl URL_TO_ENCODE}}

Example:

https://social.media?sharer.php?url={{encodeUrl @website.currentUrl}}

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide