Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devidw/hugo-theme-component-structured-data
Hugo Theme Component for Structured Data
https://github.com/devidw/hugo-theme-component-structured-data
hugo hugo-theme hugo-theme-component jsonld seo seo-optimization seo-tools static structured-data
Last synced: 28 days ago
JSON representation
Hugo Theme Component for Structured Data
- Host: GitHub
- URL: https://github.com/devidw/hugo-theme-component-structured-data
- Owner: devidw
- License: gpl-3.0
- Created: 2021-02-04T08:55:03.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-29T17:22:05.000Z (almost 3 years ago)
- Last Synced: 2024-10-08T06:00:13.811Z (about 1 month ago)
- Topics: hugo, hugo-theme, hugo-theme-component, jsonld, seo, seo-optimization, seo-tools, static, structured-data
- Language: HTML
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= 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 https://gohugo.io/hugo-modules/theme-components/[docs about Theme Components].
.Currently available schema types include:
* BlogPosting== Installation
=== 1. Clone this theme component to your `/themes` directory
[source, sh]
----
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
[source, toml]
----
theme = ["…", "hugo-theme-component-structured-data", "…"]
----=== 3. Add the following statement in the layout file where your `` lives:
[source, go]
----
{{ partial "structureddata/include.html" . }}
----// NOTE: When using the https://hugoseotheme.com[Hugo Theme for perfect SEO] this will be done automatically for you so there's really no more configuration needed here.
== Usage
Add `schemas` key to your content frontmatter and provide an array of content types as value, e.g. `[BlogPosting]`..Yaml example
[source, yaml]
----
schemas: [BlogPosting]
----=== Configuration
|===
| Requireda|
* `BaseURL`
* `LanguageCode`
|====== Frontmatter
|===
| Required | Optionala|
* `date`
* `title`a|
* `author`
* `description`
* `lastmod`
* `lang`
|===