Back to Hugo

Sites Collection

docs/content/en/_common/functions/hugo/sites-collection.md

0.163.3500 B
Original Source

The returned collection follows a hierarchical sort where each subsequent dimension acts as a tie-breaker for the one above it.

  1. Language is sorted by weight in ascending order, falling back to lexicographical order if weights are tied or undefined.
  2. Version is then sorted by weight in ascending order, with Hugo defaulting to a descending semantic sort for any ties.
  3. Role is finally sorted by weight in ascending order, using lexicographical order as the final fallback.