/hugo-module-backlinks

A Hugo module that allows you to render a list of pages that link to the current page

Primary LanguageHTMLApache License 2.0Apache-2.0

Hugo Module – Backlinks

This Hugo module allows you to render a list of pages that link to the current page.

Configuration

To add this module to your project, initialize your project as a Hugo module:

hugo mod init foo

In the above, foo is typically something like github.com/user/project.

Then add this to your site configuration:

[[module.imports]]
path = 'github.com/jmooring/hugo-module-backlinks'

[markup.goldmark.renderHooks.link]
enableDefault = true

[outputs]
home = ['html','rss','backlinks']

To override the list title, create a backlinks_title translation entry in your i18n files.

Usage

To use the backlinks partial:

{{ partial "backlinks.html" . }}

Try it

git clone --single-branch -b hugo-github-issue-8077 https://github.com/jmooring/hugo-testing hugo-github-issue-8077
cd hugo-github-issue-8077
hugo server