You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a blowfish question or a question due to my misunderstanding of Hugo, but I'll ask anyway!
I'm trying to play around with the new Hugo functionality with GetRemote. I've created a custom shortcode to display a list of data I'm retrieving from a JSON source. I would like to format the output using the timeline shortcode from blowfish but it's throwing erros (I think somethign to do with nested shortcodes.
The code in my rsspull.html file (located in layouts/shortcodes) is:
{{ if .Get "url" }}
{{ $url := .Get "url" }}
{{ $limit := .Get "limit" }}
{{- with .Parent -}}
{{< timeline >}}
{{ with resources.GetRemote $url | transform.Unmarshal }}
{{ range first $limit .items }}
{{< timelineItem icon="link" header="{{ .title }}" badge="{{ dateFormat "January 2, 2006" .date_modified }}" >}}
<a href="{{ .url }}" target="_blank">{{ .title }}</a>
{{< /timelineItem >}}
{{ end }}
{{ end }}
{{< /timeline >}}
{{- end -}}
{{ end }}
and I'm trying to call my shortcode from a md file with
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm not sure if this is a blowfish question or a question due to my misunderstanding of Hugo, but I'll ask anyway!
I'm trying to play around with the new Hugo functionality with GetRemote. I've created a custom shortcode to display a list of data I'm retrieving from a JSON source. I would like to format the output using the timeline shortcode from blowfish but it's throwing erros (I think somethign to do with nested shortcodes.
The code in my rsspull.html file (located in layouts/shortcodes) is:
and I'm trying to call my shortcode from a md file with
The error I'm getting is:
which points at the {{< timeline >}} code in my file.
Can anyone point me in the right direction?
Beta Was this translation helpful? Give feedback.
All reactions