Merge pull request #11 from esttorhe/patch-4
Make pagination sections configurable
| | |
| | | Content-Security-Policy: base-uri 'self'; connect-src 'self'; default-src 'self'; frame-ancestors 'none'; font-src 'self' stackpath.bootstrapcdn.com; img-src 'self'; object-src 'none'; script-src 'self'; style-src 'self' stackpath.bootstrapcdn.com; |
| | | Strict-Transport-Security: max-age=63072000; includeSubDomains; preload |
| | | ``` |
| | | |
| | | ### Configurable pagination section |
| | | You can configure the pages shown on the front page by altering the `mainSections` parameter: |
| | | ```toml |
| | | [params] |
| | | mainSections = ["post", "docs"] |
| | | ``` |
| | | ## License |
| | | |
| | | Anatole is licensed under the [MIT license](https://github.com/lxndrblz/anatole/blob/master/LICENSE). |
| | |
| | | keywords = "" |
| | | favicon = "favicons/" |
| | | customCss = [] |
| | | mainSections = ["post"] |
| | | |
| | | ## Math settings |
| | | [params.math] |
| | |
| | | {{ define "main" }} |
| | | {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }} |
| | | {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} |
| | | {{ range $paginator.Pages }} |
| | | <div class="post animated fadeInDown"> |
| | | <div class="post-title"> |
| | |
| | | <div class="pagination"> |
| | | {{ template "_internal/pagination.html" . }} |
| | | </div> |
| | | {{ end }} |
| | | {{ end }} |