I am building a Site.Home.Scratch with all the links in the render link template and want to access the full list in a separate layout to build a json file with them.
Is it possible to build that layout after the others have finished or is there a better way to get the full list of links?
No. This capability is most frequently associated with a desire to display backlinks. Perhaps this will be possible at some point with a defer keyword/function/method.
My memory about this may be a little hazy, but in Hugo’s render method there are two entities that is serialized (and not parallelized) and have a deterministic order:
Site (aka language)
Output format
all output formats for a site is the union of all output formats set in config and front matter, ordered by weight (and then name). So, if you create a output format with a large weight value and then create a template for that for, say, the home page – that will pretty much be the last thing to be done.