Schema.org microdata width markdown/kirbytext

Hi,
does anybody know a solution to use schema.org microdata with markdown/kirbytext?

Cheers,
jan

Markdown is unstructured and doesn’t contain hints what a piece of content is.

Which kind of schema.org items do you mean? For the ones I can think of a Kirbytag makes most sense.

Yes, if it needs to go into the text, your only option is using Kirbytags; other than that, you can use structure fields for structured content.

On my website I seperate my content in various fields instead of having one big textfield. I add the microdata within the templates, not the content. For example, here’s a snipped from one of my projects.

<h1 itemprop="name"><?= $page->title()->html(); ?></h1>
<meta itemprop="creator" content="<?= $site->author()->html(); ?>">
<meta itemprop="dateCreated" content="<?= $page->year()->html(); ?>">
<p class="tags" itemprop="keywords"><?= $page->tags()->html(); ?></p>

title, author, year and tags are all fields in my blueprint.

1 Like

@PaulMorel: Yes, exactly, on the page level, this is definitely the best way to go. If you have “smaller” items than on the page level, I would use structure fields, where you could add the same sort of information.