Closed encodeering closed 1 year ago
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
Hi everyone! I see that the issue has a lot of upvotes, but is it still actual?
If we are talking about the dokkaHtml
task in non a multimodule scenario, then the structure in the latest release version looks like
build/
dokka/
hello-world/
styles/
…
style.css
images/
scripts/
index.html
Seems like a valid structure.
But I see that @gnarea still experiences a problem and moves assets in the module folder. What is the reason behind it? Isn't it possible to push the whole dokka
folder? Or is it some GitHub Pages limitation?
@atyrin I don't think the issue is still actual. I upvoted the issue when it was originally opened, but in my projects the latest version of Dokka no longer places the styles outside of the module directory.
I'm closing the issue since the problem is not actual anymore in the form as described in the top message. If you still experience similar troubles with the latest Dokka releases, please submit a new issue.
Hello,
would it be possible to provide a configuration for the style.css location?
Configuration
Generated directory structure by dokka 0.9.13
Would like to push the
javadoc/hello-world
directory to github pages.Thank you very much.