Re: Help publishing a website

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Dan Sharp wrote:

> I have puzzled with this off and on for a while, but I think I am going 
> to have to ask the experts now.  I am having trouble publishing my 
> website with aap.  It seems to build everything okay, but when I do a 
> publish, some directory names are being ignored, so most things are 
> getting dumped into the main directory instead of the specified 
> subdirectory.

I can reproduce the problem.  This actually doesn't look like you need
help from experts but that there is a bug.

> I have attached a representative sample of what I am doing.  I tried to 
> model my setup after what is in the documentation, but appear to have 
> missed something.  Basically, my main.aap does

If you remove the "all" targed from the child recipe then it works as
expected.  This means it has something to do with creating nodes for the
files in the "ftplugin" directory.

OK, this is the reason: The files in "ftplugin" are first used in a
dependency without a directory name, thus as "index.html".  Aap does
remember that the file is in the "ftplugin" directory, thus it's a
separate node from "index.html" in the top directory.  But the short
name is the one that's used for "%file%" in the publish attribute.
Since it was first used without the directory name, "%file%" is replaced
with "index.html" instead of "ftplugin/index.html".

How to solve this problem?  You apparently expected the name as it was
used for ":attr" to be used for "%file%".  Currently "%file%" isn't
expanded until the publish action is done.  Perhaps it should be done
when executing the ":attr" command?

The result is that it would make a difference between:

	subdir/main.aap:
		:attr {publish = $PUB/%file%} index.html

	main.aap:
		:attr {publish = $PUB/%file%} subdir/index.html

Even though "index.html" is the same file here and the value of the
attribute is the same, you do expect different results, right?

-- 
hundred-and-one symptoms of being an internet addict:
54. You start tilting your head sideways to smile. :-)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.