Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-09-07 22:37:51 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-09-07 22:37:51 +0300
commitb9e4f5898b1f8c5cb3b5e6525d1381ed3c9c5904 (patch)
tree61489f82d73f3035f85dbe67791e2017e7ca294d /docs/content/en/templates
parente820b366b91729313c68be04b413e8894efc4421 (diff)
parent7d7771b673e5949f554515a2c236b23192c765c8 (diff)
Merge commit '7d7771b673e5949f554515a2c236b23192c765c8'
Diffstat (limited to 'docs/content/en/templates')
-rw-r--r--docs/content/en/templates/introduction.md2
-rw-r--r--docs/content/en/templates/shortcode-templates.md2
-rw-r--r--docs/content/en/templates/taxonomy-templates.md6
3 files changed, 7 insertions, 3 deletions
diff --git a/docs/content/en/templates/introduction.md b/docs/content/en/templates/introduction.md
index fb7d341df..43f88f147 100644
--- a/docs/content/en/templates/introduction.md
+++ b/docs/content/en/templates/introduction.md
@@ -646,7 +646,7 @@ Go allows you to do more than what's shown here. Using Hugo's [`where` function]
[functions]: /functions/ "See the full list of Hugo's templating functions with a quick start reference guide and basic and advanced examples."
[Go html/template]: https://golang.org/pkg/html/template/ "Godocs references for Go's html templating"
[gohtmltemplate]: https://golang.org/pkg/html/template/ "Godocs references for Go's html templating"
-[index]: /functions/index/
+[index]: /functions/index-function/
[math functions]: /functions/math/
[partials]: /templates/partials/ "Link to the partial templates page inside of the templating section of the Hugo docs"
[internal_templates]: /templates/internal/
diff --git a/docs/content/en/templates/shortcode-templates.md b/docs/content/en/templates/shortcode-templates.md
index ac0de0ab2..19ec6dea9 100644
--- a/docs/content/en/templates/shortcode-templates.md
+++ b/docs/content/en/templates/shortcode-templates.md
@@ -95,7 +95,7 @@ For the second position, you would just use:
most helpful when the condition depends on either of the values, or both:
```
-{{ or .Get "title" | .Get "alt" | if }} alt="{{ with .Get "alt"}}{{.}}{{else}}{{.Get "title"}}{{end}}"{{ end }}
+{{ if or (.Get "title") (.Get "alt") }} alt="{{ with .Get "alt"}}{{.}}{{else}}{{.Get "title"}}{{end}}"{{ end }}
```
#### `.Inner`
diff --git a/docs/content/en/templates/taxonomy-templates.md b/docs/content/en/templates/taxonomy-templates.md
index bef2d3226..15e0ff5c9 100644
--- a/docs/content/en/templates/taxonomy-templates.md
+++ b/docs/content/en/templates/taxonomy-templates.md
@@ -158,7 +158,11 @@ Hugo uses both `date` and `weight` to order content within taxonomies.
Each piece of content in Hugo can optionally be assigned a date. It can also be assigned a weight for each taxonomy it is assigned to.
-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, than the more recent content will be displayed first. The default weight for any piece of content is 0.
+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.
+
+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.
### Assign Weight