Manage Schema.Org with Bissetii in Hugo

Bissetii strives to provide an easy way to manage your page's Schema.Org data without needing too much manual work. Although complicated, it is necessary to boost your search engine optimization needs for easier parsing by crawlers.

This feature is available since v1.12.0.

The ld+json Approach

Bissetii opted the use of ld+json approach as recommended by Google Search Central mainly because Bissetii does not want its content creators to write the content twice (once in Markdown, another in JSON).

This approach will generate a <script type='application/ld+json'> HTML tag in the <head> section containing the Page data information. An example is shown as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
<head>
	...
	<script type="application/ld+json">
	{
		"@context": "https://schema.org/",
		"@type": "SoftwareApplication",
		"applicationcategory": ["Hugo Theme Module", "Go Template Module"],
		"author": [{
				"@type": "Organization",
				"name": "Bissetii Team",
				"slogan": "Design with Simplicity"
			},
			[{
				"name": "Holloway Chew Kean Ho",
				"type": "Person"
			}],
			[{
				"name": "ZORALab Team",
				"type": "Organization"
			}]
		],
		...
	}
	</script>
	...
</head>
...

Facilitate Data Schema

Bissetii supplies a number of default data schema by default inside data/bissetii/schema/ directory. The most notable example would be WebPage.toml where it will generate every page as web page data structure.

If you want to build your own data schema, simply add a new TOML data file into data/bissetii/schema/ directory.

You can refer to the following resources for referencing a usable data structure:

  1. Schema.org Parameters
  2. Google Search Gallery

Validator

There are validators in the web allowing you to validate a page’s Schema.org data structure. Bissetii recommends the following:

  1. JSON Linter
  2. Google Rich Results Test
  3. Schema.org Validator

Selecting A Schema

Now, for any page, you can select an available schema via the page’s Hugo front matter’s [schema] table. The field is selectType and its value should be the name of the TOML data file. The pattern is as such:

1
2
3
4
5
+++
...
[schema]
selectType = "SoftwareApplication"
...

Example:

Value Target
"SoftwareApplication" data/bissetii/schema/SoftwareApplication.toml
"MyCustom" data/bissetii/schema/MyCustom.toml
WebPage or default data/bissetii/schema/WebPage.toml

Still Continously Developing

Please keep in mind that this schema.org rendering is still under continuous development to facilitate an optimized content creation experience (and data structure maintenance).

Among notable developments would be page-specific schema fields via Hugo’s front matter, authorship correction, and etc.

Wrapping Up

That is all for managing Schema.org with Bissetii in Hugo. If you have any question to ask us directly, please feel free to raise it at our GitLab Issues Section. We will be happy to assist you.