diff --git a/docs/content/extras/datafiles.md b/docs/content/extras/datafiles.md index acf7af610..65a081521 100644 --- a/docs/content/extras/datafiles.md +++ b/docs/content/extras/datafiles.md @@ -88,7 +88,7 @@ Assuming you have the following YAML structure to your `User0123.yml` Data File ``` Name: User0123 -"Short Description": "He is a jolly good fellow." +"Short Description": "He is a **jolly good** fellow." Achievements: - "Can create a Key, Value list from Data File" - "Learns Hugo" @@ -98,7 +98,7 @@ Achievements: To render the `Short Description` in your `layout` File following code is required. ``` -{{ $.Scratch.Set "ShortDesc" ( index $.Site.Data.User0123 "Short Description" ) }} -
Short Description of {{.Site.Data.User0123.Name}}:

{{ $.Scratch.Get "ShortDesc" }}

-{{ end }} +
Short Description of {{.Site.Data.User0123.Name}}:

{{ index .Site.Data.User0123 "Short Description" | markdownify }}

``` + +Note the use of the `markdownify` template function. This will send the description through the Blackfriday Markdown rendering engine. \ No newline at end of file