gvwilson / sdxjs

Software Design by Example with JavaScript
Other
58 stars 13 forks source link

Fix "terms defined" template behavior #11

Closed juananpe closed 2 years ago

juananpe commented 2 years ago

This template https://github.com/gvwilson/sdxjs/blob/main/lib/mccole/templates/definitions.html tries to add the "Terms defined" header to each chapter. The problem is that the first chapter doesn't have any terms defined (but the template keeps adding the "Terms defined" header)

Adding the and terms condition to the template seems to solve the problem

{% if node_slug == node.slug and terms %}

Before applying the patch it looked like this:

image image
juananpe commented 2 years ago

Mmmh... sorry, I should have applied this patch over the upstream main (without commits e7931f4 and a3ccfa6), not over my main :-\

gvwilson commented 2 years ago

Good catch - fixed in d4758979 to avoid the over-patch.