https://github.com/j911/jekyll-infinite-scroll
🖱 infinite scroll in jekyll
https://github.com/j911/jekyll-infinite-scroll
Last synced: 3 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T04:22:30.000Z (over 3 years ago)
- Last Synced: 2025-04-12T22:49:26.123Z (3 months ago)
- Language: JavaScript
- Homepage: https://j911.me/2018/09/setup-jekyll-infinite-scroll.html
- Size: 24.4 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jekyll-infinite-scroll


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