Docpad пейджинг 404 грешка

Кажете ми защо пейджингът спря да работи. По-скоро странирането работи, но дава 404 страница.

Пример: altyncev.ru/posts

Конфигурация и файл с публикации в моето репо.

Глобални промени не се правят.

Публикации:

<% posts = @getCollection('posts') %>
<% for i in [@[email protected]]: %>
    <% document = posts.at(i).toJSON() %>
    <article class="post">
        <p class="posts_date"><%= @formatDate(document.date) %></p>
        <a href="/bg<%= document.url %>"><h3><%= document.title %></h3></a>
        <div class="post-content"><%- @getCuttedContent(String(document.contentRenderedWithoutLayouts)) %></div>
        <% if @hasReadMore(String(document.contentRenderedWithoutLayouts)): %>
        <div class="read_more"><a href="/bg<%= document.url %>"><strong>Читать далее &rarr;</strong></a></div>
        <% end %>
    </article>
<% end %>

<div class="pagination">
    <ul>
        <% if !@getDocument().hasPrevPage(): %>
            <li class="disabled"><span>«</span></li>
        <% else: %>
            <li><a href="/bg<%= @getDocument().getPrevPage() %>">«</a></li>
        <% end %>
        <% for num in [[email protected]]: %>
            <% if @document.page.number == num: %>
                <li class="active"><span><%= num %></span></li>
            <% else: %>
                <li><a href="/bg<%= @getDocument().getPagedUrl(num) %>"><%= num %></a></li>
            <% end %>
        <% end %>
        <% if !@getDocument().hasNextPage(): %>
            <li class="disabled"><span>»</span></li>
        <% else: %>
            <li><a href="/bg<%= @getDocument().getNextPage() %>">»</a></li>
        <% end %>
    </ul>
</div>

person npofopr    schedule 28.05.2013    source източник


Отговори (1)


Този плъгин за DocPad може да е измамен начин да го направите: https://github.com/docpad/docpad-plugin-paged

person Mikeumus    schedule 27.06.2013