âWhy not directly create your ??? From the json?â
Itâs about the process, as well as the knowledge I have at hand, which is dependent on the usual various constraints (for example time).
I wrote code a few years ago that crawled the web for data, processed it, then turned it into markdown, which Hugo could generate into pages. I had intended to upgrade that process to the process âThe New Dynamicâ blogged about. Running Hugo twice to first generate markdown content from json (having the crawlers output to json instead of markdown), and then to generate pages, which in that case needed to be output as HTML, as well as used to create â???â
Then content adapters dropped and I explored them, then upgraded that process to content adapters, instead of running Hugo twice.
Now I use them also in a case where â???â is necessary, but outputting to HTML is not. I donât use the json directly but create adapters instead because Iâm using the ârelatedâ functionality, and the code I explored with that uses a dictionary and opts then relates pages, based on opts inputs, like tags, keywords, and fragments.
All that should be helpful going forward, since getting related to work well is probably a function of more ongoing experimentation.
Does related work just from resources (example addResource method), or from loading json from the Data directory? If so, please send the link, though I find adapters easy to conceptualize, especially when storing json in assets.
At the end of the day, Iâve written the code to do what it needs to do (which is to relate content), but in the case where itâs only â???â and not â??? and pagesâ, I donât want to use the compute to turn the pages into HTML and then delete them (unless itâs really negligible, in terms of compute).