feat(pagination): add option to disable prev/next navigation
* Feature: disable next/previous pagination buttons site-wide * Moved the displayPagination to the layout level and adjusted the documentation. * fix: improve pagination docs and layout whitespace - Fix indentation in docs layout templates - Add pagination documentation for all languages (fa, ja, zh-cn) - Simplify documentation to be more succinct --------- Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
@@ -121,6 +121,19 @@ params:
|
|||||||
height: 20
|
height: 20
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### صفحهبندی
|
||||||
|
|
||||||
|
برای غیرفعال کردن ناوبری قبلی/بعدی در پایین صفحات مستندات یا مقالات وبلاگ:
|
||||||
|
|
||||||
|
```yaml {filename="hugo.yaml"}
|
||||||
|
params:
|
||||||
|
page:
|
||||||
|
displayPagination: false # برای صفحات مستندات
|
||||||
|
blog:
|
||||||
|
article:
|
||||||
|
displayPagination: false # برای مقالات وبلاگ
|
||||||
|
```
|
||||||
|
|
||||||
## نوار کناری
|
## نوار کناری
|
||||||
|
|
||||||
### نوار کناری اصلی
|
### نوار کناری اصلی
|
||||||
|
|||||||
@@ -121,6 +121,19 @@ params:
|
|||||||
height: 20
|
height: 20
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ページネーション
|
||||||
|
|
||||||
|
ドキュメントページやブログ記事の下部にある前へ/次へナビゲーションを無効にするには:
|
||||||
|
|
||||||
|
```yaml {filename="hugo.yaml"}
|
||||||
|
params:
|
||||||
|
page:
|
||||||
|
displayPagination: false # ドキュメントページ用
|
||||||
|
blog:
|
||||||
|
article:
|
||||||
|
displayPagination: false # ブログ記事用
|
||||||
|
```
|
||||||
|
|
||||||
## サイドバー
|
## サイドバー
|
||||||
|
|
||||||
### メインサイドバー
|
### メインサイドバー
|
||||||
|
|||||||
@@ -128,6 +128,19 @@ params:
|
|||||||
height: 20
|
height: 20
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Pagination
|
||||||
|
|
||||||
|
To disable the previous/next navigation at the bottom of docs pages or blog articles:
|
||||||
|
|
||||||
|
```yaml {filename="hugo.yaml"}
|
||||||
|
params:
|
||||||
|
page:
|
||||||
|
displayPagination: false # for docs pages
|
||||||
|
blog:
|
||||||
|
article:
|
||||||
|
displayPagination: false # for blog articles
|
||||||
|
```
|
||||||
|
|
||||||
## Sidebar
|
## Sidebar
|
||||||
|
|
||||||
### Main Sidebar
|
### Main Sidebar
|
||||||
|
|||||||
@@ -121,6 +121,19 @@ params:
|
|||||||
height: 20
|
height: 20
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 分页导航
|
||||||
|
|
||||||
|
禁用文档页面或博客文章底部的上一篇/下一篇导航:
|
||||||
|
|
||||||
|
```yaml {filename="hugo.yaml"}
|
||||||
|
params:
|
||||||
|
page:
|
||||||
|
displayPagination: false # 文档页面
|
||||||
|
blog:
|
||||||
|
article:
|
||||||
|
displayPagination: false # 博客文章
|
||||||
|
```
|
||||||
|
|
||||||
## 侧边栏
|
## 侧边栏
|
||||||
|
|
||||||
### 主侧边栏
|
### 主侧边栏
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "components/last-updated.html" . }}
|
{{ partial "components/last-updated.html" . }}
|
||||||
{{ partial "components/pager.html" . }}
|
{{- if (site.Params.page.displayPagination | default true) -}}
|
||||||
|
{{- partial "components/pager.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
{{ partial "components/comments.html" . }}
|
{{ partial "components/comments.html" . }}
|
||||||
</main>
|
</main>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "components/last-updated.html" . }}
|
{{ partial "components/last-updated.html" . }}
|
||||||
{{ partial "components/pager.html" . }}
|
{{- if (site.Params.page.displayPagination | default true) -}}
|
||||||
|
{{- partial "components/pager.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
{{ partial "components/comments.html" . }}
|
{{ partial "components/comments.html" . }}
|
||||||
</main>
|
</main>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
Reference in New Issue
Block a user