Why does quarto replace index.html with directories #13166
Unanswered
kieranjmartin
asked this question in
Q&A
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
See this previous quarto issue which describes the problem in more detail.
Basically, when you render quarto on a web server (i.e. not locally), any links of the type "mypath/index.html" will be overwritten to "mypath" instead. This has the consequence that on any server which does not support a redirect from directory to index.html, these links will stop working.
There are real consequences to this: if you are using gitlab's preview function, this behaviour is not enabled (link to gitlab issue describing the problem)
which means that a previewed version of the site will work differently than the published version.
I appreciate that having the directory go to index.html is a web standard, so the failure case is relatively unsual, but I'm not sure I understand the utility of this code at all. What would break if quarto just preserved the links as is?
As a side note, for those of you who have the same use case as me, I eventually fixed this by just adding the following line to my cicd to just turn the code off
Obviously the location of your built site may vary!
Beta Was this translation helpful? Give feedback.
All reactions