Docs: weight ties sort sections in random order (#1492)

This commit is contained in:
Avinash Sonawane 2021-05-26 14:34:39 +00:00 committed by GitHub
parent 4f023d8c70
commit 6a84f1b4b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -189,4 +189,4 @@ equally weighted sections. Thus, if the `weight` variable for your section is no
is set in a way that produces ties), then your sections will be sorted in
**random** order. Moreover, that order is determined at build time and will
change with each site rebuild. Thus, if there is any chance that you will
iterate over your sections, you should always assign them a weight.
iterate over your sections, you should always assign them distinct weights.

View file

@ -85,7 +85,7 @@ extra: HashMap<String, Any>;
// date and weight, respectively.
pages: Array<Page>;
// Direct subsections to this section, sorted by subsections weight
// This only contains the path to use in the `get_section` Tera function to get
// This only contains the path to use in the `get_section` built-in function to get
// the actual section object if you need it
subsections: Array<String>;
toc: Array<Header>,