Generating data files from published content
You can generate a data file from published content by appending ?_renderer=styleguide
to the item's URL. For example, loading an article http://<host>/deadly-gamma-ray-burst-headed-for-mannys-pizzeria?_renderer=styleguide
displays the JSON representation of the article's content used to populate a template.
{ "_exampleOnly" : true, 1 "_template" : "/core/article/ArticlePage.hbs", 2 "articleBody" : [ { 3 "_template" : "/core/article/RichTextArticleBody.hbs", "body" : [ "{{html('<p>Asteroid 31415626, known more popularly as \"Fuzzy Bunny,\" escaped its orbit last month and is expected to collide with the Earth on January 21, 2025--precisely one week before the long-anticipated wedding between Jocelyn Rodriguez and Chas O'Brien. The bride-to-be isn't flustered by this development, and asked her bridesmaids to shop for dresses that coordinate well with pulverized concrete and lingering dust clouds.</p>')}}" ], "isCached" : false } ], "datePublished" : "September 05, 2018 09:32 AM", "headline" : "Massive Rogue Asteroid On Course to Disrupt Nuptials" }
You can use this file to debug templates and formatting. The advantage to this approach is that you can view your templates with live, published content instead of the mock data in data files—allowing for faster development and deployment.
Copy/paste the rendered JSON file in a theming directory.
Leave a blank line at the end of the JSON file.
Don't overwrite any existing files.
View the data file in Styleguide. For information about where you can find the template in the Styleguide UI, see Template listing.
The following examples show the difference between two published data files, one rendered in Styleguide, another rendered in production by Brightspot.
![]() Figure 151. Published content rendered in Styleguide | ![]() Figure 152. Published content rendered by Brightspot |