if you keep all your posts in the post folder, there’s an easy solution.
{% set post_section = get_section(path="post/_index.md") %}
{% for post in post_section.pages %}
<div><a href="{{post.permalink}}">{{post.title}}</a></div>
{% endfor %}
the get_section function gets a section object. You can use that to retrieve all pages direct in the post folder.
Also have a look at the functions available in tera, that’s the template engine used by zola, You can use these to apply filter to the section.pages list and only print those that you want on your homepage.
Yes there is a way to do this without hardcoding the section.
You were almost at the right solution.
When you look at the code here:
{% set post_section = get_section(path=config.extra.featureSection ~ "/_index.md") %}
{% for post in post_section.pages %}
<div><a href="{{post.permalink}}">{{post.title}}</a></div>
{% endfor %}
You don’t need the braces {{config.extra.featureSection}}, because you are already inside a block using {% %} style braces.
The second change is that you need to concatenate the string value using the ~ operator. That’s the way strings are concatenated in the tera template engine.