kordamp / markdown-gradle-plugin

Markdown/HTML plugin for gradle
Apache License 2.0
71 stars 51 forks source link

Way to include your styles in output html #4

Open KonradCinal opened 10 years ago

KonradCinal commented 10 years ago

Hi,

I like your plugin and want to use it to generate html from my markdown files but I don't se possibility of including my css styles inside generated output html. Do you know if it is possible with this plugin or pegdown alone ? If yes how I can do it ?

Thank you in advance

lenzenc commented 9 years ago

It would be nice if this could be built in but in reality this plugin is just a wrapper around pegdown so you could spin your own like this example;

https://github.com/coders-kitchen/tut-releaseNotesFromTags/blob/master/build.gradle

The key here is the wrapping of MD output in a Groovy template (html that includes any styling);

def template = engine.createTemplate(new File("releaseNotes.tpl"))
thom-nic commented 9 years ago

I was wondering this too. The example linked by @lenzenc looks pretty straightforward but it's not clear how to integrate that with this plugin. Would be nice to get a callback with the output from each file that markdownToHtml processes, then post-process it through my own template wrapper. Or do I basically have to use pegdown directly and not use this plugin at all?

lenzenc commented 9 years ago

After looking at the source code a bit I just decided to add a simple wrapper plugin around peg down to my project that wrapping template.

If I find time I was hoping to do a pull request.

cleankod commented 8 years ago

@lenzenc Looking forward to that! :smile:

jsonify commented 5 years ago

After looking at the source code a bit I just decided to add a simple wrapper plugin around peg down to my project that wrapping template.

If I find time I was hoping to do a pull request.

@lenzenc Were you ever able to do a pull request for this?