Adding Schema.org to a Hugo Site

I’ve added schema.org data to each page of this site. Just to annoy the Indieweb folks.

    <script type="application/ld+json">
        {
        "@context":"https://schema.org",
        "@type": "BlogPosting",
        {{ with $featured -}}
        "image": {{ $featured.Permalink }}},
        {{ end }}
        "url": {{ .Permalink }},
        "dateCreated": "{{ .PublishDate.Format "2006-01-02" }}",
        "datePublished": "{{ .PublishDate.Format "2006-01-02" }}",
        "dateModified": "{{ .Page.Lastmod.Format "2006-01-02" }}",
        "copyrightYear": "{{ .PublishDate.Format "2006" }}",
        "copyrightHolder": "Charlie O'Hara",
        "wordCount": "{{ .WordCount }}",
        "inLanguage": "en-US",
        "isFamilyFriendly": "false",
        "headline": "{{ .Title }}",
        {{ with .Params.subtitle }}
        "alternativeHeadline": "{{ . }}",
        {{ end }}
        "articleBody": {{ .Content | htmlUnescape | plainify }},
        "author": {
            "@type": "Person",
            "name": "Charlie O'Hara",
            "url": "https://awfulwoman.com"
        },
        "mainEntityOfPage": "true"
        }
    </script>

Tagged with