Outputting inexistent internal links

I’m working on a wiki style site and naturally there are lots of content with references to still inexistent pages. It would be extremely convenient to he able to output a list of these planned pages with the number of times each one was referenced. I tried to achieve this in a couple of ways but failed, so I come here.

With render hooks it’s an easy task to locate and count these instances. However with scratch there is no way to realiably pull this information from outside the page, due to Hugo’s concurrency. So I moved on to the next idea.

This time I used an external tool. It’s this Github action, which looks for problems in the generated HTML. So in a way I already have access to a list of broken links, but it’s only available through Github’s interface as “artifacts” and I can’t process it. I tried to find a Github action to push this artifact to the published site’s branch in the repo and manipulate it with Javascript, but apparently there’s no way to do this.

So now I reached a dead end. Do you have any alternative idea of how to do this?