CouscousPHP / Couscous

Couscous is good.
https://couscous.io
Other
840 stars 104 forks source link

Add support to override template properties from command line #269

Open MontealegreLuis opened 9 months ago

MontealegreLuis commented 9 months ago

For example

bin/couscous preview --config template.url=https://github.com/CouscousPHP/Template-Dark.git

As mentioned in this issue comment: https://github.com/CouscousPHP/Couscous/issues/159#issuecomment-439488113

MontealegreLuis commented 9 months ago

Tests are passing locally, but not sure if there's anything else I need to check.

When I run my change locally

bin/couscous preview --config template.url=https://github.com/CouscousPHP/Template-Dark.git

I see this error

 There was an error while rendering the file "templates.html" with the layout "templates.twig": Template "templates.twig" is   
  not defined. 

Not sure if it's something specific with the documentation in the docs directory, or If should try to fix the error above.

Disregard this observation, I just noticed this file https://github.com/CouscousPHP/Couscous/blob/master/templates.md uses a different layout, and the templates I used to check don't have a layout named templates.