chrisrhymes / bulma-clean-theme

A clean and modern Jekyll theme based on Bulma
http://www.csrhymes.com/bulma-clean-theme/
MIT License
388 stars 492 forks source link

The product category layout does not allow to override the collection. #164

Closed jcm236 closed 2 months ago

jcm236 commented 2 months ago

I have a website here: repo In the _config.yml file I have set software to be a collection and set the collection variable in plugins.md to software. But the build fails if I do this. If I add products as a collection in the config file but keep collection as software in plugin.md, the build is successful. How do I override the default collection for products?

jcm236 commented 2 months ago

The code for the product category layout overrides the collection to page.collection if it exists. But page.collection means the page has to be in the same collection as the product. Ref: Variables

chrisrhymes commented 2 months ago

Please can you try updating the _config.yml to use version v1.0.4 in the remote theme as this was only added recently. I will work on updating the docs to state this.

jcm236 commented 2 months ago

Could you please provide an example product category page with a collection override?

jcm236 commented 2 months ago

I have updated the version of the theme to 1.0.4

jcm236 commented 2 months ago

I have implemented a fix here

jcm236 commented 2 months ago

I will open a PR to merge it

jcm236 commented 2 months ago

If this is merged, which version of the theme will I have to update to?

chrisrhymes commented 2 months ago

Hi. Please use 1.0.4. You don't need to edit the theme files, just add the name of your collection to the category page. Please see the documentation here.

https://www.csrhymes.com/bulma-clean-theme/docs/products/category-page/#customising-the-collection

jcm236 commented 2 months ago

Thank You! It works now.