docpress / docpress-core

Parses projects and turns them into a documentation website
3 stars 6 forks source link

Proposal: should missing local images links fail the build? #200

Open kjantzer opened 5 years ago

kjantzer commented 5 years ago

Currently they do....

However, GitHub supports linking to repo images in the README markdown files, like so:

# <img src="./icons/32x32.png"> Bathroom Status Chrome Extension (example)

However, this currently fails the build because of line 64 in fix_html.js

throw new Error(${base}: Unknown reference '${origUrl}')

What do you think about changing the fatal error to a console.error so that the docs still build. I'd rather have a broken image then no docs at all.

Side note: I looked around the Metalsmith docs to see if there was a way of copying the local image to the build directory, but I didn't find anything solution.

knownasilya commented 5 years ago

I'm totally for that change, as long as it is clearly communicated during the build what happened and what needs to happen to resolve it.