circuitpython-org/_layouts/post.html
2018-11-26 16:43:11 -06:00

31 lines
1.1 KiB
HTML

---
layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name"><a href="https://github.com/{{page.author}}">@{{page.author}}</a></span></span>{% endif %}</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
</article>
<script type='text/javascript'>
window.onload = function () {
try {
var headers = document.querySelectorAll('h2');
headers.forEach(function (hdr) {
var id = hdr.id,
title = hdr.innerText,
link = "<a href='#" + id + "' class='header-link'>link</a>";
hdr.innerHTML = title + " " + link;
});
} catch (ex) {
// ignore
}
}
</script>