webpro / reveal-md

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file
MIT License
3.76k stars 419 forks source link

Can't get first slide as feature image #494

Open ooker777 opened 4 months ago

ooker777 commented 4 months ago

If in your option there is no feature image, then this line https://github.com/webpro/reveal-md/blob/0f1c75a266cc21a06ff5b0b9ba1d53edcdfcc4ac/lib/featured-slide.js#L25-L30 will return and you don't have any feature image.

If --featured-slide 0 is set, then this function https://github.com/webpro/reveal-md/blob/0f1c75a266cc21a06ff5b0b9ba1d53edcdfcc4ac/lib/featured-slide.js#L18-L21 will make the URL to be:

${initialUrl}#/0

and this will return error. I try to change the condition to:

isNaN(slide) || slide === 0 

and the URL is just:

${initialUrl}

which should work, but it still get error. I have no idea on how to fix this.