Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing code blocks on Html frontend documentation #2202

Closed
ikbalkaya opened this issue Oct 22, 2021 · 3 comments · Fixed by #2728
Closed

Missing code blocks on Html frontend documentation #2202

ikbalkaya opened this issue Oct 22, 2021 · 3 comments · Fixed by #2728
Labels
documentation An issue/PR related to Dokka's external or internal documentation
Milestone

Comments

@ikbalkaya
Copy link

ikbalkaya commented Oct 22, 2021

Describe the bug
Documentation does not point out any example or code block on how to set a footer for each HTML document. It says that it needs to happen on base plugin configuration but there is no code block or example that shows such a usage.

Expected behaviour
Document should clearly set an example on how to modify footer and/or other frontend properties

To Reproduce
Visit this link to see the issue yourself
https://kotlin.github.io/dokka/1.5.30/user_guide/base-specific/frontend/#modifying-footer

Dokka configuration
I'm trying to configure DokkaHtmlModule with an additional footer configuration using Android project level build gradle and module level build.gradles

Installation

  • Operating system: macOS
  • Build tool: Gradle v7.0.2
  • Dokka version: 1.4.32

Are you willing to provide a PR?
This issue is better to be tackled by someone who has knowledge of the plugin usage.

@AlexisRiksman-TomTom
Copy link

Good point, I also struggled a lot before finding this.
Our current implementation is:

subprojects {
    if ((isLibraryProject || isAndroidLibraryProject) {
        apply(plugin = "org.jetbrains.dokka")

        tasks.withType<DokkaTaskPartial>().configureEach {
            pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
                footerMessage = "Copyright © ..."
                separateInheritedMembers = true
            }
}

and:

tasks.dokkaHtmlMultiModule.configure {
    pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
        footerMessage = docsFooterMessage
        separateInheritedMembers = true
    }
}

Note:

  • The configuration must be done both for the subprojects (pages generated for packages, classes, etc.) and for the overall dokka multi-module task.
  • Property 'separateInheritedMembers' can also do with example code.

@ikbalkaya
Copy link
Author

ikbalkaya commented Oct 25, 2021

Thank you @AlexisRiksman-TomTom. That's really appreciated I'm trying to write an equivalent of this code on Groovy. I attempted

tasks.dokkaHtmlMultiModule.configure {
    pluginConfiguration {
        footerMessage = docsFooterMessage
        separateInheritedMembers = true
    }
}

I'm getting this error

This function has a reified type parameter and thus can only be inlined at compilation time, not called directly.
for pluginConfiguration function
and for the individual module configurations

tasks.withType(DokkaTaskPartial).configureEach {
    pluginConfiguration {
        footerMessage "Something something somethin"
        separateInheritedMembers = true
    }
}

I'm getting back this
Could not get unknown property 'DokkaTaskPartial' for project

I would really appreciate if you could provide any help on how to configure this on Groovy.

@AlexisRiksman-TomTom
Copy link

AlexisRiksman-TomTom commented Oct 25, 2021

You should include the class names when using template pluginConfiguration<DokkaBase, DokkaBaseConfiguration>.
Also don't forget the import statements for these classes.

As for Groovy, I cannot help you there as we do everything in Kotlin.

@yalishevant yalishevant added this to the Stable milestone Mar 24, 2022
@yalishevant yalishevant added documentation An issue/PR related to Dokka's external or internal documentation and removed bug labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An issue/PR related to Dokka's external or internal documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants