Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sagikazarmark opened this issue Nov 4, 2022 · 1 comment

Comments

@sagikazarmark
Copy link
Contributor

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.

@sagikazarmark
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant