Skip to content

Add BlogPosting structured data to blog single template #18

@matrixise

Description

@matrixise

Problem

Blog post pages render <article> HTML and og:type: article but emit only Organization + BreadcrumbList JSON-LD (inherited from the base partial). Blog posts have all the fields needed for a BlogPosting schema: title, description, date, and URL.

Missing this means no potential for Google Article rich results.

Proposed schema

```json
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "{{ .Title }}",
"description": "{{ .Description }}",
"datePublished": "{{ .Date.Format "2006-01-02" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02" }}",
"url": "{{ .Permalink }}",
"publisher": {
"@type": "Organization",
"@id": "https://python.ie/#organization",
"name": "Python Ireland"
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Permalink }}"
}
}
```

Files to change

  • layouts/blog/single.html — add <script type="application/ld+json"> block
  • Consider also adding an author field once blog authorship is established

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowNice to have / backlogschemaStructured data / JSON-LDseoSearch engine optimisation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions