key for name of json file (rather than just its fields) for use in Jekyll page generator?
问题 I'm using a data page generator for my Jekyll website to create pages based on a folder of JSON files. I want the generator to use the names of the json files as the page title, but I can't figure out the right syntax to tell it to use the file name instead of one of the fields in the json. I can access the file name in one of the layout pages with: for file in site.data.drinks file[0] But file[0] doesn't work in the config (neither does record[0] or record): - data: drinks template: drink