Is it possible to provide your own renderer extens...
# dokka
s
Is it possible to provide your own renderer extension for Jekyll? I couldn’t figure out how to provide my renderer to
dokkaJekyllPlugin
.
b
Yep, my team is doing it like so:
Copy code
class TargetDokkaGfmPlugin : DokkaPlugin() {

  val renderer by extending {
    (
      CoreExtensions.renderer
        providing { TargetGfmRenderer(it) }
        override plugin<GfmPlugin>().renderer
      )
  }
}

class TargetGfmRenderer(
  context: DokkaContext
) : CommonmarkRenderer(context) {
  // Custom rendering here
}
s
How do you link it to the gfm plugin from Gradle?
That’s pretty much what I have already. I’m missing the part how you set it up in Gradle
Oh I see, I think I had to do
override plugin<JekyllPlugin>().renderer
☝️ 1
b
I believe the only thing we need to do was apply this in each module with Dokka enabled:
Copy code
dependencies {
  dokkaPlugin(project(":your-dokka-gfm-module"))
}
👍 1
s
Thanks, going to give that another try
@Bryan Herbst thank you!! this seems to be working
🎉 1
Awesome 🙌