[SOLVED] How to display Sections in alphabetical order?

Hi there

I am trying to list off my directories in content alphabetically. My structure is:

_index.md
-- ico
   - _index.md
-- img
   - _index.md
-- src
   - _index.md

I am currently using:

{{range .Site.Sections }}
<div class="col-sm-2 mr-2">
    <p>{{  .Params.Menutext }}</p>
</div>
{{ end }}

The result is:

<p>Icons</p>
<p>Sources</p>
<p>Images</p>

It seems to be putting the newer created items first.

Can someone please help me solve this? Much appreciated.

Can you try {{range .Site.Sections.ByTitle }}

That seems to have done it for what it there. I will test it further when I add more content and have a much wider range of data to test with but it does appear to be the solution.

Thanks :slight_smile: