Skip to content

trunkcode/hugo-seo

Repository files navigation

Hugo Seo

Hugo module adds the following attributes on the markup.

Install

hugo mod get github.com/trunkcode/[email protected]

Add theme module configuration settings

Add the settings in the following snippet at the end of your site configuration file (default: config.toml) and save the file.

config.toml

[module]
  [[module.imports]]
    path = "github.com/trunkcode/hugo-seo"
    disable = false

config.yaml

module:
  imports:
    - path: github.com/trunkcode/hugo-seo
      disable: false

config.json

{
  "module": {
    "imports": [
      {
        "path": "github.com/trunkcode/hugo-seo",
        "disable": false
      }
    ]
  }
}

Configuration

config.toml

[Params]
  [hugoSeo]
    faExternalIcon = true
    relValue = "noreferrer nofollow"

config.yaml

Params:
  hugoSeo:
    faExternalIcon: true
    relValue: "noreferrer nofollow"

config.json

{
  "Params": {
    "hugoSeo": {
      "faExternalIcon": true,
      "relValue": "noreferrer nofollow"
    }
  }
}

Configuration Settings

The following is the full list of Hugo Seo variables with their default value. Users may choose to override those values in their site config file(s).

faExternalIcon

Default value: false

Add Font Awesome external icon on the external links.

relValue

Default value: "noopener"

Specifies the relationship between the current document and the linked document.

License GitHub

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.