-
Bruno Bruno authoredBruno Bruno authored
Jekyll Plugins
Jekyll is designed to be extensible via Plugins written in Ruby. The simplest method is to add Plugins directly to the "_plugins" directory, making them a part of the project repository (rather than an external Gem). The plugins are Ruby code and run immediately as Jekyll starts.
CollectionBuilder-CSV currently uses three custom plugins "CollectionBuilder Page Generator" ("cb_page_gen.rb"), "CollectionBuilder Helpers" ("cb_helpers.rb"), and "Array Count Uniq" ("array_count_uniq.rb").
Keep in mind that plugins can not be used on GitHub Pages default build (although they can be used by setting up a GitHub Actions based build process). Thus, collectionbuilder-gh uses fairly slow and complicated Liquid and Javascript to generate items pages and unique counts from metadata. Those methods are not efficient enough to handle larger collections.
CollectionBuilder Page Generator
"CollectionBuilder Page Generator" ("cb_page_gen.rb") creates individual html pages from each record in your metadata CSV (or other _data files). I.e. it generates Item pages for your collection driven directly from your metadata. It can also generate all sort of other pages from any data file.
Basic use following CB conventions requires no configuration.
CB Page Gen will automatically generate pages from the data specified by "_config.yml" metadata
option.
Alternatively, for more advanced use you can provide one or more configurations in the page_gen
option in "_config.yml", allowing you to customize the generation options or generate pages from multiple CSVs.