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>
|
||||
$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,14 +1,18 @@
|
|||
<div class="info">
|
||||
Posted on <time datetime="$datetime$">$date$</time>
|
||||
Posted on <time itemprop="datePublished" datetime="$datetime$">$date$</time>
|
||||
$if(author)$
|
||||
by $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>
|
||||
|
||||
<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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue