@apleasantview/eleventy-plugin-baseline 0.1.0-next.18 → 0.1.0-next.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,11 +55,15 @@ export default function baseline(options = {}) {
55
55
  eleventyConfig.addGlobalData("_baseline", userOptions);
56
56
  globals(eleventyConfig);
57
57
  eleventyConfig.addPassthroughCopy({ "./src/static": "/" }, { failOnError: true });
58
- eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
59
- if (data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
60
- return false;
61
- }
62
- });
58
+
59
+ // Prevents double-registering the preprocessor, user config wins.
60
+ if (!eleventyConfig.preprocessors.drafts) {
61
+ eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
62
+ if (data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
63
+ return false;
64
+ }
65
+ });
66
+ }
63
67
 
64
68
  if (isMultilingual) {
65
69
  eleventyConfig.addPlugin(modules.multilangCore, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apleasantview/eleventy-plugin-baseline",
3
- "version": "0.1.0-next.18",
3
+ "version": "0.1.0-next.19",
4
4
  "description": "An experimental Swiss army knife toolkit for Eleventy",
5
5
  "type": "module",
6
6
  "main": "eleventy.config.js",