Skip to content

Commit

Permalink
README/help for --assetrefs=colocate
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Nov 27, 2024
1 parent 6935b3a commit 43fca2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ npx @11ty/import [type] [target] --cacheduration=20m
# Change output format (default: markdown)
npx @11ty/import [type] [target] --format=html

# Use absolute asset URLs (default: relative)
# Change asset reference URLs: relative (default), absolute, colocate
# slug.md and assets/asset.png with <img src="assets/asset.png">
npx @11ty/import [type] [target] --assetrefs=relative
# slug.md and assets/asset.png with <img src="/assets/asset.png">
npx @11ty/import [type] [target] --assetrefs=absolute
# slug/index.md and slug/asset.png with <img src="asset.png">
npx @11ty/import [type] [target] --assetrefs=colocate

# EXPERIMENTAL: Persist *new* non-draft content
# - `github` persist type requires a `GITHUB_TOKEN` environment variable.
Expand Down
4 changes: 3 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ if(help) {
# Change output format (default: markdown)
npx @11ty/import [type] [target] --format=html
# Use absolute asset URLs (default: relative)
# Change asset reference URLs: relative (default), absolute, colocate
npx @11ty/import [type] [target] --assetrefs=relative
npx @11ty/import [type] [target] --assetrefs=absolute
npx @11ty/import [type] [target] --assetrefs=colocate
`);

process.exit();
Expand Down

0 comments on commit 43fca2b

Please sign in to comment.