Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Error to load CSS in Index.html [Fix] [CSS] #306

Open
TiagoSAmaral opened this issue Jul 30, 2021 · 2 comments
Open

Error to load CSS in Index.html [Fix] [CSS] #306

TiagoSAmaral opened this issue Jul 30, 2021 · 2 comments

Comments

@TiagoSAmaral
Copy link

Hi!
I believe there is an error generating the path to the 'all.css' file. A '/' is being placed at the very beginning, and this is not allowing it to be properly loaded into index.html.

Result after build documentation:
<link rel="stylesheet" type="text/css" href="/all.css" media="all" />

Expected result:
<link rel="stylesheet" type="text/css" href="all.css" media="all" />

@quntion
Copy link

quntion commented Aug 20, 2021

I also encountered a similar problem, how can I solve this problem? Thank you

@Lukas-Stuehrk
Copy link
Member

This is not a bug and working as intended. The generated HTML files are intended to be hosted by a web server. Opening the files from the local file system is not supported. See also #174 for a more detailed discussion.

However, please have a look into the --base-url option. Setting this flag might already solve your problem.

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

No branches or pull requests

3 participants