> Here's the test repo:
> 
> https://github.com/ptahchiev/maven-velocity-macro

Cloned and tested. Upgrade to MSITE 3.5.1 and your pain will go away. 
#parse/#include
has been resolved with DOXIASITETOOLS 1.7.1/MSITE 3.5.1.

Michael

> 2016-04-20 8:57 GMT+02:00 Petar Tahchiev <paranoia...@gmail.com>:
> 
> > Ok,
> >
> > here's what I've tried:
> >    = NOMACRO: I create a file properties.vm, right next to my
> > index.adoc.vm and inside it I put
> >
> >       #set($a = "Petar")
> >       $a
> >
> >       then inside my index.adoc.vm I put
> >       #parse("properties.vm")
> >
> >       [ERROR] Max recursion depth reached (10) File stack: >
> > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm
> >
> >    = MACRO: again I create properties.vm right next to my index.adoc.vm
> > and inside it I put
> >
> >       #macro( petar )
> >           Petar
> >       #end
> >
> >        then inside the index.adoc.vm I put:
> >
> >      #parse("properties.vm")
> >      #petar()
> >
> > and I get
> >
> > [ERROR] Max recursion depth reached (10) File stack: >
> > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm
> >
> >      = MACRO IN THEME: I put properties.vm right next to site.vm in my
> > theme and I reference it from index.adov.vm with #parse("properties.vm")
> > and maven does not find the file.
> >
> >
> >
> >
> > I'll try to make a test project.
> >
> >
> >
> > 2016-04-20 8:42 GMT+02:00 Michael Osipov <micha...@apache.org>:
> >
> >> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
> >>
> >>> Hi Michael,
> >>>
> >>> I had a chat with Herve last night, and he mentioned this is actually not
> >>> possible. If one wants to use velocity macros one must put it in the site
> >>> (if you put them in your theme it will not work). Which is a shame, as I
> >>> have a project with 50 submodules and each module requires #myMacro()
> >>> just
> >>> once, so I was hoping to have it declared once in the site.vm in the
> >>> theme,
> >>> and then use it in each of those modules.
> >>>
> >>
> >> Seriously? We now have #parse() support. That should actually parse your
> >> subtemplate and make the macro available. Have you tried that? Templates
> >> which are not skins are deprecated though and have limited support. They
> >> will be removed in 2.0.
> >>
> >> Michael
> >>
> >>
> >> 2016-04-20 8:31 GMT+02:00 Michael Osipov <micha...@apache.org>:
> >>>
> >>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
> >>>>
> >>>> Hello,
> >>>>>
> >>>>> I'm asking this question here, as I don't really see the answer in the
> >>>>> documentation or anywhere else on the internet. If you have a website
> >>>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro
> >>>>> in
> >>>>> it:
> >>>>>
> >>>>> # myMacro()
> >>>>>
> >>>>>
> >>>>> I know doxia will process the velocity and it works fine, but will it
> >>>>> also
> >>>>> process the macro? I doesn't work for me, and I'm not sure if it is
> >>>>> implemented at all. I'm trying to debug it now, but I can't seem to
> >>>>> find
> >>>>> any setting regarding this.
> >>>>>
> >>>>>
> >>>> Hervé and me have been working at Doxia and the rest lately a lot. Do
> >>>> you
> >>>> think you could create a sample project for that? I would take a look
> >>>> at it.
> >>>>
> >>>> Michael
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >>>> For additional commands, e-mail: dev-h...@maven.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: dev-h...@maven.apache.org
> >>
> >>
> >
> >
> > --
> > Regards, Petar!
> > Karlovo, Bulgaria.
> > ---
> > Public PGP Key at:
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> >
> 
> 
> 
> -- 
> Regards, Petar!
> Karlovo, Bulgaria.
> ---
> Public PGP Key at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to