hoetmaaiers / metalsmith-project-images Goto Github PK
View Code? Open in Web Editor NEWA metalsmith plugin that scan all images in subfolders and add it to metadata.
A metalsmith plugin that scan all images in subfolders and add it to metadata.
This causes the metalsmith pipeline to continue even when this step has not finished. This causes weird errors when the files parameter to the plugin is modified by other steps in the pipeline (e.g. md -> html):
...\node_modules\metalsmith-project-images\src\index.js:67
files[file][options.imagesKey] = files[file][options.imagesKey] || [];
^
TypeError: Cannot read property 'images' of undefined
Use fs.existsSync on line 55 instead.
Hi! Thank you for a wonderful plugin. Excellent work on the local machine. But there are some problems with travis-ci (https://travis-ci.org/iamvlado/metalsmith-tests).
/home/travis/build/iamvlado/metalsmith-tests/node_modules/metalsmith-project-images/src/index.js:36
_.each (options, (optionsItem) => {
^^
SyntaxError: Unexpected token =>
You do not know why this happens?
If I have a fold structure like so:
| images/
| |-- image-1.png
| |-- image-2.png
| |-- more-images/
| |-- |-- image-3.png
| |-- |-- image-4.png
...is there a way I can post all images at once with the same call?
Currently the folder specified as imagesDirectory
has to exist in every project / item of your pattern.
e.g.:
.use(images({
pattern: 'projects/**/*'
}))
in every project there has to be a folder images
. Otherwise you get an Error: ENOENT: no such file or directory
It would be great to be able to not have this folder, in case there are no images to the project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.