mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 14:17:43 +00:00
Update transform.Unmarshal.md (#2105)
Fixes example to use correct method to fetch remote XML.
This commit is contained in:
1 parent
92657177a4
commit
2652da8d41
1 file changed
+1
-1
@@ -61,7 +61,7 @@ To get the contents of `<title>` in the document below, you use `{{ .message.tit
|
|||||||
The following example lists the items of an RSS feed:
|
The following example lists the items of an RSS feed:
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ with resources.Get "https://example.com/rss.xml" | transform.Unmarshal }}
|
{{ with resources.GetRemote "https://example.com/rss.xml" | transform.Unmarshal }}
|
||||||
{{ range .channel.item }}
|
{{ range .channel.item }}
|
||||||
<strong>{{ .title | plainify | htmlUnescape }}</strong><br />
|
<strong>{{ .title | plainify | htmlUnescape }}</strong><br />
|
||||||
<p>{{ .description | plainify | htmlUnescape }}</p>
|
<p>{{ .description | plainify | htmlUnescape }}</p>
|
||||||
|
|||||||
Reference in new issue
Block a user