What links here / backlinks


Can’t quite work out from reading https://gohugo.io/content-management/cross-references/ if Hugo supports back links like ikiwiki does https://ikiwiki.info/backlinks/

i.e. if page1 links to page2, page2 shows that link back to page1.

What am I missing? Thank you in advance,


Hugo doesn’t support that.


Oh darn, I need that. Wonder what Golang based tool could help me achieve what I need.


There’s some discussion in this forum on the “indieweb”, and implementing “webmentions”, which you might want to search for. I think that’s similar functionality to “backlinks” in a way. But, hugo itself isn’t a wiki, so this sort of thing depends on outside programs iirc.


webmentions appears to be a re-implementation of stuff like https://www.hixie.ch/specs/pingback/pingback

That’s not quite what I want. I want internal links to resolve and know where they are linked to. I don’t care for external sites and such.


@hendry Your comment reminded me of this discussion we had previously -


That’s just checking link validity, one way.

It doesn’t seem to address the wiki style back links feature that I need.

For example I love how when you reference a bug in Github, you see the back reference too. Really useful for making connections.


You might use https://gohugo.io/content-management/related/ for that, with tweaking to how the indices weigh.


Haven’t tried this locally, and it feels like it might be a performance killer, but I could see you creating a shortcode for links inside your content, then creating a partial for part of your templates that loops through all pages, checks for .HasShortcode, and then compares, for example, the passed value (in your shortcode) with the base filename of the page.


Not sure what a “shortcode” is, since I am just researching Hugo. The current style of the way I link is just using markdown relative links IIRC.

From http://ikiwiki.info/todo/cache_backlinks/ I can see Joey Hess made some optimizations.

Backlinks seems integral to the way Ikiwiki works http://source.ikiwiki.branchable.com/?p=source.git;a=blob;f=IkiWiki/Render.pm and as a bonus it shows up broken links. Nice feature


The documentation site has a very powerful search :

Looks like a cool wiki tool. Hugo is a super flexible and powerful static generator that can create all different kinds is sites and beyond, including multiple output formats. RTD. HTH.