Skip to content

Prism theme does not show correct CSS when baseURL/publishDir are not set to / #153

@Nadine2016

Description

@Nadine2016

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for support

Describe the bug

I am running into an issue when using the Prism themes. It works great locally when my baseURL is set to / and the publishDir are not set. This is the same setup that you have in the hugo.toml file of the exampleSite.

when we push the docs to prod, we need to change the baseURL and set a publishDir. As soon as I do that, the Prism theme does not work properly anymore. I tried it with the exampleSite and seeing the same issue.

This is how it looks like with baseURL = / and no publishDir:
image

And this is how it looks like with baseURL = https://example.com and publishDir = public/product
image

Expected behavior

The CSS should be the same in both scenarios

Screenshots

No response

Environment

- OS:
- Browser: Chrome and Firefox
- Browser Version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions