Michael Franzl
2012-Aug-27 12:14 UTC
[webgen-users] Sources configuration for a subdirectory
In the file src/index.page, I want to include an image like this:
![test][test.jpg]
However, the image resides under
src/images
For compatibility reasons with another program, I don''t want to specify
the path like this:
![test][images/test.jpg]
So I configured webgen in config.yaml like this:
sources:
- ["/", "Webgen::Source::FileSystem",
"src"]
- ["/", "Webgen::Source::FileSystem",
"src/images", "*.jpg"]
This works fine. However, when I try to do the same concept 1
subdirectory deeper, it does not work. In a file src/subdir/index.page I
want to include an image like this:
![test][test.jpg]
The image resides under
src/subdir/images
The configuration that does not work is:
sources:
- ["/", "Webgen::Source::FileSystem",
"src"]
- ["/", "Webgen::Source::FileSystem",
"src/subdir/images", "*.jpg"]
The error message is:
ERROR -- Could not resolve path ''test.jpg'' in
</subdir/index.en.html>
Any hints?
Michael
Thomas Leitner
2012-Aug-27 18:14 UTC
[webgen-users] Sources configuration for a subdirectory
On 2012-08-27 14:14 +0200 Michael Franzl wrote:> This works fine. However, when I try to do the same concept 1 > subdirectory deeper, it does not work. In a file > src/subdir/index.page I want to include an image like this: > > ![test][test.jpg] > > The image resides under > > src/subdir/images > > The configuration that does not work is: > > sources: > - ["/", "Webgen::Source::FileSystem", "src"] > - ["/", "Webgen::Source::FileSystem", "src/subdir/images", "*.jpg"] > > The error message is: > > ERROR -- Could not resolve path ''test.jpg'' in > </subdir/index.en.html>The second sources line needs to be: - ["/subdir/", "Webgen::Source::FileSystem", "src/subdir/images", "*.jpg"] Best regards, Thomas