Skip to content

Commit

Permalink
docs: make the named value Data File example simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jun 22, 2015
1 parent e96624c commit 67209db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/content/extras/datafiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" ) }}
<div>Short Description of {{.Site.Data.User0123.Name}}: <p>{{ $.Scratch.Get "ShortDesc" }}</p></div>
{{ end }}
<div>Short Description of {{.Site.Data.User0123.Name}}: <p>{{ index .Site.Data.User0123 "Short Description" | markdownify }}</p></div>
```

Note the use of the `markdownify` template function. This will send the description through the Blackfriday Markdown rendering engine.

0 comments on commit 67209db

Please sign in to comment.