In an Eleventy site using Liquid templates I can usually get a full/absolute URL with the url
filter like this {{'/books/' | url}}
When I am looping through data I need to use the slugify
filter to convert that data into a usable URL like this: /books/{{book.title | slugify}}
That works, but I get a URL that is not absolute. How can I get both to happen? I have tried the following:
{{'/books/' {% book.title | slugify %} | url}}
{{'/books/' {{ book.title | slugify }} | url}}
{{'/books/'book.title | slugify | url}}
I can't seem to find any documentation on using multiple filters like this.
{{ '/books/' | url }}{{ book.title | slugify | url }}
<a href="{{ '/books/' | url }}{{ book.title | slugify | url }}">{{ book.title }}</a>