Hello everyone, when using the jekyll-paginate-v2 plug-in, this piece of code does not work for me, namely, where the class "selected" is assigned, this class is not assigned at all, the description of the plug-in says
The trail object exposes three properties: num: The number of the page path: The path to the page title: The title of the page Description of the work of this moment at the bottom of the page The same problem in the example from the developers of this plugin. It is necessary to select the active page in pagination. Developer Example
You need to register jekyll build and jekyll serve.
{% if paginator.page_trail %} {% for trail in paginator.page_trail %} <li {% if page.url == trail.path %}class="selected"{% endif %}> <a href="{{ trail.path | prepend: site.baseurl | replace: '//', '/' }}" title="{{trail.title}}">{{ trail.num }}</a> </li> {% endfor %} {% endif %}