webpro / reveal-md

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

WIP fix build vs serve #417

Closed nuke-web3 closed 1 year ago

nuke-web3 commented 2 years ago

Closes #370

still not quite there, help would be aprreciated!

MartenBE commented 1 year ago

Do you need any help with this?

MartenBE commented 1 year ago

I've tried it out and only changing the following fixed my use case (theme is selected for both the listings page as the slides):

module.exports.getThemeUrl = (theme, base = '') => {
  const parsedUrl = url.parse(theme);
  if (parsedUrl.host) {
    return theme;
  } else {
    const revealTheme = revealThemes.find(
      themePath => path.basename(themePath).replace(path.extname(themePath), '') === theme
    );
    return base + '/' + (revealTheme ? revealTheme : getAssetPath(theme)); // CHANGED ONLY THIS LINE
  }
};

This is the only line I changed from the npm package. @webpro , would this be a valid fix? This is currently the only bug to stop using this at our educational institution. This should at least fix https://github.com/webpro/reveal-md/issues/439 , however I am not certain what revealTheme does, the change probably wouldn't affect it.

nuke-web3 commented 1 year ago

Do you need any help with this?

Sure - happy to have you replace this PR with another that include a patch and see if that fixes my issues as well :grinning: - we are using this patch at an educational program in production, would be great to see what you are up too as well @MartenBE

MartenBE commented 1 year ago

I've submitted https://github.com/webpro/reveal-md/pull/458 , please try it out. It solves my error (but it is a small use case).