-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
CSS and IMG not loading in GitHub Enterprise Pages #857
Comments
This is caused due to how Example:
I think baseUrl in this case shouldn't be |
I fixed this by changing the baseUrl from
In other words, I had to specify the full URL. That, I think, is not the expected behavior. The documentation should be updated to reflect that. Or #689 be fixed. |
Did you try |
Hi @theletterf - The |
@endiliey @JoelMarcey It works that way :-) |
This is because GH Enterprise serve from one endpoint which is {githubHost} so the baseUrl should be set as according. Closing this. P.S We accept better documentation PR for https://docusaurus.io/docs/en/site-config.html#mandatory-fields documentation on https://github.com/facebook/docusaurus/edit/master/docs/api-site-config.md |
Hi All, while the solution from @endiliey works for publishing (to GH Pages), I've found that when I run locally I need to use a baseUrl of The MD image links I am using are in the format:
I believe this is a side effect of applying the baseUrl in local development mode as per this commit : e619884 I suppose I could use relative image urls Another option may be if we introduce another baseUrl for when running a local development server... ie:
or maybe modifying the index.html template to use a If you feel any of these approaches may be feasible I can investigate further and PR. Thanks!! |
You should link the image with Referring The RAW Markdown is below: It got transformed into |
🐛 Bug Report
I work in a GitHub Enterprise environment. Publishing, as implemented by #689 , works well. Files are pushed to the repo with the same folder structure as in local. The site loads well in localhost:3000.
The problem is that the static pages reference '/css/main.css' instead of '../css/main.css'. The CSS is there. This happens with custom CSS and images, too. If I manually tweak the path to '../css/', the site renders as intended. I troubleshooted this with @endiliey on Discourse, but we couldn't find the root cause.
This may be similar to #448 .
Have you read the Contributing Guidelines on issues?
Yes.
To Reproduce
Expected behavior
CSS should load fine and styles should be applied to the static pages. Images put under /website/static/img should load.
Actual Behavior
Pages load without styles nor images.
The text was updated successfully, but these errors were encountered: