Skip to content

@hyas/seo

Official SEO integration for Hyas.

Status

npm (scoped)

Installation

Terminal window
npm i @hyas/seo

Setup

Add mounts to ./config/_default/module.toml:

[[mounts]]
source = "node_modules/@hyas/seo/layouts"
target = "layouts"
[[mounts]]
source = "layouts"
target = "layouts"

Add settings to ./config/_default/hugo.toml:

title = "Hyas"
enableRobotsTXT = true
[social]
twitter = "gethyas"

Set parameters in ./config/_default/params.toml:

# Hugo
title = "Hyas"
description = "Congrats on setting up a new Doks project!"
images = ["cover.png"]
# SEO (@hyas/seo)
[seo]
[seo.title]
separator = " | "
suffix = ""
[seo.favicons]
sizes = []
icon = "favicon.png" # favicon.png (default)
svgIcon = "favicon.svg" # favicon.svg (default)
maskIcon = "mask-icon.svg" # mask-icon.svg (default)
maskIconColor = "white" # white (default)
[seo.schemas]
type = "Organization" # Organization (default) or Person
logo = "images/favicon.png" # Logo of Organization — images/favicon.png (default)
name = "Hyas" # Name of Organization or Person
sameAs = [] # E.g. ["https://github.com/gethyas/hyas", "https://fosstodon.org/@hyas"]
images = ["images/cover.png"] # ["images/cover.png"] (default)
article = [] # Article sections
newsArticle = [] # NewsArticle sections
blogPosting = ["blog"] # BlogPosting sections
product = [] # Product sections

Set parameters in page frontmatter:

seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
structured_data:
product:
currency: USD
price: 500
availability: https://schema.org/OnlineOnly

How to use

[..]

Credits

This npm package is based on: