Merge commit '3710a5ec7efe6baca6e452f43632c05d22bab3c4'

This commit is contained in:
Bjørn Erik Pedersen
2023-10-27 10:06:44 +02:00
6 changed files with 15 additions and 2 deletions

View File

@@ -92,6 +92,10 @@ Used within a [template action](#template-action), a function takes one or more
Metadata at the beginning of each content page, separated from the content by format-specific delimiters. See [details](/content-management/front-matter/).
### identifier
A string that represents a variable, method, object, or field. It must conform to Go's [language specification](https://go.dev/ref/spec#Identifiers), beginning with a letter or underscore, followed by zero or more letters, digits, or underscores.
### int
See [integer](#integer).

View File

@@ -165,7 +165,7 @@ To add Open Graph metadata, include the following line between the `<head>` tags
## Twitter Cards
An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards),
metadata used to attach rich media to Tweets linking to your site.
### Configure Twitter Cards

View File

@@ -114,6 +114,8 @@ all other pages:
Var is {{ $var }}
```
Variable names must conform to Go's naming rules for [identifiers][identifier].
## Functions
Go Templates only ship with a few basic functions but also provide a mechanism for applications to extend the original set.
@@ -660,6 +662,7 @@ If you restrict front matter to the TOML format, and omit quotation marks surrou
[dotdoc]: https://golang.org/pkg/text/template/#hdr-Variables
[front matter]: /content-management/front-matter
[functions]: /functions
[identifier]: /getting-started/glossary/#identifier
[internal templates]: /templates/internal
[math]: /functions/math
[pagevars]: /variables/page

View File

@@ -592,6 +592,6 @@ See the documentation on [`where`] and
[taxvars]: /variables/taxonomy/
[views]: /templates/views/
[`where`]: /functions/collections/where
[`first]: /functions/first/
[`first`]: /functions/first/
[main sections]: /functions/collections/where#mainsections
[`time.Format`]: /functions/time/format