chrisrhymes / bulma-clean-theme

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

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

Closed jcm236 closed 1 week ago

jcm236 commented 2 weeks 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 weeks 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 weeks 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 weeks ago

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

jcm236 commented 2 weeks ago

I have updated the version of the theme to 1.0.4

jcm236 commented 2 weeks ago

I have implemented a fix here

jcm236 commented 2 weeks ago

I will open a PR to merge it

jcm236 commented 2 weeks ago

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

chrisrhymes commented 2 weeks 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 1 week ago

Thank You! It works now.