Skip to content

devidw/hugo-theme-component-structured-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hugo Theme Component for Structured Data

You can use the Structured Data Theme Component on your own theme by following the instructions below. Also make sure to check out the docs about Theme Components.

Currently available schema types include:
  • BlogPosting

Installation

1. Clone this theme component to your /themes directory

git submodule add https://github.com/devidw/hugo-theme-component-structured-data ./themes/hugo-theme-component-structured-data

2. Add this theme component to your list of themes inside your config-file

theme = ["", "hugo-theme-component-structured-data", ""]

3. Add the following statement in the layout file where your <head></head> lives:

{{ partial "structureddata/include.html" . }}

Usage

Add schemas key to your content frontmatter and provide an array of content types as value, e.g. [BlogPosting].

Yaml example
schemas: [BlogPosting]

Configuration

Required
  • BaseURL

  • LanguageCode

Frontmatter

Required Optional
  • date

  • title

  • author

  • description

  • lastmod

  • lang