Finding asset (and other) orphans

Dear Jekyll community:

This is my first post after using Jekyll for a year, thank you for a wonderful tool! Several hundred pages are now handled by Jekyll in a very organised manner, especially my illusion pages

and I have successfully created plugins. Now comes the question: In DreamWeaver, which I formerly used, there were ways to search for orphans in the sense of assets (e.g. images) not referenced anywhere. I have not found any automated way to do this – suggestions please?

Looking forward to any advice,
best regards, Michael

I don’t think there is anything in jekyll to can do that, but you could probably use gulp to do it, a quick google search found:

I use gulp to build my site and handle all assets, works really well and make jekyll quicker. Though it can be complicated.

Wow, thank you, that was fast AND helpful. So gulp seems to be a javascript library that I can run in node. Ok, will have to look into that in detail.

Thanks again, best, Michael

Another way to test for unused files is to use a web-crawler like wget to download a site and compare it with _site/ – any difference means that some files are unused. Here’s an example Makefile rule to do this test:

That’s a neat idea, and with code! Thank you. Best, Michael