layout: default
{% include views/post-header.html %} {{ content }}
{% include views/share-buttons.html %}
<div class=“post-nav”>
{%- if page.previous -%} <a class="previous" href="{{ page.previous.url | relative_url }}" title="{{ page.previous.title | escape }}">{{ page.previous.title | escape | truncatewords: 6 }}</a> {%- else -%} <span></span> {%- endif -%} {%- if page.next -%} <a class="next" href="{{ page.next.url | relative_url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape | truncatewords: 6 }}</a> {%- else -%} <span></span> {%- endif -%}
</div>
<div class=“post-related”>
<div><h3>Related Articles</h3></div> <ol> {% assign posts = site[page.collection] | sample:4 %} {%- for post in posts -%} <li><a class="post-link" href="{{post.url | relative_url}}" title="{{ page.next.title | escape }}">{{ post.title | escape | truncatewords: 12 }}</a></li> {%- endfor -%} </ol>
</div>
<div class=“post-comments”>
{%- if page.comments != false -%} {%- if site.disqus.shortname -%} {%- include extensions/comments/disqus.html -%} {%- endif -%} {%- if site.gitment.username -%} {%- include extensions/comments/gitment.html -%} {%- endif -%} {%- endif -%}
</div>
<link rel=“stylesheet” href=“cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/styles/github.min.css”> <script src=“cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/highlight.min.js”>> <script>
// Init highlight js document.addEventListener('DOMContentLoaded', function(event) { var els = document.querySelectorAll('pre code') function handle(block) { var outer = block.parentElement.parentElement.parentElement; var lang = block.getAttribute('data-lang'); for (var i = 0; i < outer.classList.length; i++) { var cls = outer.classList[i]; if (cls.startsWith('language-')) { lang = cls; break; } } if (!lang) { cls = block.getAttribute('class'); lang = cls ? cls.replace('hljs ', '') : ''; } if (lang.startsWith('language-')) { lang = lang.substr(9); } block.setAttribute('class', 'hljs ' + lang); block.parentNode.setAttribute('data-lang', lang); hljs.highlightBlock(block); } for (var i = 0; i < els.length; i++) { var el = els[i]; handle(el); } });
</script>