pages/_layouts/post.html
Dinesh Natesan 1c52125635
Added Jekyll-Archives (for tags, categories) and Jekyll site-map (#346)
* Add webpage to academic pages list

* adding panelbear analytics

* added categories for projects and horizontal mode display for projects

* rewrote the code to ensure it works properly with current project definitions

* Style adjustments

* added blockquote format, jekyll-archives, tag, year archive pages, and reading time.

* added archive meta to blog posts list and individual posts.

* added sitemap

* stylistic modifications to jekyll-archive addition

* Minor fixes

Co-authored-by: Maruan Al-Shedivat <alshedivat.maruan@gmail.com>
2021-10-30 16:58:42 -04:00

61 lines
2.1 KiB
HTML

---
layout: default
---
{% assign year = page.date | date: "%Y" %}
{% assign tags = page.tags | join: "" %}
{% assign categories = page.categories | join: "" %}
{% if page._styles %}
<style type="text/css">
{{ page._styles }}
</style>
{% endif %}
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<p class="post-meta">{{ page.date | date: "%B %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
<p class="post-tags">
<a href="{{ year | prepend: '/blog/' | prepend: site.baseurl}}"> <i class="fas fa-calendar fa-sm"></i> {{ year }} </a>
{% if tags != "" %}
&nbsp; &middot; &nbsp;
{% for tag in page.tags %}
<a href="{{ tag | prepend: '/blog/tag/' | prepend: site.baseurl}}">
<i class="fas fa-hashtag fa-sm"></i> {{ tag }}</a> &nbsp;
{% endfor %}
{% endif %}
{% if categories != "" %}
&nbsp; &middot; &nbsp;
{% for category in page.categories %}
<a href="{{ category | prepend: '/blog/category/' | prepend: site.baseurl}}">
<i class="fas fa-tag fa-sm"></i> {{ category }}</a> &nbsp;
{% endfor %}
{% endif %}
</p>
</header>
<article class="post-content">
{{ content }}
</article>
{% if site.disqus_shortname and page.comments %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus_shortname }}';
var disqus_identifier = '{{ page.id }}';
var disqus_title = {{ page.title | jsonify }};
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{% endif %}
</div>