mirror of
https://github.com/getzola/zola
synced 2024-12-13 13:52:28 +00:00
Docs: weight ties sort sections in random order (#1492)
This commit is contained in:
parent
4f023d8c70
commit
6a84f1b4b8
2 changed files with 2 additions and 2 deletions
|
@ -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
|
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
|
**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
|
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.
|
||||||
|
|
|
@ -85,7 +85,7 @@ extra: HashMap<String, Any>;
|
||||||
// date and weight, respectively.
|
// date and weight, respectively.
|
||||||
pages: Array<Page>;
|
pages: Array<Page>;
|
||||||
// Direct subsections to this section, sorted by subsections weight
|
// 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
|
// the actual section object if you need it
|
||||||
subsections: Array<String>;
|
subsections: Array<String>;
|
||||||
toc: Array<Header>,
|
toc: Array<Header>,
|
||||||
|
|
Loading…
Reference in a new issue