Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j911/jekyll-infinite-scroll
🖱 infinite scroll in jekyll
https://github.com/j911/jekyll-infinite-scroll
Last synced: about 2 months ago
JSON representation
🖱 infinite scroll in jekyll
- Host: GitHub
- URL: https://github.com/j911/jekyll-infinite-scroll
- Owner: J911
- License: mit
- Created: 2018-09-28T06:19:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T04:22:30.000Z (almost 3 years ago)
- Last Synced: 2024-11-15T07:30:35.243Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://j911.me/2018/09/setup-jekyll-infinite-scroll.html
- Size: 24.4 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jekyll-infinite-scroll
![CDN](https://img.shields.io/badge/CDN-1.0.5-red.svg)
![bower-modules](https://img.shields.io/badge/Bower-modules-green.svg)
![MIT-LISENCE](https://img.shields.io/badge/license-MIT-blue.svg)jekyll infinite scroll
## install
```
$ bower install jekyll-infinite-scroll --save
```
or
``````
or
direct download [this link](https://github.com/J911/jekyll-infinite-scroll/archive/master.zip)## Using
1. set pagenation in jekyell
add "jekyll-paginate" in `_config.yml` and `Gemfile`
and set `_config.yml`
```
paginate: 2
paginate_path: "/page/:num"
```2. set pagenation in html
(example)
```
{%- if paginator.posts.size > 0 -%}
{%- for post in paginator.posts -%}
{{ post.title | escape }}
{%- assign date_format = paginator.minima.date_format | default: "%b %-d, %Y" -%}
{{ post.date | date: date_format }}
{{ post.excerpt }}
{%- endfor -%}
{%- endif -%}
```
3. include this lib and setting
```var postWrapperId = 'card-wrapper';
var paginatePath = '/page/'
new InfiniteScroll(paginatePath, postWrapperId);```
4. Done! ✌🏻## LICENSE
MIT License