Hello,
would it be possible to provide a configuration for the style.css location?
Configuration
moduleName = "hello-world"
outputDirectory = "build/javadoc"
outputFormat = "html"
Generated directory structure by dokka 0.9.13
build/
javadoc/
hello-world/
index.html
...
style.css
Would like to push the javadoc/hello-world directory to github pages.
Thank you very much.
I am facing the same problem, because I want to use dokka documentation in pages. This would help a lot and I presume that this is not too much work 馃槃
+1
I'm having the same problem. The directory structure is very odd for single-module projects.
Same issue here.
Same issue..
My solution for gitlab pages (replace your_module):
image: java:8-jdk
stages:
- dokka
- deploy
javadoc:
stage: dokka
script:
- ./gradlew dokka -i
artifacts:
paths:
- public
pages:
stage: deploy
script:
- cp -R public/your_module/. public/
- for line in $(find ./public -name '*.html'); do sed -i 's/..\/style.css/style.css/g' ${line##* .}; done
artifacts:
paths:
- public
only:
- master
Yeah, +1 on this issue!
Or at the very least implement #394
- for line in $(find ./public -name '.html'); do sed -i 's/..\/style.css/style.css/g' ${line## .}; done
I get this can be a workaround, but it doesn't work 馃槩
Workaround for anyone using GitHub Actions + GitHub Pages:
- name: Move Dokka's stylesheet
run: |
set -x -o nounset -o errexit -o pipefail
cd ./build/javadoc
mv ./style.css ./THE-NAME-OF-YOUR-MODULE/
find . -name '*.html' -print0 | xargs -0 sed -i 's;../style.css;style.css;g'
I've added it as snippet for fixing it manually in case you want to run it on jenkins or the likes https://gist.github.com/kibotu/78f6f65497eef81222ca3fb9b785e38d
I've just upgraded to v1 and I'm having to use a more complex workaround because it isn't just the style.css that's outside the module directory, but lots of assets now. Here's what I'm doing with GitHub Actions + GitHub pages:
- name: Move Dokka's assets
run: |
set -x -o nounset -o errexit -o pipefail
cd ./build/dokka/html
mv ./styles ./images ./scripts navigation.html ./THE-NAME-OF-YOUR-MODULE/
find ./poweb/ -name '*.html' -print0 | xargs -0 sed -i 's;../styles/;styles/;g'
find ./poweb/ -name '*.html' -print0 | xargs -0 sed -i 's;../images/;images/;g'
find ./poweb/ -name '*.html' -print0 | xargs -0 sed -i 's;../scripts/;scripts/;g'
find ./poweb/ -name '*.html' -print0 | xargs -0 sed -i 's;pathToRoot = "../;pathToRoot = ";g'
sed -i 's;href="poweb/;href=";g' ./poweb/navigation.html
Most helpful comment
Same issue..
My solution for gitlab pages (replace your_module):