add microdata
This commit is contained in:
parent
286a142e4e
commit
1f477797f5
3 changed files with 27 additions and 19 deletions
|
@ -91,8 +91,7 @@ main =
|
|||
let ctx = (postCtx tags) <> pageCtx <> flattrCtx
|
||||
full <- loadAndApplyTemplate "templates/post.html" ctx compiled
|
||||
_ <- saveSnapshot "content" compiled
|
||||
loadAndApplyTemplate "templates/default.html" baseCtx full
|
||||
>>= relativizeUrls
|
||||
loadAndApplyTemplate "templates/default.html" (baseCtx <> ctx) full
|
||||
|
||||
-- Post tags
|
||||
tagsRules tags $ \tag pattern -> do
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<link rel="icon" type="image/x-icon" href="/images/nekonet.ico">
|
||||
<!--<script type="text/javascript">document.domain="nek0.eu"</script>-->
|
||||
</head>
|
||||
<body class="site">
|
||||
<body itemscope itemtype="https://schema.org/Blog" class="site">
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<a href="/">Nek0's Blog</a>
|
||||
|
@ -86,8 +86,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<article>
|
||||
<h1>$title$</h1>
|
||||
$if(datetime)$
|
||||
<article itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<h1 itemprop="headline">$title$</h1>
|
||||
$else$
|
||||
<article>
|
||||
<h1>$title$</h1>
|
||||
$endif$
|
||||
|
||||
$body$
|
||||
</article>
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
<div class="info">
|
||||
Posted on <time datetime="$datetime$">$date$</time>
|
||||
$if(author)$
|
||||
by $author$
|
||||
$endif$
|
||||
$if(tags)$
|
||||
in $tags$
|
||||
$endif$
|
||||
Posted on <time itemprop="datePublished" datetime="$datetime$">$date$</time>
|
||||
$if(author)$
|
||||
by <span itemprop="publisher author" itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name ">$author$</span>
|
||||
</span>
|
||||
$endif$
|
||||
$if(tags)$
|
||||
in $tags$
|
||||
$endif$
|
||||
</div>
|
||||
|
||||
$body$
|
||||
<div itemprop="articleBody">
|
||||
$body$
|
||||
</div>
|
||||
|
||||
<a class="liberapay" href="https://liberapay.com/nek0/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
|
||||
|
||||
<div class="pagination">
|
||||
$if(previousPageNum)$
|
||||
<a rel="prev" class="left" href="$previousPageUrl$"><svg width="1em" height="1em" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 896v128q0 53-32.5 90.5t-84.5 37.5h-704l293 294q38 36 38 90t-38 90l-75 76q-37 37-90 37-52 0-91-37l-651-652q-37-37-37-90 0-52 37-91l651-650q38-38 91-38 52 0 90 38l75 74q38 38 38 91t-38 91l-293 293h704q52 0 84.5 37.5t32.5 90.5z"/></svg>previous post</a>
|
||||
$endif$
|
||||
$if(nextPageNum)$
|
||||
<a rel="next" class="right" href="$nextPageUrl$">next post<svg width="1em" height="1em" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1600 960q0 54-37 91l-651 651q-39 37-91 37-51 0-90-37l-75-75q-38-38-38-91t38-91l293-293h-704q-52 0-84.5-37.5t-32.5-90.5v-128q0-53 32.5-90.5t84.5-37.5h704l-293-294q-38-36-38-90t38-90l75-75q38-38 90-38 53 0 91 38l651 651q37 35 37 90z"/></svg></a>
|
||||
$endif$
|
||||
$if(previousPageNum)$
|
||||
<a rel="prev" class="left" href="$previousPageUrl$"><svg width="1em" height="1em" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 896v128q0 53-32.5 90.5t-84.5 37.5h-704l293 294q38 36 38 90t-38 90l-75 76q-37 37-90 37-52 0-91-37l-651-652q-37-37-37-90 0-52 37-91l651-650q38-38 91-38 52 0 90 38l75 74q38 38 38 91t-38 91l-293 293h704q52 0 84.5 37.5t32.5 90.5z"/></svg>previous post</a>
|
||||
$endif$
|
||||
$if(nextPageNum)$
|
||||
<a rel="next" class="right" href="$nextPageUrl$">next post<svg width="1em" height="1em" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1600 960q0 54-37 91l-651 651q-39 37-91 37-51 0-90-37l-75-75q-38-38-38-91t38-91l293-293h-704q-52 0-84.5-37.5t-32.5-90.5v-128q0-53 32.5-90.5t84.5-37.5h704l-293-294q-38-36-38-90t38-90l75-75q38-38 90-38 53 0 91 38l651 651q37 35 37 90z"/></svg></a>
|
||||
$endif$
|
||||
</div>
|
||||
|
||||
<!--<object id="yacs" seamless data="https://yacs.nek0.eu/comments/$enctitle$"><p>If you see this, something is wrong</p></object>
|
||||
|
|
Loading…
Reference in a new issue