diff --git a/content/en/content-management/content-adapters.md b/content/en/content-management/content-adapters.md index 467d435fd..7dc9be779 100644 --- a/content/en/content-management/content-adapters.md +++ b/content/en/content-management/content-adapters.md @@ -37,7 +37,7 @@ Use these methods within a content adapter. Adds a page to the site. -```go-html-template {file="content/books/"} +```go-html-template {file="content/books/_content.gotmpl"} {{ $content := dict "mediaType" "text/markdown" "value" "The _Hunchback of Notre Dame_ was written by Victor Hugo." @@ -55,7 +55,7 @@ Adds a page to the site. Adds a page resource to the site. -```go-html-template {file="content/books/"} +```go-html-template {file="content/books/_content.gotmpl"} {{ with resources.Get "images/a.jpg" }} {{ $content := dict "mediaType" .MediaType.Type @@ -81,7 +81,7 @@ Then retrieve the new page resource with something like: Returns the `Site` to which the pages will be added. -```go-html-template {file="content/books/"} +```go-html-template {file="content/books/_content.gotmpl"} {{ .Site.Title }} ``` @@ -92,7 +92,7 @@ Returns the `Site` to which the pages will be added. Returns a persistent “scratch pad” to store and manipulate data. The main use case for this is to transfer values between executions when [EnableAllLanguages](#enablealllanguages) is set. See [examples](/methods/page/store/). -```go-html-template {file="content/books/"} +```go-html-template {file="content/books/_content.gotmpl"} {{ .Store.Set "key" "value" }} {{ .Store.Get "key" }} ``` diff --git a/content/en/functions/transform/Unmarshal.md b/content/en/functions/transform/Unmarshal.md index 63977aefd..bcb5a0413 100644 --- a/content/en/functions/transform/Unmarshal.md +++ b/content/en/functions/transform/Unmarshal.md @@ -132,7 +132,7 @@ lazyQuotes targetType : {{< new-in 0.146.7 />}} -: (`string`) The target data type, either `` or `map`. Default is ``. +: (`string`) The target data type, either `slice` or `map`. Default is ``. ### Examples @@ -148,7 +148,7 @@ The examples below use this CSV file: To render an HTML table from a CSV file: ```go-html-template -{{ $data := }} +{{ $data := slice }} {{ $file := "pets.csv" }} {{ with or (.Resources.Get $file) (resources.Get $file) }} {{ $opts := dict "targetType" "slice" }}