The Hugo Redirect Plugin is a Hugo plugin that allows you to create redirect rules for your website. It generates redirect rules by reading a CSV file that contains old URLs and their corresponding new URLs.
Install Hugo-Redirect
Add hugo-redirect
as a submodule
|
|
Add to .yaml or .toml
.yaml:
|
|
.toml:
|
|
Make a Redirect
go to your root directory for Hugo and run:
|
|
The format of the redirect should be:
|
|
Example
Redirect file for mansoorbarri.com/github is:
|
|
You can add as many redirects as you like using this method.
that’s it <3