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

Absolute URL with sub-directory does not work with custom theme and CSS

sagikazarmark opened this issue · comments

I'm deploying slides generated with reveal-md to GitHub Pages. (URLs generally look like this: https://USERNAME.github.io/REPOSITORY/)

I decided to add some custom CSS and a custom theme. This is what the generated HTML looks like:

    <meta property="og:url" content="https://sagikazarmark.github.io/temporal-intro-workshop/" />
    <link rel="shortcut icon" href="./favicon.ico" />
    <link rel="stylesheet" href="./dist/reset.css" />
    <link rel="stylesheet" href="./dist/reveal.css" />
    <link rel="stylesheet" href="/_assets/slides/theme.css" id="theme" />
    <link rel="stylesheet" href="./css/highlight/monokai.css" />

    <link rel="stylesheet" href="./_assets/slides/custom.css" />

The problematic line is the theme as it tries to load the file from the wrong place.

Haven't tested it without an absolute URL, but I guess it breaks that way as well.

Ideally when an absolute URL is set, it should either be set as a base OR stylesheet URLs should become absolute as well.

When no absolute URL is set, everything should be loaded from a relative path (missing leading dot from the theme URL).

Still trying to find a workaround as the template only receives the final theme URL determined based on the theme parameter.

Well....I just hard coded the theme path for now...