If I have a section (“/channels”), how do I make it so that it displays as the homepage of my site?
Not on the homepage (potentially alongside other content), but as the homepage…
In other words, how do I set my homepage to “/channels”?
When someone accesses my site’s homepage, I want them to see a list of channels. If they were to go to “/channels”, I expect they’d get redirected back to the homepage, where they can see the canonical list of channels (to avoid SEO penalising me for duplicate content).
In case it affects the way to achieve this, note that I don’t use markdown to create pages on my site, I use Content adapters.
Thank you! While I don’t actually want to swap the two pages per se, your code helped me to realise that I simply needed to edit the home.html template to be similar to the section.html template in the channels directory. I just needed to change {{ range .Pages }} to {{ range where site.RegularPages "Section" "channels" }} (as per your code).