shithub: hugo

Download patch

ref: 67209dbfb31550cde05c7f8ea23bf67d9727d855
parent: e96624cce85dc72f142b800f5a04ff653c7dad77
author: Bjørn Erik Pedersen <[email protected]>
date: Mon Jun 22 16:25:17 EDT 2015

docs: make the named value Data File example simpler

--- a/docs/content/extras/datafiles.md
+++ b/docs/content/extras/datafiles.md
@@ -88,7 +88,7 @@
 
 ```
 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 @@
 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.
\ No newline at end of file