We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 342b5e6 commit 9427720Copy full SHA for 9427720
src/index.js
@@ -26,8 +26,12 @@ function isDraft(value, fallback) {
26
/**
27
* Metalsmith plugin to hide drafts from the output.
28
*
29
- * @param {Options} [options]
+ * @param {Options|boolean} [options]
30
* @returns {import('metalsmith').Plugin}
31
+ * @example
32
+ * metalsmith.use(drafts()) // same as { include: false }
33
+ * metalsmith.use(drafts(true)) // same as { include: true }
34
+ * metalsmith.use(drafts({ default: false, include: false })) // same as default
35
*/
36
function configureDrafts(options = defaultOptions) {
37
if (typeof options === 'boolean') {
0 commit comments