Hello there awesome Hugo Community and thanks for indulging in my madness.
There’s been a similar thread in the past (Automatic Internal Linking based on Keywords), i’m wondering if something similar has been created in the mean time.
My goal would be to “emulate” a wordpress plugin which does automatize the internal link process (Internal Link Juicer: SEO Auto Linker for WordPress – WordPress plugin | WordPress.org), excluding the interface.
Since my skills are (very) limited (In Go in particular), i could try to:
- Create an array of words to be linked and target internal pages
- Check the {content} with Replace or ReplaceRe, replacing the first occurence of words with an internal link using ref or relref (Links and Cross References | Hugo)
During this planning stage i have many doubts:
- the main one is related to the cross-reference: shoud i replace the matched word (eg: “banana”) with something like ({{< ref “article005.md” >}} “banana”)?
- If the above point is true, my array should contain the word to the replaced and the filename of the linked article?
Sorry for the confusing post and thanks in advance !