-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display upcoming events to community page #8075
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an error when testing this
Logs
2024-10-22 19:06:47 INFO [build-hugo] hugo version: $(/tmp/work/hugo version)
2024-10-22 19:06:47 INFO [build-hugo] Building site with hugo
2024-10-22 19:06:47 INFO [build-hugo] Start building sites …
2024-10-22 19:06:47 INFO [build-hugo] hugo v0.133.1-47d00202e7e61769ce4d14691e43b27852c9cce4 linux/amd64 BuildDate=2024-08-26T13:58:46Z VendorInfo=gohugoio
2024-10-22 19:06:58 INFO [build-hugo] Total in 11496 ms
2024-10-22 19:06:58 INFO [build-hugo] Error: error building site: render: failed to render pages: render of "page" failed: "/tmp/work/site_repo/themes/digital.gov/layouts/communities/single.html:61:18": execute of template failed: template: communities/single.html:61:18: executing "content" at <partial "core/get-upcomingevents.html" .>: error calling partial: "/tmp/work/site_repo/themes/digital.gov/layouts/partials/core/get-upcomingevents.html:14:15": execute of template failed: template: partials/core/get-upcomingevents.html:14:15: executing "partials/core/get-upcomingevents.html" at <strings.Contains>: error calling Contains: unable to cast []string{"communicators"} of type []string to string
2024-10-22 19:06:58 ERROR [main] There was a problem running Hugo, see the above logs for details.
@RileySeaburg Fixed the previous merge conflicts that were causing the build error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool this works for me.
@ToniBonittoGSA I'll let you do the content audit and merge if you feel it's ready.
Summary
Update front matter fields and template to display future events on a communities page.
Preview
Link to Preview
Solution
ef1137d fixes a variable naming mis-match. Event pages were using
cop_events
andget-upcomingevents.html
referencedevents_cop
.b8c9ad1 removes old
cop_events
field.694ea03 enables displaying one event across multiple communities.
Front Matter Updates
event page
community page
How To Test
event_cop
field to future event using value fromthemes/digital.gov/static/workflow/config.yml
What To Test