I’m trying to deploy Dokka docs to Netlify following this guide, but the css files are in another directory
The guy has created a new Gradle task to move them inside the same directory, updating all the references
I’d like to avoid polluting my build.gradle.kts if possible and address the problem from another point of view: is it possible to deploy multiple directories at the same level?
We can only deploy a single directory. You’ll need to ensure that all files are in that directory SOMEHOW. Definitely doesn’t need anything to do with gradle; you can copy around using whatever commands you want, such as command line or other programmatic methods.
Perhaps you can put BOTH of them into some other top level directory that you can tell netlify is your publish directory?
Yup, if you proxy your html, you will need either to adjust the paths you use to load the css (if you use relative paths anyway - if you use absolute paths like /html/styles/styles.css, this shouldn’t matter)… or let us do that for you. To accomplish the latter, I might make a redirect to handle it. From your example, perhaps this would work?
[[redirects]]
from = "/index.html"
to = "/build/dokka/html/kotlin-unsigned/index.html"
status = 200
[[redirects]]
from = "/images/*"
to = "/build/dokka/html/images/:splat"
status = 200
# force = true
[[redirects]]
from = "/scripts/*"
to = "/build/dokka/html/scripts/:splat"
status = 200
# force = true
[[redirects]]
from = "/styles/*"
to = "/build/dokka/html/styles/:splat"
status = 200
# force = true
Hi, @elect86, the index.html. I do see the 301 redirect working currently and I replied about this as well here:
Since we are talking about the same site and same set of redirect rules, I’m recommend we only do so there for now to keep all comments in one place. Please follow-up there if there are other questions about this.