1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Indieweb: structured data for rest of website

Outside the blogposting, add addl. structured data for the surrounding
site: the license, copyright holder, navigation items, source code link,
etc.
This commit is contained in:
Rohan Kumar 2022-02-10 22:12:45 -08:00
parent 94bda64305
commit 08de786bbc
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
4 changed files with 26 additions and 17 deletions

View file

@ -1,8 +1,10 @@
<!DOCTYPE html>
<html lang="{{- default "" .Site.LanguageCode -}}" prefix="og: https://ogp.me/ns# article: https://ogp.me/ns/article#">
{{- partial "head.html" . -}}
{{- partial "header.html" . -}}
<body itemscope itemtype="https://schema.org/Blog https://schema.org/WebPage">
{{ partial "header.html" . -}}
<main id="content">
{{- block "main" . }}{{- end -}}
</main>
{{ partial "footer.html" . }}
</body>

View file

@ -1,6 +1,13 @@
<hr>
<footer id="site-footer">
<p>Copyright © {{now.Year}} Rohan Kumar · <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0 license</a> · <a href="{{ .Site.Params.src }}">Source</a> · <a rel="alternate" href="http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion{{ .RelPermalink }}">Tor</a></p>
<p>
Copyright © <span itemprop="copyrightYear">{{now.Year}}</span> {{- partial "indieweb-author.html" -}} ·
<span itemprop="license" type="https://schema.org/CreativeWork"><a rel="license" itemprop="url" href="https://creativecommons.org/licenses/by-sa/4.0/"><span itemprop="name">CC BY-SA 4.0 license</span></a></span> ·
<span itemscope itemtype="https://schema.org/SoftwareSourceCode">
<a itemprop="codeRepository" rel="source" href="{{ .Site.Params.src }}">source code</a> ·
</span>
<a rel="alternate" href="http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion{{ .RelPermalink }}">Tor</a>
</p>
{{if .GitInfo -}}
<p>Site last deployed on {{now.Format "2006-01-02 15:04:05 -0700" }}</p>
{{- end}}

View file

@ -1,14 +1,14 @@
<header id="banner">
<nav>
<ul class="unstyled-list">
<li>
<a rel="home" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</li>
{{ range .Site.Menus.main.ByWeight -}}
<li>
{{ .Pre }}<a href="{{ .URL }}" title="{{ .Title }}">{{- .Name -}}</a>{{ .Post }}
</li>
{{- end }}
</ul>
</nav>
</header>
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
<nav>
<ul class="unstyled-list">
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"><span itemprop="name">{{ .Site.Title }}</span></a>
</li>
{{ range .Site.Menus.main.ByWeight -}}
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
{{ .Pre }}<a href="{{ .URL }}" itemprop="url" title="{{ .Title }}"><span itemprop="name">{{- .Name -}}</span></a>{{ .Post }}
</li>
{{- end }}
</ul>
</nav>
</header>

View file

@ -1,5 +1,5 @@
{{ define "main" }}
<div itemscope itemtype="https://schema.org/BlogPosting" class="h-entry">
<div itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting" class="h-entry">
<article itemprop="mainEntityOfPage">
<header id="post-header">
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>