jekyll-theme-abd3lraouf 5.2.4 → 5.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +105 -105
- data/_config.yml +207 -206
- data/_data/assets/cross_origin.yml +62 -62
- data/_data/assets/self_host.yml +51 -51
- data/_data/authors.yml +17 -17
- data/_data/contact.yml +30 -30
- data/_data/locales/bg-BG.yml +83 -83
- data/_data/locales/en.yml +83 -83
- data/_data/locales/es-ES.yml +79 -79
- data/_data/locales/fr-FR.yml +79 -79
- data/_data/locales/hu-HU.yml +81 -81
- data/_data/locales/id-ID.yml +79 -79
- data/_data/locales/ko-KR.yml +79 -79
- data/_data/locales/my-MM.yml +79 -79
- data/_data/locales/pt-BR.yml +79 -79
- data/_data/locales/ru-RU.yml +79 -79
- data/_data/locales/tr-TR.yml +79 -79
- data/_data/locales/uk-UA.yml +79 -79
- data/_data/locales/vi-VN.yml +77 -77
- data/_data/locales/zh-CN.yml +78 -78
- data/_data/share.yml +27 -27
- data/_includes/assets-origin.html +12 -12
- data/_includes/comments/disqus.html +54 -54
- data/_includes/comments/giscus.html +56 -56
- data/_includes/comments/utterances.html +51 -51
- data/_includes/comments.html +5 -5
- data/_includes/datetime.html +21 -21
- data/_includes/favicons.html +17 -17
- data/_includes/footer.html +17 -36
- data/_includes/google-analytics.html +14 -14
- data/_includes/head.html +116 -116
- data/_includes/js-selector.html +104 -104
- data/_includes/jsdelivr-combine.html +32 -32
- data/_includes/lang.html +8 -8
- data/_includes/language-alias.html +70 -70
- data/_includes/mermaid.html +57 -57
- data/_includes/mode-toggle.html +129 -129
- data/_includes/no-linenos.html +10 -10
- data/_includes/post-nav.html +30 -30
- data/_includes/post-paginator.html +88 -88
- data/_includes/post-sharing.html +27 -27
- data/_includes/read-time.html +30 -30
- data/_includes/refactor-content.html +282 -282
- data/_includes/related-posts.html +103 -103
- data/_includes/search-loader.html +46 -46
- data/_includes/search-results.html +11 -11
- data/_includes/sidebar.html +93 -93
- data/_includes/toc.html +16 -16
- data/_includes/topbar.html +70 -70
- data/_includes/trending-tags.html +50 -50
- data/_includes/update-list.html +40 -40
- data/_layouts/archives.html +48 -48
- data/_layouts/categories.html +120 -120
- data/_layouts/category.html +24 -24
- data/_layouts/compress.html +10 -10
- data/_layouts/default.html +74 -74
- data/_layouts/home.html +103 -103
- data/_layouts/page.html +64 -64
- data/_layouts/post.html +159 -159
- data/_layouts/tag.html +23 -23
- data/_layouts/tags.html +23 -23
- data/_plugins/posts-lastmod-hook.rb +14 -14
- data/_sass/addon/commons.scss +1678 -1680
- data/_sass/addon/module.scss +151 -151
- data/_sass/addon/syntax.scss +289 -289
- data/_sass/addon/variables.scss +34 -34
- data/_sass/colors/dark-syntax.scss +88 -88
- data/_sass/colors/dark-typography.scss +157 -157
- data/_sass/colors/light-syntax.scss +84 -84
- data/_sass/colors/light-typography.scss +94 -94
- data/_sass/jekyll-theme-abd3lraouf.scss +1 -1
- data/_sass/layout/archives.scss +147 -147
- data/_sass/layout/categories.scss +67 -67
- data/_sass/layout/category-tag.scss +73 -73
- data/_sass/layout/home.scss +184 -184
- data/_sass/layout/post.scss +369 -369
- data/_sass/layout/tags.scss +19 -19
- data/_sass/variables-hook.scss +3 -3
- data/_tabs/about.md +8 -8
- data/_tabs/archives.md +7 -7
- data/_tabs/categories.md +6 -6
- data/_tabs/tags.md +6 -6
- data/assets/404.html +16 -16
- data/assets/css/style.scss +12 -12
- data/assets/feed.xml +61 -61
- data/assets/img/favicons/browserconfig.xml +13 -13
- data/assets/img/favicons/site.webmanifest +26 -26
- data/assets/js/data/search.json +18 -18
- data/assets/js/data/swcache.js +55 -55
- data/assets/js/dist/categories.min.js +1 -1
- data/assets/js/dist/commons.min.js +1 -1
- data/assets/js/dist/home.min.js +1 -1
- data/assets/js/dist/misc.min.js +1 -1
- data/assets/js/dist/page.min.js +1 -1
- data/assets/js/dist/post.min.js +1 -1
- data/assets/js/dist/pvreport.min.js +1 -1
- data/assets/js/pwa/app.js +47 -47
- data/assets/js/pwa/sw.js +89 -89
- data/assets/js/pwa/unregister.js +12 -12
- data/assets/robots.txt +10 -10
- data/index.html +4 -4
- metadata +7 -7
data/_layouts/post.html
CHANGED
@@ -1,159 +1,159 @@
|
|
1
|
-
---
|
2
|
-
layout: page
|
3
|
-
refactor: true
|
4
|
-
pannel_includes:
|
5
|
-
- toc
|
6
|
-
tail_includes:
|
7
|
-
- related-posts
|
8
|
-
- post-nav
|
9
|
-
- comments
|
10
|
-
---
|
11
|
-
|
12
|
-
{% include lang.html %}
|
13
|
-
|
14
|
-
<h1 data-toc-skip>{{ page.title }}</h1>
|
15
|
-
|
16
|
-
<div class="post-meta text-muted">
|
17
|
-
<!-- published date -->
|
18
|
-
<span>
|
19
|
-
{{ site.data.locales[lang].post.posted }}
|
20
|
-
{% include datetime.html date=page.date tooltip=true %}
|
21
|
-
</span>
|
22
|
-
|
23
|
-
<!-- lastmod date -->
|
24
|
-
{% if page.last_modified_at %}
|
25
|
-
<span>
|
26
|
-
{{ site.data.locales[lang].post.updated }}
|
27
|
-
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
28
|
-
</span>
|
29
|
-
{% endif %}
|
30
|
-
|
31
|
-
{% if page.image.path %}
|
32
|
-
{% capture bg %}
|
33
|
-
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
|
34
|
-
{% endcapture %}
|
35
|
-
|
36
|
-
<div class="mt-3 mb-3">
|
37
|
-
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
|
38
|
-
alt="{{ page.image.alt | default: "Preview Image" }}"
|
39
|
-
|
40
|
-
{% if page.image.width %}
|
41
|
-
width="{{ page.image.width }}"
|
42
|
-
{% elsif page.image.w %}
|
43
|
-
width="{{ page.image.w }}"
|
44
|
-
{% endif %}
|
45
|
-
|
46
|
-
{% if page.image.height %}
|
47
|
-
height="{{ page.image.height }}"
|
48
|
-
{% elsif page.image.h %}
|
49
|
-
height="{{ page.image.h }}"
|
50
|
-
{% endif %}>
|
51
|
-
|
52
|
-
{% if page.image.alt %}
|
53
|
-
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
54
|
-
{% endif %}
|
55
|
-
|
56
|
-
</div>
|
57
|
-
{% endif %}
|
58
|
-
|
59
|
-
<div class="d-flex justify-content-between">
|
60
|
-
<!-- author -->
|
61
|
-
<span>
|
62
|
-
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
63
|
-
{% assign author_link = nil %}
|
64
|
-
|
65
|
-
{% if page.author %}
|
66
|
-
{% assign author_link = site.data.authors[page.author].url %}
|
67
|
-
{% elsif author_name == site.social.name %}
|
68
|
-
{% assign author_link = site.social.links[0] %}
|
69
|
-
{% endif %}
|
70
|
-
|
71
|
-
{{ site.data.locales[lang].post.written_by }}
|
72
|
-
|
73
|
-
<em>
|
74
|
-
{% if author_link %}
|
75
|
-
<a href="{{ author_link }}">{{ author_name }}</a>
|
76
|
-
{% else %}
|
77
|
-
{{ author_name }}
|
78
|
-
{% endif %}
|
79
|
-
</em>
|
80
|
-
</span>
|
81
|
-
|
82
|
-
<div>
|
83
|
-
<!-- page views -->
|
84
|
-
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
85
|
-
<span>
|
86
|
-
<em id="pv" class="pageviews">
|
87
|
-
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
88
|
-
</em>
|
89
|
-
{{ site.data.locales[lang].post.pageview_measure }}
|
90
|
-
</span>
|
91
|
-
{% endif %}
|
92
|
-
|
93
|
-
<!-- read time -->
|
94
|
-
{% include read-time.html content=content prompt=true %}
|
95
|
-
</div>
|
96
|
-
|
97
|
-
</div> <!-- .d-flex -->
|
98
|
-
|
99
|
-
</div> <!-- .post-meta -->
|
100
|
-
|
101
|
-
<div class="post-content">
|
102
|
-
<!-- extract excerpt-block from content -->
|
103
|
-
{% assign contentParts = content | split: "<!-- excerpt-end -->" %}
|
104
|
-
<!-- check if the excerpt tag exists -->
|
105
|
-
{% if contentParts.size == 1 %}
|
106
|
-
{{ content }}
|
107
|
-
{% else %}
|
108
|
-
{{ contentParts[1] }}
|
109
|
-
{% endif %}
|
110
|
-
</div>
|
111
|
-
|
112
|
-
<div class="post-tail-wrapper text-muted">
|
113
|
-
|
114
|
-
<!-- categories -->
|
115
|
-
{% if page.categories.size > 0 %}
|
116
|
-
<div class="post-meta mb-3">
|
117
|
-
<i class="far fa-folder-open fa-fw mr-1"></i>
|
118
|
-
{% for category in page.categories %}
|
119
|
-
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
120
|
-
{%- unless forloop.last -%}, {%- endunless -%}
|
121
|
-
{% endfor %}
|
122
|
-
</div>
|
123
|
-
{% endif %}
|
124
|
-
|
125
|
-
<!-- tags -->
|
126
|
-
{% if page.tags.size > 0 %}
|
127
|
-
<div class="post-tags">
|
128
|
-
<i class="fa fa-tags fa-fw mr-1"></i>
|
129
|
-
{% for tag in page.tags %}
|
130
|
-
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
131
|
-
class="post-tag no-text-decoration" >
|
132
|
-
{{- tag -}}
|
133
|
-
</a>
|
134
|
-
{% endfor %}
|
135
|
-
</div>
|
136
|
-
{% endif %}
|
137
|
-
|
138
|
-
<div class="post-tail-bottom
|
139
|
-
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
140
|
-
<div class="license-wrapper">
|
141
|
-
|
142
|
-
{% if site.data.locales[lang].copyright.license.template %}
|
143
|
-
|
144
|
-
{% capture _replacement %}
|
145
|
-
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
146
|
-
{{ site.data.locales[lang].copyright.license.name }}
|
147
|
-
</a>
|
148
|
-
{% endcapture %}
|
149
|
-
|
150
|
-
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
151
|
-
|
152
|
-
{% endif %}
|
153
|
-
</div>
|
154
|
-
|
155
|
-
{% include post-sharing.html %}
|
156
|
-
|
157
|
-
</div><!-- .post-tail-bottom -->
|
158
|
-
|
159
|
-
</div><!-- div.post-tail-wrapper -->
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
refactor: true
|
4
|
+
pannel_includes:
|
5
|
+
- toc
|
6
|
+
tail_includes:
|
7
|
+
- related-posts
|
8
|
+
- post-nav
|
9
|
+
- comments
|
10
|
+
---
|
11
|
+
|
12
|
+
{% include lang.html %}
|
13
|
+
|
14
|
+
<h1 data-toc-skip>{{ page.title }}</h1>
|
15
|
+
|
16
|
+
<div class="post-meta text-muted">
|
17
|
+
<!-- published date -->
|
18
|
+
<span>
|
19
|
+
{{ site.data.locales[lang].post.posted }}
|
20
|
+
{% include datetime.html date=page.date tooltip=true %}
|
21
|
+
</span>
|
22
|
+
|
23
|
+
<!-- lastmod date -->
|
24
|
+
{% if page.last_modified_at %}
|
25
|
+
<span>
|
26
|
+
{{ site.data.locales[lang].post.updated }}
|
27
|
+
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
28
|
+
</span>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% if page.image.path %}
|
32
|
+
{% capture bg %}
|
33
|
+
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
|
34
|
+
{% endcapture %}
|
35
|
+
|
36
|
+
<div class="mt-3 mb-3">
|
37
|
+
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
|
38
|
+
alt="{{ page.image.alt | default: "Preview Image" }}"
|
39
|
+
|
40
|
+
{% if page.image.width %}
|
41
|
+
width="{{ page.image.width }}"
|
42
|
+
{% elsif page.image.w %}
|
43
|
+
width="{{ page.image.w }}"
|
44
|
+
{% endif %}
|
45
|
+
|
46
|
+
{% if page.image.height %}
|
47
|
+
height="{{ page.image.height }}"
|
48
|
+
{% elsif page.image.h %}
|
49
|
+
height="{{ page.image.h }}"
|
50
|
+
{% endif %}>
|
51
|
+
|
52
|
+
{% if page.image.alt %}
|
53
|
+
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
54
|
+
{% endif %}
|
55
|
+
|
56
|
+
</div>
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
<div class="d-flex justify-content-between">
|
60
|
+
<!-- author -->
|
61
|
+
<span>
|
62
|
+
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
63
|
+
{% assign author_link = nil %}
|
64
|
+
|
65
|
+
{% if page.author %}
|
66
|
+
{% assign author_link = site.data.authors[page.author].url %}
|
67
|
+
{% elsif author_name == site.social.name %}
|
68
|
+
{% assign author_link = site.social.links[0] %}
|
69
|
+
{% endif %}
|
70
|
+
|
71
|
+
{{ site.data.locales[lang].post.written_by }}
|
72
|
+
|
73
|
+
<em>
|
74
|
+
{% if author_link %}
|
75
|
+
<a href="{{ author_link }}">{{ author_name }}</a>
|
76
|
+
{% else %}
|
77
|
+
{{ author_name }}
|
78
|
+
{% endif %}
|
79
|
+
</em>
|
80
|
+
</span>
|
81
|
+
|
82
|
+
<div>
|
83
|
+
<!-- page views -->
|
84
|
+
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
85
|
+
<span>
|
86
|
+
<em id="pv" class="pageviews">
|
87
|
+
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
88
|
+
</em>
|
89
|
+
{{ site.data.locales[lang].post.pageview_measure }}
|
90
|
+
</span>
|
91
|
+
{% endif %}
|
92
|
+
|
93
|
+
<!-- read time -->
|
94
|
+
{% include read-time.html content=content prompt=true %}
|
95
|
+
</div>
|
96
|
+
|
97
|
+
</div> <!-- .d-flex -->
|
98
|
+
|
99
|
+
</div> <!-- .post-meta -->
|
100
|
+
|
101
|
+
<div class="post-content">
|
102
|
+
<!-- extract excerpt-block from content -->
|
103
|
+
{% assign contentParts = content | split: "<!-- excerpt-end -->" %}
|
104
|
+
<!-- check if the excerpt tag exists -->
|
105
|
+
{% if contentParts.size == 1 %}
|
106
|
+
{{ content }}
|
107
|
+
{% else %}
|
108
|
+
{{ contentParts[1] }}
|
109
|
+
{% endif %}
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div class="post-tail-wrapper text-muted">
|
113
|
+
|
114
|
+
<!-- categories -->
|
115
|
+
{% if page.categories.size > 0 %}
|
116
|
+
<div class="post-meta mb-3">
|
117
|
+
<i class="far fa-folder-open fa-fw mr-1"></i>
|
118
|
+
{% for category in page.categories %}
|
119
|
+
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
120
|
+
{%- unless forloop.last -%}, {%- endunless -%}
|
121
|
+
{% endfor %}
|
122
|
+
</div>
|
123
|
+
{% endif %}
|
124
|
+
|
125
|
+
<!-- tags -->
|
126
|
+
{% if page.tags.size > 0 %}
|
127
|
+
<div class="post-tags">
|
128
|
+
<i class="fa fa-tags fa-fw mr-1"></i>
|
129
|
+
{% for tag in page.tags %}
|
130
|
+
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
131
|
+
class="post-tag no-text-decoration" >
|
132
|
+
{{- tag -}}
|
133
|
+
</a>
|
134
|
+
{% endfor %}
|
135
|
+
</div>
|
136
|
+
{% endif %}
|
137
|
+
|
138
|
+
<div class="post-tail-bottom
|
139
|
+
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
140
|
+
<div class="license-wrapper">
|
141
|
+
|
142
|
+
{% if site.data.locales[lang].copyright.license.template %}
|
143
|
+
|
144
|
+
{% capture _replacement %}
|
145
|
+
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
146
|
+
{{ site.data.locales[lang].copyright.license.name }}
|
147
|
+
</a>
|
148
|
+
{% endcapture %}
|
149
|
+
|
150
|
+
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
151
|
+
|
152
|
+
{% endif %}
|
153
|
+
</div>
|
154
|
+
|
155
|
+
{% include post-sharing.html %}
|
156
|
+
|
157
|
+
</div><!-- .post-tail-bottom -->
|
158
|
+
|
159
|
+
</div><!-- div.post-tail-wrapper -->
|
data/_layouts/tag.html
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
---
|
2
|
-
layout: page
|
3
|
-
# The layout for Tag page
|
4
|
-
---
|
5
|
-
|
6
|
-
{% include lang.html %}
|
7
|
-
|
8
|
-
<div id="page-tag">
|
9
|
-
<h1 class="pl-lg-2">
|
10
|
-
<i class="fa fa-tag fa-fw text-muted"></i>
|
11
|
-
{{ page.title }}
|
12
|
-
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
13
|
-
</h1>
|
14
|
-
<ul class="post-content pl-0">
|
15
|
-
{% for post in page.posts %}
|
16
|
-
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
17
|
-
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
18
|
-
<span class="dash flex-grow-1"></span>
|
19
|
-
{% include datetime.html date=post.date wrap='span' class='text-muted small' %}
|
20
|
-
</li>
|
21
|
-
{% endfor %}
|
22
|
-
</ul>
|
23
|
-
</div>
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# The layout for Tag page
|
4
|
+
---
|
5
|
+
|
6
|
+
{% include lang.html %}
|
7
|
+
|
8
|
+
<div id="page-tag">
|
9
|
+
<h1 class="pl-lg-2">
|
10
|
+
<i class="fa fa-tag fa-fw text-muted"></i>
|
11
|
+
{{ page.title }}
|
12
|
+
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
13
|
+
</h1>
|
14
|
+
<ul class="post-content pl-0">
|
15
|
+
{% for post in page.posts %}
|
16
|
+
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
17
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
18
|
+
<span class="dash flex-grow-1"></span>
|
19
|
+
{% include datetime.html date=post.date wrap='span' class='text-muted small' %}
|
20
|
+
</li>
|
21
|
+
{% endfor %}
|
22
|
+
</ul>
|
23
|
+
</div>
|
data/_layouts/tags.html
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
---
|
2
|
-
layout: page
|
3
|
-
# All the Tags of posts.
|
4
|
-
---
|
5
|
-
|
6
|
-
<div id="tags" class="d-flex flex-wrap ml-xl-2 mr-xl-2">
|
7
|
-
|
8
|
-
{% assign tags = "" | split: "" %}
|
9
|
-
{% for t in site.tags %}
|
10
|
-
{% assign tags = tags | push: t[0] %}
|
11
|
-
{% endfor %}
|
12
|
-
|
13
|
-
{% assign sorted_tags = tags | sort_natural %}
|
14
|
-
|
15
|
-
{% for t in sorted_tags %}
|
16
|
-
<div>
|
17
|
-
<a class="tag" href="{{ t | slugify | url_encode | prepend: '/tags/' | append: '/' | relative_url }}">
|
18
|
-
{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span>
|
19
|
-
</a>
|
20
|
-
</div>
|
21
|
-
{% endfor %}
|
22
|
-
|
23
|
-
</div>
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
# All the Tags of posts.
|
4
|
+
---
|
5
|
+
|
6
|
+
<div id="tags" class="d-flex flex-wrap ml-xl-2 mr-xl-2">
|
7
|
+
|
8
|
+
{% assign tags = "" | split: "" %}
|
9
|
+
{% for t in site.tags %}
|
10
|
+
{% assign tags = tags | push: t[0] %}
|
11
|
+
{% endfor %}
|
12
|
+
|
13
|
+
{% assign sorted_tags = tags | sort_natural %}
|
14
|
+
|
15
|
+
{% for t in sorted_tags %}
|
16
|
+
<div>
|
17
|
+
<a class="tag" href="{{ t | slugify | url_encode | prepend: '/tags/' | append: '/' | relative_url }}">
|
18
|
+
{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span>
|
19
|
+
</a>
|
20
|
+
</div>
|
21
|
+
{% endfor %}
|
22
|
+
|
23
|
+
</div>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Check for changed posts
|
4
|
-
|
5
|
-
Jekyll::Hooks.register :posts, :post_init do |post|
|
6
|
-
|
7
|
-
commit_num = `git rev-list --count HEAD "#{ post.path }"`
|
8
|
-
|
9
|
-
if commit_num.to_i > 1
|
10
|
-
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
|
11
|
-
post.data['last_modified_at'] = lastmod_date
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Check for changed posts
|
4
|
+
|
5
|
+
Jekyll::Hooks.register :posts, :post_init do |post|
|
6
|
+
|
7
|
+
commit_num = `git rev-list --count HEAD "#{ post.path }"`
|
8
|
+
|
9
|
+
if commit_num.to_i > 1
|
10
|
+
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
|
11
|
+
post.data['last_modified_at'] = lastmod_date
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|