Kallin Nagelberg wrote:
Oh, I thought when you said:


2. If I don't put that snippet on the first line of the file then it is
treated as text and not interpreted.

IMO that's the expected behavior (even though I don't see where it's
documented right now), as otherwise it would not be possible to
distinguish macros from anchors in apt files.


you meant that the snippet would only work on the first line.


I meant the snippet must not be indented, there should be no spaces before the %. See the example document I linked below, which is the source of http://maven.apache.org/doxia/book/index.html .





On Feb 4, 2008 10:52 AM, Lukas Theussl <[EMAIL PROTECTED]> wrote:


You can have as many as you want if you distinguish them with a unique
id, see an example here:


http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/book/index.apt?revision=574085&view=markup

HTH,
-Lukas


Kallin Nagelberg wrote:

Ok thanks for all the help.

So, currently, it's impossible to have multiple includes throughout an

apt

file?

On Feb 4, 2008 10:27 AM, Lukas Theussl <[EMAIL PROTECTED]> wrote:



Kallin Nagelberg wrote:


I found out that configuring the dependency wasn't enough. I had to
explicitly indicate to use the latest site plugin in a plugin tag.

That being said, there are still some issues:

1. Nothing is actually included. There is just an empty div. when I

use:

%{snippet|id=myid|file=src/main/resources/help/basichelp.txt}
There definitely is a file at src/main/resources/help/basichelp.txt

with

some content.

And this file contains "START SNIPPET: myid" and "END SNIPPET: myid" as
demarcators of the snippet you want to include? See
http://maven.apache.org/doxia/macros/index.html



2. If I don't put that snippet on the first line of the file then it is
treated as text and not interpreted.

IMO that's the expected behavior (even though I don't see where it's
documented right now), as otherwise it would not be possible to
distinguish macros from anchors in apt files.

HTH,
-Lukas



On Feb 4, 2008 9:49 AM, Lukas Theussl <[EMAIL PROTECTED]> wrote:




Please attach a small test project to jira
(http://jira.codehaus.org/browse/DOXIA), it works for me. Just to be
sure: the macro line is not indented in your apt source, right? (that
would explain why the line is interpreted as an anchor).

-Lukas


Kallin Nagelberg wrote:



Ok, so I added a dependency to site plugin 2.0-beta-6 and now i can

use

the



file parameter like you suggested.

However, the generated html is not including the file like I expect.

Instead



it is doing the following:

%<a

name="snippet|id=myid|file=src/main/resources/help/basichelp.txt">snippet|id=myid|file=src/main/resources/help/basichelp.txt</a>

given the apt:

%{snippet|id=myid|file=src/main/resources/help/basichelp.txt}




On Feb 4, 2008 8:55 AM, Lukas Theussl <[EMAIL PROTECTED]> wrote:





Which doxia version are you using? The file parameter was added in
doxia-1.0-alpha-9 (ie site-plugin 2.0-beta-6).

-Lukas


Kallin Nagelberg wrote:




Thanks Lukas,

You know I tried that, but I keep getting the error that 'url' is a

required




parameters :S


On Feb 4, 2008 5:32 AM, Lukas Theussl <[EMAIL PROTECTED]> wrote:






Use the file parameter instead of url, eg:

%{snippet|id=myid|file=src/main/resources/help/basichelp.txt}

HTH,
-Lukas


Kallin Nagelberg wrote:





Hi Everyone,

I've been tasked with creating some .apt documentation for a new

maven



built





project. Ideally, I'd like to have a lot of the site

documentation

come



from





files in my src/main/resources directory.

I've read about using the snippet macro, but I can't get it to

access


the





artifacts resources.

I've tried something like this but it doesn't work:

%{snippet|id=myid|url=file:///./src/main/resources/help/basichelp.txt}

Any ideas would be appreciated!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to