You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to build an extension to render "gherkin"-files my-feature.feature into HTML. The idea behind this is the use some of the feature-files as documentation. First and foremost I would like to use the extension to generate the documentation for aruba and some internal gems I use at work.
Since v4.x you cannot render files into HTML which does not contain .html.format in their file names. I don't want to force users to write my-feature.html.feature files, but would like to use .feature instead. In some other issue the problem with the "missing" .html-extension was already discussed. You mentioned something about hardcoding values.
Would be possible for an extension, to tell the renderer that the result is always HTML even if the .html-part is missing.
This question is more about your experience in writing middleman-extensions: How would you implement the parser/HTML-generator. I have not decided yet how to do this. One idea is to implement it as tilt-gem, but since it requires another renderer, e.g. ERB, I'm not sure if this is the best way to go. At best I would like to leave the choice to the user which template language to use for converting feature files. This should be possible, but is there a middleman helper I can use in the extension?
Thanks a lot.
Cheers
Dennis
The text was updated successfully, but these errors were encountered:
I would create a custom Resource type and have the extension replace any resource that is a .gerkin with a GerkinResource. That class would then have it's own render method to do whatever it wants and can set the destination_path to include .html
Hi @tdreyno,
I would like to build an extension to render "gherkin"-files
my-feature.feature
into HTML. The idea behind this is the use some of the feature-files as documentation. First and foremost I would like to use the extension to generate the documentation foraruba
and some internal gems I use at work.The result should be something similar to http://www.relishapp.com/cucumber/aruba/v/0-11-0 but more integrated into the project's website.
The extension should have some configuration options settable via
config.rb
.Since v4.x you cannot render files into HTML which does not contain
.html.format
in their file names. I don't want to force users to writemy-feature.html.feature
files, but would like to use.feature
instead. In some other issue the problem with the "missing".html
-extension was already discussed. You mentioned something about hardcoding values.Would be possible for an extension, to tell the renderer that the result is always HTML even if the
.html
-part is missing.This question is more about your experience in writing
middleman
-extensions: How would you implement the parser/HTML-generator. I have not decided yet how to do this. One idea is to implement it astilt
-gem, but since it requires another renderer, e.g.ERB
, I'm not sure if this is the best way to go. At best I would like to leave the choice to the user which template language to use for converting feature files. This should be possible, but is there amiddleman
helper I can use in the extension?Thanks a lot.
Cheers
Dennis
The text was updated successfully, but these errors were encountered: