Bookshelves

Sorry if this is not the best place for feedback, but here’s another thing that came up:

Because the data in .Site.Data.bookshelves has the shelf name as the key inside of the map, I can’t sort it (see this post-- sorting results in key elimination.

I’d like to be able to sort on shelf name, so would it be possible to have the data structure changed a bit so that the shelf name was accessible for each element in the map?

To give you a sense of what I’m working on, I basically want to create this page, ordered and with “formatted” names with Currently Reading on top and each year below. I’ve gotten pretty close with this template:

{{- range $shelf, $bookshelf :=  $.Site.Data.bookshelves  }}

{{ if ne $shelf "finishedreading" }}
  <h2 class="bookshelf-name">{{ $shelf }}</h2>
  <div class="bookshelf">
    {{- range $bookshelf }}
  <a href="https://bookshop.org/a/{{ $.Site.Params.bookshop_affiliate_id }}/{{ .isbn }}">
<figure>
 <img 
      class="bookshelf-book-cover"
      src="{{ .cover_url }}"
      alt="{{ .title }} by {{ .author }}"
      width="150"/>
    <figcaption> {{ .title }} by {{ .author }}</figcaption>
</figure></a>
{{ end }}
</div>
{{ end }}
{{ end }}

and I’m just thinking through how I’m going to format the shelf names and get the order to my liking.