docs: use YAML data for paginator obkect
This commit is contained in:
parent
9ff6a24a06
commit
bc11acc7b1
|
@ -1,3 +1,8 @@
|
||||||
|
# Variables provided by Jekyll core
|
||||||
|
#
|
||||||
|
# name: : name of the variable
|
||||||
|
# description: : content returned by the varialble
|
||||||
|
|
||||||
global:
|
global:
|
||||||
- name: site
|
- name: site
|
||||||
description: >-
|
description: >-
|
||||||
|
@ -133,21 +138,25 @@ page:
|
||||||
Returns <code>nil</code> for the first entry.
|
Returns <code>nil</code> for the first entry.
|
||||||
|
|
||||||
paginator:
|
paginator:
|
||||||
- name: paginator.per_page
|
|
||||||
description: Number of Posts per page.
|
|
||||||
- name: paginator.posts
|
|
||||||
description: Posts available for that page.
|
|
||||||
- name: paginator.total_posts
|
|
||||||
description: Total number of Posts.
|
|
||||||
- name: paginator.total_pages
|
|
||||||
description: Total number of pages.
|
|
||||||
- name: paginator.page
|
- name: paginator.page
|
||||||
description: The number of the current page.
|
description: The number of the current page
|
||||||
|
- name: paginator.per_page
|
||||||
|
description: Number of posts per page
|
||||||
|
- name: paginator.posts
|
||||||
|
description: Posts available for the current page
|
||||||
|
- name: paginator.total_posts
|
||||||
|
description: Total number of posts
|
||||||
|
- name: paginator.total_pages
|
||||||
|
description: Total number of pages
|
||||||
- name: paginator.previous_page
|
- name: paginator.previous_page
|
||||||
description: The number of the previous page.
|
description: >-
|
||||||
|
The number of the previous page, , or <code>nil</code> if no previous page exists
|
||||||
- name: paginator.previous_page_path
|
- name: paginator.previous_page_path
|
||||||
description: The path to the previous page.
|
description: >-
|
||||||
|
The path to the previous page, or <code>nil</code> if no previous page exists
|
||||||
- name: paginator.next_page
|
- name: paginator.next_page
|
||||||
description: The number of the next page.
|
description: >-
|
||||||
|
The number of the next page, , or <code>nil</code> if no subsequent page exists
|
||||||
- name: paginator.next_page_path
|
- name: paginator.next_page_path
|
||||||
description: The path to the next page.
|
description: >-
|
||||||
|
The path to the next page, or <code>nil</code> if no subsequent page exists
|
||||||
|
|
|
@ -71,74 +71,7 @@ with the first 5 posts, `blog/page2/index.html` with the next 5 posts and
|
||||||
The pagination plugin exposes the `paginator` liquid object with the following
|
The pagination plugin exposes the `paginator` liquid object with the following
|
||||||
attributes:
|
attributes:
|
||||||
|
|
||||||
<div class="mobile-side-scroller">
|
{% include docs_variables_table.html scope=site.data.jekyll_variables.paginator %}
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Attribute</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>page</code></p></td>
|
|
||||||
<td><p>current page number</p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>per_page</code></p></td>
|
|
||||||
<td><p>number of posts per page</p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>posts</code></p></td>
|
|
||||||
<td><p>a list of posts for the current page</p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>total_posts</code></p></td>
|
|
||||||
<td><p>total number of posts in the site</p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>total_pages</code></p></td>
|
|
||||||
<td><p>number of pagination pages</p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>previous_page</code></p></td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
page number of the previous pagination page,
|
|
||||||
or <code>nil</code> if no previous page exists
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>previous_page_path</code></p></td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
path of previous pagination page,
|
|
||||||
or <code>nil</code> if no previous page exists
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>next_page</code></p></td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
page number of the next pagination page,
|
|
||||||
or <code>nil</code> if no subsequent page exists
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><p><code>next_page_path</code></p></td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
path of next pagination page,
|
|
||||||
or <code>nil</code> if no subsequent page exists
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="note info">
|
<div class="note info">
|
||||||
<h5>Pagination does not support tags or categories</h5>
|
<h5>Pagination does not support tags or categories</h5>
|
||||||
|
|
Loading…
Reference in New Issue