webpro / reveal-md

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with scipt when using static

Alexsaphir opened this issue · comments

I have at the top level, plugin, preprocessor,slides,plugin.js, reveal.md,reveal.json. My assets are place at slides/assets and my markdown files inside slides.

When I use the live server, the plugins are loaded correctly, however when building the static site, the html file try to load the plugingsfrom ../_assets in place of _assets.

Launching the ive server with a container and the command slides/ --watch --disable-auto-open

reveal-md.json

{
    "separator": "^\n---Slide---\n",
    "verticalSeparator": "^\n___Slide___\n",
    
    "preprocessor": "preprocessor/autoslide-html.js",

    "scripts": [
        "plugin/reveal.js-menu/menu.js",
        "plugin.js"
    ]
}

@Alexsaphir When i use 5.3.1 version, i met the same problems, the following is my reveal-md configuration

  • reveal-md
  • so i downgrade to 5.2.0(but like staticDir commands, i can't fint it from reveal-md's cli options, just have static-dir command etc)

I have the same issue, but when downgrading to 5.3.0 (or 5.2.0) I have an issue with my custom theme.

In 5.3.0 (scripts are ok but theme is ko):

<link rel="stylesheet" href="/_assets/assets/smile.css" id="theme" />
[...]
<script src="./_assets/assets/toc.js"></script>
<script src="./_assets/assets/plugin.js"></script>

In 5.3.1 (scripts are ko but theme is ok):

<link rel="stylesheet" href="./_assets/assets/smile.css" id="theme" />
[...]
<script src="../_assets/assets/toc.js"></script>
<script src="../_assets/assets/plugin.js"></script>

I use the command npm run reveal-md -- --static --static-dirs=assets --theme assets/smile.css reveal-md.md.
And reveal-md.json is:

{
  "scripts": ["assets/toc.js", "assets/plugin.js"]
}

I should have tested better and not merge #398. This is reverted in v5.3.2

Feel free to check and play with https://github.com/webpro/reveal-md-test if you encounter any more issues.

commented

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.