mirror of
https://github.com/quartz-community/comments.git
synced 2026-07-22 02:50:28 +00:00
Previously the frontmatter check suppressed comments on any falsy value (0, "", null, false, "false"), which is wider than the documented API (docs/features/comments.md only shows `comments: false`). The refactor also removes the `as Record<string, unknown>` cast dance that predated the plugin importing proper QuartzComponentProps. fileData.frontmatter and cfg.baseUrl are now typed directly. Regression tests cover: - frontmatter.comments=false / "false" -> suppressed (documented) - frontmatter.comments=true / "true" / undefined -> rendered - frontmatter.comments=0 / "" / null -> rendered (behavior change) - data attribute wiring and defaults - cfg.baseUrl fallback chain BEHAVIOR CHANGE: sites that relied on the prior permissive disable logic (e.g. setting `comments: 0` to hide comments) will now see comments rendered. Update to `comments: false` to restore the intent. |
||
|---|---|---|
| .. | ||
| comments.test.ts | ||