-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.html
191 lines (168 loc) · 7.34 KB
/
post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
---
layout: default
disqus: false
archive: false
post_class: post-template
---
<!-- Begin Article
================================================== -->
<div class="container">
<div class="row">
<!-- Post Share -->
<div class="col-md-2 pl-0">
{% include share.html %}
</div>
<!-- Post -->
<!--{% assign author = site.authors[page.author] %}-->
{% assign author = site.data['contributors'][page.author] %}
<div class="col-md-9 flex-first flex-md-unordered">
<div class="mainheading">
<!-- Post Title -->
<h1 class="posttitle">{{ page.title }}</h1>
</div>
<!-- Adsense if enabled from _config.yml (change your pub id and slot) -->
{% if site.adsense == "enabled" %}
{% include adsense-under-header.html %}
{% endif %}
<!-- End Adsense -->
<!-- Post Featured Image -->
{% if page.image %}
{% if site.lazyimages == "enabled" %}
<img class="featured-image img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ site.baseurl }}/{{ page.image }}{% endif %}" alt="{{ page.title }}">
{% else %}
<img class="featured-image img-fluid" src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ site.baseurl }}/{{ page.image }}{% endif %}" alt="{{ page.title }}">
{% endif %}
{% endif %}
<!-- End Featured Image -->
<!-- Post Content -->
<div class="article-post">
<!-- Toc if any -->
{% if page.toc %}
{% if page.beforetoc %}
<p><em>{{page.beforetoc}}</em></p>
{% endif %}
<div class="toc mt-4 mb-4 lead">
<h3 class="font-weight-bold">Summary</h3>
{% include toc.html html=content %}
</div>
{% endif %}
<!-- End Toc -->
{{content}}
</div>
<!-- Rating -->
{% if page.rating %}
<div class="rating mb-4 d-flex align-items-center">
<strong class="mr-1">Rating:</strong> {% include star_rating.html %}
</div>
{% endif %}
<!-- Post Date -->
<p>
<small>
<span class="post-date"><time class="post-date" datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time></span>
{% if page.last_modified_at %}
(Updated: <time datetime="{{ page.last_modified_at | date_to_xmlschema }}" itemprop="dateModified">{{ page.last_modified_at | date: "%b %-d, %Y" }}</time>)
{% endif %}
</small>
</p>
<!-- Post Categories -->
<div class="after-post-cats">
<ul class="tags mb-4">
{% assign sortedCategories = page.categories | sort %}
{% for category in sortedCategories %}
<li>
<a class="smoothscroll" href="{{site.baseurl}}/categories#{{ category | replace: " ","-" }}">{{ category }}</a>
</li>
{% endfor %}
</ul>
</div>
<!-- End Categories -->
<!-- Post Tags -->
<div class="after-post-tags">
<ul class="tags">
{% assign sortedTags = page.tags | sort %}
{% for tag in sortedTags %}
<li>
<a class="smoothscroll" href="{{site.baseurl}}/tags#{{ tag | replace: " ","-" }}">#{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
<!-- End Tags -->
<!-- Author Box -->
{% if page.author %}
<div class="row post-top-meta">
<div class="col-xs-12 col-md-3 col-lg-2 text-center text-md-left mb-4 mb-md-0">
{% if author.avatar %}
<img class="author-thumb" src="{{site.baseurl}}/{{ author.avatar }}" alt="{{ author.display_name }}"/>
{% elsif author.github %}
<img class="author-thumb" src="https://avatars.githubusercontent.com/{{ author.github }}" alt="{{ username }}">
{% else %}
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
{% endif %}
<!--
<img class="author-thumb" src="{{site.baseurl}}/{{ author.avatar }}" alt="{{ author.display_name }}">
-->
</div>
<div class="col-xs-12 col-md-9 col-lg-10 text-center text-md-left">
<b>{{ author.display_name }}</b>
{%if author.twitter %}<a target="_blank" href="{{ author.twitter }}" class="btn follow">Twitter</a>{% endif %}
{%if author.github %}<a target="_blank" href="https://github.com/{{ author.github }}" class="btn follow">GitHub</a>{% endif %}
<p class="author-description">{{ author.description }}</p>
</div>
</div>
{% endif %}
<!-- Prev/Next
<div class="row PageNavigation d-flex justify-content-between font-weight-bold">
{% if page.previous.url %}
<a class="prev d-block col-md-6" href="{{ site.baseurl }}/{{page.previous.url}}"> « {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
<a class="next d-block col-md-6 text-lg-right" href="{{ site.baseurl }}/{{page.next.url}}">{{page.next.title}} » </a>
{% endif %}
<div class="clearfix"></div>
</div> -->
<!-- End Categories -->
</div>
<!-- End Post -->
</div>
</div>
<!-- End Article
================================================== -->
<!-- Begin Comments
================================================== -->
{% if page.comments != false %}
<div class="container">
<div id="comments" class="row justify-content-center mb-5">
<div class="col-md-8">
{% include disqus.html %}
</div>
</div>
</div>
{% endif %}
<!--End Comments
================================================== -->
<!-- Review with LD-JSON, adapt it for your needs if you like, but make sure you test the generated HTML source code first:
https://search.google.com/structured-data/testing-tool/u/0/
================================================== -->
{% if page.rating %}
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Review",
"itemReviewed": {
"@type": "Thing",
"name": "{{ page.title }}"
},
"author": {
"@type": "Person",
"name": "{{ author.display_name }}"
},
"datePublished": "{{ page.date | date:"%Y-%m-%d" }}",
"reviewRating": {
"@type": "Rating",
"ratingValue": "{{ page.rating }}",
"bestRating": "5"
}
}
</script>
{% endif %}