Skip to content

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

License

Notifications You must be signed in to change notification settings

jmooring/hugo-module-backlinks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages