mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 14:41:00 +00:00
bc337e6ab5
An inline shortcode's name must end with `.inline`, all lowercase. E.g.: ```bash {{< time.inline >}}{{ now }}{{< /time.inline >}} ``` The above will print the current date and time. Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template. This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes". The same inline shortcode can be reused later in the same content file, with different params if needed, using the self-closing syntax: ``` {{< time.inline />}} ``` Fixes #4011 |
||
---|---|---|
.. | ||
error_locator.go | ||
error_locator_test.go | ||
errors.go | ||
file_error.go | ||
file_error_test.go | ||
line_number_extractors.go |