rknightuk / eleventy-plugin-post-graph

Generate Github-style post distribution graph for your blog posts in Eleventy
https://postgraph.rknight.me/
11 stars 5 forks source link

noLabels option generates 'false' line in CSS when not set to true #8

Closed bobmonsour closed 10 months ago

bobmonsour commented 10 months ago

When the noLabels option is left to its default setting of false, it generates a line in the CSS of 'false' rather than being silent, resulting in a CSS validation error. When it is set to true, the option setting works correctly.

I tracked it down to this line in your plugin:

${options.noLabels && `
        .${prefix}__year, .${prefix}__months { display: none; }
    `}

It should probably be something like this:

${options.noLabels ? `.${prefix}__year, .${prefix}__months { display: none; }` : ''}
rknightuk commented 10 months ago

1.0.7 fixes this Bob 👍