In Jekyll, can we group multiple collections inside the same folder?

前端 未结 4 1069
南旧
南旧 2021-02-15 16:10

In config.yml, I define my collections like this:

collections:
  music:
    output: false
  dancing:
    output: false

The problem is I will ha

4条回答
  •  眼角桃花
    2021-02-15 17:02

    Answer is no. Your collections folder must be at the root of your root folder.

    Even if you name you create a collection in _collections/_music folder, and set it up like this :

    collections:
    
      collections/_music folder:
        output: true
    

    Jekyll ends up looking for your collection in _collections_music folder (without any slash) because of path sanitize process.

    See jekyll code in collection.rb, site.rb and jekyll.rb

提交回复
热议问题