I am still learning and thanks to the people here who have been helping me understand and even help me out when I am stuck.
So here is another problem that I am trying to figure out -
So here is what I am trying to do -
I have a folder under content called fruits. This folder has files like apple.md, banana.md - basically fruitname.md for the 50 odd files I have here.
The following is the front-matter that I have - example from my apple.md file
usage_name: "Apple" scientific_name: "Malus pumila, Malus domestica, Malus sylvestris, Malus communis, Pyrus malus" taste: ["sweet", "sour", "savoury"] color: ["red", "green"] pics: "fruits"
Now my question is that I am trying to create a page with this kind of URL -
/fruit-info/usage_name and basically what I plan to do is - display an image of the fruit (brought in from the Parameter pics (on my front-matter), Name of the Fruit and then display a generic static set of text - which would be something like - this is a fruit and it is healthy for us (a paragraph of such static text).
As this text is almost static, I did not feel it would be good to increase the byte-size by including it on every fruit’s md file.
So here is how I would ideally like it to be - for example the apple -
URL: localhost:1313/fruit-info/apple Fruit Name: apple Image of Apple (brought in from /static/images folder) A paragraph of static text
Here is what I tried -
I first created a folder fruit-info under layouts and then created a single.html inside it. But as expected, it failed - just because there is no fruit-info folder with its md files in /content.
Then, I tried placing the fruit-info.html into static but then I realized that static is not the right place - as it is for files that do not change their content like CSS, JS images etc.
So my question is - Is it doable? And if so, where do I place this file on my goHugo setup and how can I get this to work.