Back when output formats (http://gohugo.io/extras/output-formats/) I tried my best to grok the docs but am still failing to get how this is used in the real world. I'm starting with what I assume is a simple demo. I want to build a page to output JSON.
I first tried this:
Which I recognize isn't valid JSON (the stuff at the bottom), but I assumed that hitting /feed/json would return the content by itself with no layout. However, it still uses the main site layout. So am I just using this feature wrong?
As a follow up, obviously I don't want hard coded JSON, but something dynamic. Hugo still does not want you to write code in your /content folder, correct? So I'd need to build a shortcode perhaps and put the logic there?