`jingo` comes with a filter that can make this a little cleaner:

```jinja2
<li {{ page.number|if_eq(number, 'class="active"') }}>
```