Stream: ig publishing requirements
Topic: Changes for rendering 'contained' resources
Lloyd McKenzie (Dec 14 2021 at 23:04):
I'd like to make the template changes around rendering of 'contained' resources so that SDC has a clean build. Right now, there's a list of the contained resources as children of the owning resource resources.json, but that doesn't help too much. The information in the resources page needs to all be at the same level and based on the page name - otherwise we can't use the same template for 'contained' resources as we do for regular resources. Second, I need the information about the contained resources exposed the ImplementationGuide resource so I can add the relevant pages to the IG. Finally, I need the artifact pages added to artifacts.json too. @Grahame Grieve
Grahame Grieve (Dec 22 2021 at 04:59):
Right now, there's a list of the contained resources as children of the owning resource resources.json, but that doesn't help too much. The information in the resources page needs to all be at the same level and based on the page name - otherwise we can't use the same template for 'contained' resources as we do for regular resources
I don't understand that - the contained resources are not the same as the non-contained resources
Grahame Grieve (Dec 22 2021 at 04:59):
Second, I need the information about the contained resources exposed the ImplementationGuide resource so I can add the relevant pages to the IG
there's no way to put them in there as it is, and I don't think we should
Grahame Grieve (Dec 22 2021 at 05:02):
Finally, I need the artifact pages added to artifacts.json too
what's artifacts.json?
Eric Haas (Dec 22 2021 at 18:06):
Grahame Grieve said:
Finally, I need the artifact pages added to artifacts.json too
what's artifacts.json?
a generated _data file in temp/pages/_data folder
Grahame Grieve (Dec 22 2021 at 19:43):
I don't believe that the IG publisher generates it
Lloyd McKenzie (Dec 22 2021 at 23:13):
Artifacts.json is indeed created by the templates. It's generated from the ImplementationGuide XML, so it's hard for it to work if the information about the contained resources isn't in the IG. Essentially, the template needs to do the following:
- create page entries for each artifact in the IG (now including contained artifacts)
- create a file that uses the filenames for those pages as a key for metadata information about the resource being rendered.
The resources.json file is keyed by using the artifact id. (e.g. site.data.resources[resource_]...) The 'resource_' is set using the include.type and include.id that are passed in. What is the 'id' going to be when we're processing an extension? "foo#bar"? That seems to make the most sense - and if so, that's what the entry in resources.json needs to be.
Last updated: Apr 12 2022 at 19:14 UTC