Adam S
02/04/2023, 6:26 PMPathToRootSubstitutionCommand
comments, but the ###
substitution isn’t triggered
<!--[+]cmd:{"@class":"org.jetbrains.dokka.base.templating.PathToRootSubstitutionCommand","pattern":"###","default":""}--> <link href="###images/logo-icon.svg" rel="icon" type="image/svg">
I also see in the Dokka logs that some of the ‘extension points’ aren’t working
Unused extension points found: ExtensionPoint: org.jetbrains.dokka.base.DokkaBase/externalClasslikesTranslator, ExtensionPoint: org.jetbrains.dokka.base.DokkaBase/externalDocumentablesProvider, ExtensionPoint: org.jetbrains.dokka.base.DokkaBase/immediateHtmlCommandConsumer
I’ll put the full JSON config that’s being used to trigger the Dokka Generator in the thread - is it missing something?Adam S
02/04/2023, 6:28 PMAdam S
02/04/2023, 6:28 PM.
├── my-project/
│ ├── subproject-hello/
│ │ └── build.gradle.kts
│ └── subproject-goodbye/
│ └── build.gradle.kts
├── setttings.gradle.kts
└── build.gradle.kts
Adam S
02/04/2023, 6:29 PMstyles
dir…)Adam S
02/04/2023, 6:30 PMdokka-core-1.7.20.jar
markdown-jvm-0.3.1.jar
dokka-analysis-1.7.20.jar
kotlin-analysis-intellij-1.7.20.jar
dokka-base-1.7.20.jar
kotlin-analysis-compiler-1.7.20.jar
kotlinx-html-jvm-0.8.0.jar
freemarker-2.3.31.jar
jackson-dataformat-xml-2.12.7.jar
jackson-module-jaxb-annotations-2.12.7.jar
jackson-databind-2.12.7.jar
jackson-annotations-2.12.7.jar
jackson-core-2.12.7.jar
jackson-module-kotlin-2.12.7.jar
kotlin-reflect-1.7.20.jar
jsoup-1.14.3.jar
kotlinx-coroutines-core-jvm-1.6.3.jar
kotlin-stdlib-jdk8-1.7.20.jar
kotlin-stdlib-jdk7-1.7.20.jar
kotlin-stdlib-1.7.20.jar
kotlin-stdlib-common-1.7.20.jar
woodstox-core-6.2.4.jar
stax2-api-4.2.1.jar
annotations-13.0.jar
jakarta.xml.bind-api-2.3.2.jar
jakarta.activation-api-1.2.1.jar
Adam S
02/04/2023, 6:38 PMindex.html
doesn’t have any stylingIgnat Beresnev
02/04/2023, 10:38 PMI’m working on the Dokka Gradle Plugin refactorHi! Is it for #2839? I described in more detail how HTML documentation should be generated for multimodule projects here: https://github.com/Kotlin/dokka/issues/2770#issuecomment-1347673833 If you read it, I'm sure it'll clear some things up. TLDR: You need to run each module separately with
delayTemplateSubstitution = true
, and then in the last multi-module task apply the templating
and all-modules-page
plugins, and pass all modules into the DokkaConfiguration#modules
option.
(sorry if you've done that already in the json config, can't go over it at the moment)Adam S
02/04/2023, 10:41 PMHi! Is it for #2839?yes that’s right
Adam S
02/04/2023, 10:42 PMAdam S
02/04/2023, 10:42 PMAdam S
02/04/2023, 10:43 PMIgnat Beresnev
02/04/2023, 10:43 PMAdam S
02/04/2023, 10:45 PMsrc/main/kotlin
,
• and subproject-alpha/src/main/kotlin
,
• and subproject-beta/src/main/kotlin
Ignat Beresnev
02/04/2023, 10:55 PMAdam S
02/04/2023, 11:02 PMAdam S
02/04/2023, 11:02 PMdelayTemplateSubstitution
set to true
for some reasonAdam S
02/04/2023, 11:05 PMAdam S
02/04/2023, 11:08 PMdokka-configuration.json
, that at minimum contains its own sources, e.g. src/main/kotlin
• subprojects can depend on other subprojects
dependencies {
dokka(project(":some:subproject"))
}
• by default, dokka-configuration.json
files from other subprojects will be merged into this project’s dokka-configuration.json
(which was already the case in one of current subprojects tasks)
• and then the Dokka Generator only runs onceAdam S
02/04/2023, 11:11 PMdependencies {
dokkaModule(project(":some:subproject"))
}
this will trigger a Dokka Generator in :some:subproject
, and produce a Dokka HTML site in ./some/subproject/build/dokka-output
- which the consuming project can then receive and merge into its dokka-configuration.json
, and pass that along to Dokka Generator (so Dokka Generator will run twice)Ignat Beresnev
02/04/2023, 11:35 PMdelayTemplateSubstitution
is set to true. These runs would use the single-module generator, but delay resolving some links (the commands you saw).
In the end, once all child modules have their "partial" documentation generated (with the commands), Dokka is run once again with the all-modules-page
plugin (unites all modules into a single website) and the templating
plugin (resolves unresolved links/commands relative to the single resulting documentation)
I'm not sure what you're proposing would work, but I don't have much information to tell right now
If you want, I'd be down to have a call where I can explain the inner workings in more detail, and maybe answer some of your questions. I can do it in text, it'll just take longer, and this part isn't documented anywhere 😞Adam S
02/05/2023, 10:50 AMAdam S
02/09/2023, 8:40 AM./gradlew dokkaGenerateHtml
2. Get Dokka parameters from build.gradle
3. Create the Dokka JSON parameters (used to execute Dokka Generator) ./build/dokka-config/html/dokka-params.json
4. Produce a Dokka Module into ./build/dokka/html-module/
by executing Dokka Generator using dokka-params.json
, BUT without all-modules-page
and templating
5. Create the final Dokka HTML Publication into ./build/dokka/html
by running Dokka Generator again WITH all-modules-page
and templating
Adam S
02/09/2023, 8:41 AM