File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
grails-docs/src/main/groovy/grails/doc Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,14 @@ class DocPublisher {
306306 sourceRepo : sourceRepo,
307307 ]
308308
309+ if (engine instanceof AsciiDocEngine ) {
310+ // pass attributes to asciidoc
311+ ((AsciiDocEngine )engine). attributes. putAll(
312+ version : version
313+ )
314+ }
315+
316+
309317 // Build the user guide sections first.
310318 def template = templateEngine. createTemplate(new File (" ${ docResources} /style/guideItem.html" ). newReader(encoding))
311319 def sectionTemplate = templateEngine. createTemplate(new File (" ${ docResources} /style/section.html" ). newReader(encoding))
Original file line number Diff line number Diff line change @@ -14,16 +14,18 @@ import org.asciidoctor.Asciidoctor;
1414@InheritConstructors
1515class AsciiDocEngine extends DocEngine {
1616 Asciidoctor asciidoctor = create();
17-
17+ Map attributes = [
18+ ' imagesdir' : ' ../img' ,
19+ ' source-highlighter' :' coderay' ,
20+ ' icons' :' font'
21+ ]
1822 @Override
1923 String render (String content , RenderContext context ) {
2024 asciidoctor. convert(content,
2125 new OptionsBuilder ()
2226 .headerFooter(false )
2327 .attributes(
24- ' imagesdir' : ' ../img' ,
25- ' source-highlighter' :' coderay' ,
26- ' icons' :' font'
28+ attributes
2729 )
2830 .get()
2931 )
You can’t perform that action at this time.
0 commit comments