addamsson
11/07/2020, 8:44 PM-modules.html
into the root directory of the resulting documentation instead of generating an index.html
file. How can I tell Dokka to create an index.html
instead? If I rename the file by hand it works, but I'd like to automate this.Big Chungus
11/07/2020, 10:18 PMaddamsson
11/08/2020, 7:56 AMMarcin Aman
11/09/2020, 10:37 AMindex.html
probably in next releaseaddamsson
11/09/2020, 9:07 PMaddamsson
11/09/2020, 9:08 PMaddamsson
11/09/2020, 9:09 PM@sample
works. I had to look into Kotlin in Action and piece it together to figure this out. Maybe the docs can be improved a bitaddamsson
11/09/2020, 9:09 PM@sample
so my sample cannot contain imports. my current workaround is that i add the imports as commentsaddamsson
11/09/2020, 9:09 PMaddamsson
11/09/2020, 9:09 PMMarcin Aman
11/10/2020, 8:38 AMpackage samples
import example.Clock
object Samples {
fun js() {
class SampleClock : Clock(10) {
override fun equals(other: Any?): Boolean = true
}
println("Hi, JS!")
}
}
And i get this import. Isn't it just hidden for you? (there is a plus icon on the top of the sample to expand it, they are present in the link you provided)
Also if you want a sample-specific imports you either need to create a file per sample or use your comment method.
As for the guide: it is in progress. Not only for the samples but for other dokka features as well.addamsson
11/10/2020, 8:55 AMaddamsson
11/10/2020, 8:55 AMsamples.from("src/commonMain/kotlin/org/hexworks/zircon/samples")
addamsson
11/10/2020, 8:56 AM@sample org.hexworks.zircon.samples.ComponentSamples.fragment
addamsson
11/10/2020, 8:56 AMobject ComponentSamples {
fun fragment() {
// import org.hexworks.cobalt.events.api.Subscription
// import org.hexworks.zircon.api.Components
// import org.hexworks.zircon.api.component.Fragment
// import org.hexworks.zircon.api.uievent.ComponentEventType
class ConfirmButton : Fragment {
override val root = Components.button()
.withText("Confirm")
.build()
fun onConfirm(fn: () -> Unit): Subscription {
return root.processComponentEvents(ComponentEventType.ACTIVATED) {
fn()
}
}
}
}
}
addamsson
11/10/2020, 8:56 AM@sample org.hexworks.zircon.samples.ComponentSamples
all I can see in the samples block is org.hexworks.zircon.samples.ComponentSamples
and no codeaddamsson
11/10/2020, 9:00 AMaddamsson
11/10/2020, 9:00 AMaddamsson
11/10/2020, 9:01 AMMarcin Aman
11/10/2020, 9:01 AMaddamsson
11/10/2020, 9:02 AMaddamsson
11/10/2020, 9:02 AMaddamsson
11/10/2020, 9:02 AMaddamsson
11/10/2020, 9:02 AMaddamsson
11/10/2020, 9:02 AMaddamsson
11/10/2020, 9:03 AMaddamsson
11/10/2020, 9:03 AMMarcin Aman
11/10/2020, 9:12 AMpluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
customAssets = listOf(file("<path to asset>"))
customStyleSheets = listOf(file("<path to custom stylesheet>"))
}
Adding a base plugin is required to resolve those types.
If you dont want to add this to your classpath you can just pase a json.
Relevant links:
https://kotlin.github.io/dokka/1.4.10.2/user_guide/gradle/usage/#applying-plugins
https://github.com/Kotlin/dokka/blob/master/docs/src/doc/docs/user_guide/base-specific/frontend.mdaddamsson
11/10/2020, 9:47 AMaddamsson
11/10/2020, 9:47 AMMarcin Aman
11/10/2020, 9:49 AMlogo-styles.css
with this one line:
#logo {
background-image: url('<https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg>');
/* other styles required to make your page pretty */
}
Depending on your logo size/personal preference you can tweak it lateraddamsson
11/10/2020, 10:27 AMgaetan
11/15/2020, 12:10 PMgaetan
11/15/2020, 12:10 PMgaetan
11/15/2020, 12:12 PMMarcin Aman
11/16/2020, 11:13 AM