Skip to content

Commit 1711d7f

Browse files
committed
A few more examples on the docs
1 parent 7c5e7d0 commit 1711d7f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ npx @11ty/import [type] [target] --output=dist
3838
# Allow overwriting existing files
3939
npx @11ty/import [type] [target] --overwrite
4040

41+
# Allow draft entries to overwrite existing files (bypasses --overwrite)
42+
npx @11ty/import [type] [target] --overwrite-allow=drafts
43+
4144
# Change local fetch cache duration (default: 24h)
4245
npx @11ty/import [type] [target] --cacheduration=20m
4346

@@ -140,6 +143,12 @@ importer.setAssetReferenceType("relative"); // --assetrefs
140143
// Sources (one or more)
141144
importer.addSource("bluesky", "@11ty.dev");
142145

146+
// Simple CSS selector (class names only) for preserved elements in Markdown conversion
147+
importer.addPreserved(".save-this-class-name");
148+
149+
// Allow draft entries to overwrite (independent of Safe Mode value)
150+
importer.setOverwriteAllow("drafts");
151+
143152
let entries = await importer.getEntries({
144153
contentType: "markdown", // --format
145154
within: "*", // date or last updated date must be within this recent duration (e.g. 24h, 7d, 1y)

cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if(help) {
106106
# Allow overwriting existing files
107107
npx @11ty/import [type] [target] --overwrite
108108
109-
# Allow draft entries to overwrite existing files
109+
# Allow draft entries to overwrite existing files (bypasses --overwrite)
110110
npx @11ty/import [type] [target] --overwrite-allow=drafts
111111
112112
# Change local fetch cache duration (default: 24h)

0 commit comments

Comments
 (0)