Jekyll pagination on multiple pages

后端 未结 2 1978
刺人心
刺人心 2021-01-15 11:35

I am new to html/css but am attempting to create a blog using Jekyll and this theme I found here https://github.com/rosario/kasper

The homepage index.html has the al

2条回答
  •  走了就别回头了
    2021-01-15 12:39

    There is also another way to do that. Is using Jekyll Collections.

    For each collection you can have a _folder containing your markdown files. Then you can call your posts within this folder from whatever page you want.

    To do so, you will need to: 1st. add your collections to your _config.yml file:

    collections:
      example1:
        permalink: /example1/:path/
      example2:
        permalink: /example2/:path/
      example3:
        permalink: /example3/:path/
    

    2nd. create a folder to each collection, like: _example1, _example2 and _example3

    3rd. create a new html file from which you call each collection:

    {% for article in site.example1 %} ... {% endfor %}

    That's it! I hope to have helped. If I have, please mark this answer as useful. If you need more assistance, feel free to contact me.

提交回复
热议问题