Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
v1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

hexo-infinite-scroll

Maintainability GitHub license code style: prettier

A fake infinite loading plugin for hexo.

View demo

Install & Usage

Check head.ejs(or head.swig) in the theme folder and add:

<script src="https://cdn.jsdelivr.net/gh/frontendsophie/hexo-infinite-scroll@2.0.0/dist/main.js"></script> 
<script>
    infiniteScroll()
</script>

Tips

In case not working, please check _config.yml and set all the per_page to 0 to disable pagination.

Config

key description default type
post selector of post '.post' string
showNum posts show number per scroll 3 number
loadTime loading animation show time(ms) 400 number
style class Name of loader 'line-scale' string
color color of loader '#f78769' string

About Loaders

Loaders are all generated through loaders.css by ConnorAtherton.
Click to preview and pick up what you like. Then set its className to the config, for example:

infiniteScroll({
    style: 'ball-pulse'
})

🎉

About v2

Improvements

  • Abandoned jquery and embraced TypeScript.
  • Simplified install process, bundled js and css into one file.
  • Fixed Android scroll bug.
  • More loader options coming from loaders.css.

Breaking changes from v1

  • API:
    • v2 flattened and renamed API to be more readable.
    • v2 removed loading.enabled option which means loader will always display.
  • Loaders:
    • v2 replaced old loaders with new loaders from loaders.css.

v1 is still available and its source code is now under v1/ folder.

About

A fake infinite loading plugin for hexo. 🎉v2 released!

Resources

License

Packages

No packages published