[ 
https://issues.apache.org/jira/browse/DOXIA-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642971#comment-17642971
 ] 

Herve Boutemy edited comment on DOXIA-677 at 12/4/22 10:28 AM:
---------------------------------------------------------------

I don't really get what macro you want to introduce, that will do what

but FYI, I lately had a discussion with Mybatis Spring project who wanted 
exactly that: easy {{${project.version}}} replacement in their site

I proposed an approach based on Velocity (= "replace {{##}} with {{#[[##]]#}}, 
{{###}} with {{#[[###]]#}}, ..." ) that they did not like, giving a very good 
reason = "I prefer to use .md file instead of .vm file cannot render on GitHub 
UI." (see https://github.com/mybatis/spring/pull/759 for full discussion)

then I proposed an approach using maven-resources-plugin to do the filtering: 
https://github.com/mybatis/spring/pull/763

notice that the Velocity approach is already documented, even if (as usual) 
it's not easy to find: 
https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html#common-issues-and-workarounds


was (Author: hboutemy):
I don't really get what macro you want to introduce, that will do what

but FYI, I lately had a discussion with Mybatis Spring project who wanted 
exactly that: easy ${project.version} replacement in their site

I proposed an approach based on Velocity (= "replace ## with #[[##]]#, ### with 
#[[###]]#, ..." ) that they did not like, giving a very good reason = "I prefer 
to use .md file instead of .vm file cannot render on GitHub UI." (see 
https://github.com/mybatis/spring/pull/759 for full discussion)

then I proposed an approach using maven-resources-plugin to do the filtering: 
https://github.com/mybatis/spring/pull/763

notice that the Velocity approach is already documented, even if (as usual) 
it's not easy to find: 
https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html#common-issues-and-workarounds

> Macro for printing project properties
> -------------------------------------
>
>                 Key: DOXIA-677
>                 URL: https://issues.apache.org/jira/browse/DOXIA-677
>             Project: Maven Doxia
>          Issue Type: New Feature
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>
> Many time we use Velocity only for resolving project properties like:
> {code}
> ${project.version}
> {code}
> Another case is that for Markdown we have conflicts
> Velocity uses # as a prefix for macros and ## as a prefix for comments
> but in Markdown those are used for headers
> So Doxia macro will be useful is such cases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to