vsch / markdown-page-generator-plugin

Markdown to HTML Page Generator Maven Plugin
MIT License
4 stars 1 forks source link

add feature: copy files recursively #2

Closed Rhiath closed 7 years ago

Rhiath commented 7 years ago

Due to the size of our documentation (and also to achieve a defined scope within a file), we have multiple pages. We want the image files of the pages to be placed in a separate subfolders to achieve separation of concerns. If possible we want the images to be placed in a folder next to the individual page, thus avoiding that all images of all pages are located in one folder.

For the actual pages, we are able to define "process all pages" using the "recursiveInput" configuration value; for copied files there does not seem to be an equivalent feature. Wildcards do not seem to be supported in the "copyDirectories" and we would like to avoid specifying every folder that contains our image resources.

We are looking towards having a folder structure like the one below, whilst only having to say "process all pages and copy all the image folders, whereever they are located in to markdown folder":

I think that supporting one of the following would be sufficient to enable what I am trying to achieve:

vsch commented 7 years ago

@Rhiath, my knowledge of maven plugins is less than limited. I only replaced pegdown parser with flexmark-java library.

If you or anyone else is RWA to add this feature with corresponding tests I will merge it into the repo.

Rhiath commented 7 years ago

Hi, I will give it a try and provide you with a push notification when I think I am done.

vsch commented 7 years ago

Thank you.

Rhiath commented 7 years ago

I created a pull request. It builds locally, all added tests pass and the test coverage of new code should be sufficient.

I had to disable some build items temporarily (like GPG signing the JAR), I hope that I reverted all temporary changes correctly. Could you check if the resulting code works on your end?

vsch commented 7 years ago

@Rhiath, thank you. I will merge the changes and make a new release.

vsch commented 7 years ago

@Rhiath, PR merged. Repo updated. Maven released.

Rhiath commented 7 years ago

I tried out the new version today and it worked like a charm!