I tend to prefer the latter as it's a little shorter to reference within templates, a little cleaner in terms of architecture, and most of our "real" templates are already using it. Getting rid of the former should be a matter of doing some final grepping in nexus-control, deleting some code in the content service, and updating our documentation.
The context used to render Nunjucks templates includes global assets in two places:
deconst.content.assets
which includes the assets injected during envelope rendering by the content service.deconst.assets
includes the assets fetched from the content service explicitly at the/assets
endpoint.I tend to prefer the latter as it's a little shorter to reference within templates, a little cleaner in terms of architecture, and most of our "real" templates are already using it. Getting rid of the former should be a matter of doing some final grepping in nexus-control, deleting some code in the content service, and updating our documentation.