{{encodeUrlFragment}} helper

Helper used if you need to use a text inside the URL i.e. when you are using the social sharing scripts. To encode a whole URL, use encodeUrl.

Syntax:

{{encodeUrlFragment TEXT_TO_ENCODE}}

Example:

https://social.media?sharer.php?title={{encodeUrlFragment post.title}}

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