Automated internal linking to tag pages


I was wondering if it is possible to automate internal linking of text on a post to /tag pages if they existed.


On this page there is text “Erling Haaland”,
“Manchester City” and “Tottenham” etc. These all exist as /tag pages on my website and I’d like to automate internal links when posting.

I have been doing so manually, but preferred option is to automate if possible.

Thanks, Barry

I’ve got some javascript around here somewhere that automatically adds links to post bodies. If you wanted Ghost to do it (instead of the browser doing it with javascript), you’d need a cloud function somewhere that rewrote the post upon publication. Could be done, but doesn’t exist natively in Ghost.

1 Like

Hi Cathy,

Thanks for the prompt response, very helpful.

I’d love to see the Javascript if you’re happy to share. I also have cloud functions as part of my workflow with, so I could potentially build there before pushing the post to Ghost?

In summary, I take content from an API, convert images, categorise into the tags I have on site and then publish to draft. Once I have the automation of internal linking I can publish straight to site and have an end to end content automation flow.

Hope that makes sense and thanks again for your help.

Cheers, Barry