mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 04:16:13 +00:00
Restructure and simplify
This commit is contained in:
1 parent
fcba7dddf6
commit
773212de65
1 file changed
+2
-4
@@ -160,11 +160,9 @@ Each piece of content in Hugo can optionally be assigned a date. It can also be
|
||||
|
||||
When iterating over content within taxonomies, the default sort is the same as that used for section and list pages: first by weight, then by date. This means that if the weights for two pieces of content are the same, then the more recent content will be displayed first.
|
||||
|
||||
The default weight for any piece of content is 0.
|
||||
The default weight for any piece of content is 0. Zero means "does not have a weight", not "has a weight of numerical value zero".
|
||||
|
||||
Weights of zero are treated specially: if two pages have unequal weights, and one of them is zero, then the zero-weighted page will always appear after the other one, regardless of the other's weight. Zero weights should thus be used with care: for example, if both positive and negative weights are used to extend a sequence in both directions, a zero-weighted page will appear not in the middle of the list, but at the end.
|
||||
|
||||
Zero should be interpreted as "does not have a weight", rather than "has a weight of numerical value zero".
|
||||
Weights of zero are thus treated specially: if two pages have unequal weights, and one of them is zero, then the zero-weighted page will always appear after the other one, regardless of the other's weight. Zero weights should thus be used with care: for example, if both positive and negative weights are used to extend a sequence in both directions, a zero-weighted page will appear not in the middle of the list, but at the end.
|
||||
|
||||
### Assign Weight
|
||||
|
||||
|
||||
Reference in new issue
Block a user