I’m trying to build out a theme that generates multiple pages from a single content file. I have a content file (example below) that contains metadata for a webinar.
+++
banner_image = "/uploads/webinarXYZ.png"
publishdate = 2020-10-30T04:00:00Z
enable_registration = true
registration_form_id = "XYZ123456789"
title = "Learning how to build a Hugo Theme"
webinar_date = 2020-11-11T04:00:00Z
webinar_url = "https://www.youtube.com/watch?v=XXXXXXXXXXXX"
[about_this_webinar]
description = "The webinar's description goes here."
host = "John Smith"
+++
I want to generate 2 different static files from this single content file:
- A single page that contains the banner_image and a sign up form (uses registration_form_id with a 3rd party service – not important for this question): http://example.com/webinarXYZ/
- Another single page with the output url prefaced with “video-” that contains the embedded webinar_url link: http://example.com/video-webinarXYZ/
I can generate the first page using the single.html template just fine. In Hugo, is there a way to generate a 2nd page using a different page template based on the same content file?