Multiple layouts for same content

Hello awesome community!

I have a bunch of contents for a conference site, it’s organized like this:

├── talks
│   ├──
│   ├──
│   ├──
│   ├──
│   └──

I want to have several versions of each talk page, for instance:

So each talk page would have multiple layouts, using the same content.

Is this possible without doing copies of a-talk/ => a-talk/ with taxonomy modified (which I would have to do for each talk)? Is there a way to easily define that everything in content/talks/ should have multiple URLs with different layouts?

There are at least a couple of ways to do this. Here’s one that’s somewhat easy to wrap your head around…

git clone --single-branch -b hugo-forum-topic-37238 hugo-forum-topic-37238
cd hugo-forum-topic-37238
hugo server


├── talks/
│   ├── talk-1/
│   │   ├── 
│   │   └──  <-- this has the content
│   └── talk-2/
│       ├──
│       └──  <-- this has the content


├── single-fancy.html
└── single.html

The trick is to set the layout value in front matter. Please clone the repository for details.


You might also consider an alternate output format for this content type. See:

Thanks @jmooring for an inspirational answer – and in addition to that, templating your forum solutions with Github examples, it’s genius!

The solution seems to have an unquestionable “Hugo-way” about it, so I can guess it doesn’t get much better. It has the slight drawback that I have to create empty stubs for every instance of /talks/<some-talk>/fancy/. I think that I can live with that, but I was hoping that Hugo would have a way of populating several URLs with different templates of the same content.

I see now that what I am talking about would be some kind of non-existing new Template Views feature.

Thanks again!

You are welcome. The other approach that I mentioned does not require the “empty stubs.” It might be more to your liking.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.