Thanks for this, it's something that has been requested a bit -
https://groups.google.com/forum/#!topic/docpad/WXVP4TAWheo - touches on it a bit more.
It is definitely something nice to have, though I haven't figured out the "how to do it" yet.
One way would be to pragmatically do it via an event inside the docpad configuration file. So cycle through all the tags, and with them, create a document that uses this layout. That would solve this use case.
The problem with the above use case, is that it is very counter-intuitive, or at least not as intuitive as a mere dynamic document which would only take a few minutes to do. However, dynamic documents only work for node.js servers. Another solution is to write it as a dynamic document, then if they are doing a static generation, somehow convert it to a static implementation.
However, as soon as we start delving here, the complication VS value benefit tilts a lot. So my suggestion is to just use dynamic documents and host on a node.js server, rather than beating around the bush with accomplishing dynamic things with a static server that just wasn't built for such use cases.
Using dynamic documents for tagging would work like so:
1. Create a search.html.eco
2. Make it a dynamic document
3. Use it via urls like search.html?tag=blah
4. Do a query like:
<% if @req.query.tag: %>
<% for document in @getDocuments(tag: $has: req.query.tag).toJSON(): %>
...
That should put you on the right track. I can do up a working example of it using dynamic documents, but that will take some time.
Cheers,
- Ben