1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 08:35:31 -04:00

switch everything from messy hCards/microdata to JSON-LD

This commit is contained in:
2019-11-22 20:24:38 -05:00
parent cf3e2ca5cf
commit 1ea90613c9
9 changed files with 68 additions and 29 deletions

View File

@@ -13,7 +13,8 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta name="author" content="{{ .Site.Author.name }}">
{{ partial "open-graph.html" . }}
{{ partial "open-graph.html" . }}
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<style amp-custom>
body {
@@ -147,21 +148,23 @@
div.highlight span.ge { font-style: italic; }
div.highlight span.gs { font-weight: bold; }
</style>
<link rel="icon" href="{{ "favicon-192.png" | absURL }}" sizes="192x192">
<link rel="icon" href="{{ "favicon-48.png" | absURL }}" sizes="48x48">
<link rel="icon" href="{{ "favicon-32.png" | absURL }}" sizes="32x32">
<link rel="icon" href="{{ "favicon-16.png" | absURL }}" sizes="16x16">
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}">
<link rel="alternate" type="application/rss+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
{{ partial "schema.html" . }}
{{ partial "schema-article.html" . }}
</head>
<body>
<header>
<nav>
<a id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
{{ partial "logo.html" . }}
{{ partial "logo.html" . }}
<span id="name">{{ .Site.Title }}</span>
</a>
<ul>
<li><a href="{{ .Site.BaseURL }}" title="Home">&#x1F3E0;</a></li>
<li><a href="{{ "notes/" | absURL }}" title="Notes">&#x1F4DD;</a></li>
@@ -169,14 +172,16 @@
</ul>
</nav>
</header>
<article>
<h1 class="title">{{ .Title }}</h1>
<p class="meta">
by <a class="author" href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>
by <a class="author" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a>
on <a class="date" href="{{ (.OutputFormats.Get "html").Permalink }}">{{ .Date.Format "January 2, 2006" }}</a>
</p>
{{ .Content }}
{{ .Content }}
</article>
<footer>
<div class="left">Content by <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>, licensed under <a href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener noreferrer nofollow">CC-BY-4.0</a>.</div>
<div class="right"><a class="back-to-top" href="#top">↑ Back to top.</a></div>

View File

@@ -1,22 +1,22 @@
{{ partial "header.html" . }}
{{ partial "blog-header.html" . }}
<main id="single">
<article itemscope itemtype="http://schema.org/BlogPosting" class="h-entry">
<article>
<div id="info">
<h1 itemprop="name headline" class="p-name"><a href="{{ .Permalink }}" itemprop="url" class="u-url no-underline">{{ .Title }}</a></h1>
<h1><a href="{{ .Permalink }}" class="no-underline">{{ .Title }}</a></h1>
<div id="meta">
by <span itemprop="author" itemscope itemtype="http://schema.org/Person" class="p-author"><a itemprop="url" rel="me author" href="{{ .Site.BaseURL }}" title="{{ .Site.Author.name }}" class="h-card no-underline"><span itemprop="name" class="p-name">{{ .Site.Author.name }}</span></a></span>
&middot; <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}"><time itemprop="datePublished" content="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="dt-published">{{ .Date.Format "January 2, 2006" }}</time></a>
by <a class="no-underline" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a>
&middot; <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a>
&middot; <a class="no-underline" href="{{ .Site.Params.gitRepo }}/blob/master/content/{{ .File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener nofollow noreferrer">Improve Post</a>
<div id="tags">
{{- range .Params.tags }}
<span itemprop="keywords" class="tag p-category">{{ . }}</span>
<span class="tag">{{ . }}</span>
{{- end }}
</div>
</div>
</div>
<div id="content" itemprop="articleBody" class="e-content">
{{ .Content }}
<div id="content">
{{ .Content }}
</div>
</article>
</main>