- Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpost.html
212 lines (187 loc) · 8.35 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
---
layout: default
disqus: false
archive: false
post_class: post-template
---
<!-- Begin Article
================================================== -->
<divclass="container">
<divclass="row">
<!-- Post Share
<div class="col-md-1 pl-0">
{% include share.html %}
</div>
-->
<!-- Post Share -->
<divclass="col-md-3" pl-0>
{% include related_posts_sidebar.html %}
</div>
<!-- Post -->
{% assign author = site.authors[page.author] %}
<divclass="col-md-9 flex-first flex-md-unordered">
<divclass="mainheading">
<!-- Author Box -->
{% if page.author %}
<divclass="row post-top-meta">
<divclass="col-xs-12 col-md-3 col-lg-2 text-center text-md-left mb-4 mb-md-0">
{% if author.avatar %}
<imgclass="author-thumb" src="{{site.baseurl}}/{{ author.avatar }}" alt="{{ author.display_name }}">
{% else %}
<imgclass="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
{% endif %}
</div>
<divclass="col-xs-12 col-md-9 col-lg-10 text-center text-md-left">
<atarget="_blank" class="link-dark" href="{{ author.web }}">{{ author.display_name }}</a><atarget="_blank" href="{{ author.twitter }}" class="btn follow">Follow</a>
<spanclass="author-description">{{ author.description }}</span>
</div>
</div>
{% endif %}
<!-- Post Title -->
<h1class="posttitle">{{ page.title }}</h1>
</div>
{% if page.image %}
{% if site.lazyimages == "enabled" %}
<imgclass="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 %}
<imgclass="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 -->
<divclass="article-post">
<!-- Toc if any -->
{% if page.toc %}
{% if page.beforetoc %}
<p><em>{{page.beforetoc}}</em></p>
{% endif %}
<!-- commented default toc , added colaapsable below
<div class="toc mt-4 mb-4 lead">
<h3 class="font-weight-bold">Summary</h3>
{% include toc.html html=content %}
</div>
-->
<divid="accordion">
<divclass="card">
<divclass="card-header" id="headingTwo">
<h5class="mb-0">
<buttonclass="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Table of Contents ⌄
</button>
</h5>
</div>
<divid="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
<divclass="card-body">
{% include toc.html html=content %}
</div>
</div>
</div>
</div>
{% endif %}
<!-- End Toc -->
{{content}}
<!-- ==============================Related Post include=================================-->
{% include related_posts.html %}
<!-- ==============================Related Post include=================================-->
<!-- ==============================Mailchimp Subscribe Form=============================-->
{% if site.mailchimp-list %}
{% include mailchimp_newsletter_box.html %}
{% endif %}
<!-- =============================End Mailchimp Subscribe Form========================== -->
</div>
<!-- Rating -->
{% if page.rating %}
<divclass="rating mb-4 d-flex align-items-center">
<strongclass="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: <timedatetime="{{ page.last_modified_at | date_to_xmlschema }}" itemprop="dateModified">{{ page.last_modified_at | date: "%b %-d, %Y" }}</time>)
{% endif %}
</small>
</p>
<!-- Post Categories -->
<divclass="after-post-cats">
<ulclass="tags mb-4">
{% assign sortedCategories = page.categories | sort %}
{% for category in sortedCategories %}
<li>
<aclass="smoothscroll" href="{{site.baseurl}}/categories#{{ category | replace: " ","-" }}">{{ category }}</a>
</li>
{% endfor %}
</ul>
</div>
<!-- End Categories -->
<!-- Post Tags -->
<divclass="after-post-tags">
<ulclass="tags">
{% assign sortedTags = page.tags | sort %}
{% for tag in sortedTags %}
<li>
<aclass="smoothscroll" href="{{site.baseurl}}/tags#{{ tag | replace: " ","-" }}">#{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
<!-- End Tags -->
<!-- Prev/Next -->
<divclass="row PageNavigation d-flex justify-content-between font-weight-bold">
{% if page.previous.url %}
<aclass="prev d-block col-md-6" href="{{ site.baseurl }}{{page.previous.url}}"> « {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
<aclass="next d-block col-md-6 text-lg-right" href="{{ site.baseurl }}{{page.next.url}}">{{page.next.title}} » </a>
{% endif %}
<divclass="clearfix"></div>
</div>
<!-- End Categories -->
</div>
<!-- End Post -->
</div>
</div>
<!-- End Article
================================================== -->
<!-- Begin Comments
================================================== -->
{% if page.comments != false %}
<divclass="container">
<divid="comments" class="row justify-content-center mb-5">
<divclass="col-md-3">
</div>
<divclass="col-md-9">
{% 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 %}
<scripttype="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 %}