I wonder what I’m doing wrong. I’ve started a new collection using the “website” starter. I added an Image Name field.
Image Name: <imagename>
And then attached an image to the posts. Should I expect to see the image displayed in Notenik? I seem to remember that was supposed to happen. The attached image name is displayed but not the image.
Next I modified the Post template to include the image slug.
<div>=$image-slug$=</div>
Then I ran the factory script and the web site was produced. The web page source code contains an empty DIV in the place I expected to see my image.
In your Collection settings, check to see that ‘Enable Local Image References’ is checked; this is not on by default. This should result in you seeing your images within Notenik.
To see the image in your output, you will probably need to add a copyfile command to your merge template, just above the reference to the image file.
This command causes a file to be copied from the location specified by the first operand, to the location specified by the second operand.
Note that this command is designed to be used with the Image Name field, so that an image file accompanying a note can be copied to an appropriate output folder, from which it will be referenced by an output web page.
Enable Local Image Reference does cause the image to be displayed in the collection. Nice.
The copyfile command has done it’s magic. The web site is full of images now.
@hbowie I have read and re-read the information about producing a web site and I struggle to understand it. Normally your writing is clear and explanatory. The instructions to output web content is tantalisingly opaque. The intention isn’t clear and I think it makes assumptions about prior knowledge.
It’s apparent that there are a lot of different pathways but it’s confusing.