jekyll-zeta 0.11.3 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/getPostData.js +7 -6
- data/_includes/js_source/getPostData.js +32 -0
- data/_layouts/heatmap.html +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08dec849fc39bbee4b6a2e1a0fe377d0645937bf7d263912fb64a4b853b1a342'
|
4
|
+
data.tar.gz: 5ae031456424f48f154626b9eb07b0556d985a74c1372bb393b2243e8eb0ebfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af352b36818cb6cdb15c4a8f267a39c50b382e561b54b4271dc735ed100f8c94c1d637de0f068399e9f5c0c0bf2242ef378a8611085da6b8ff62bd6368f047d9
|
7
|
+
data.tar.gz: 2af4ddb4caad75314af99e43ba11f5ba225f96dfc889ef23f70c01cfeb1ad8ead5b4b1f312b34ff4cbf55e563502126d50a3b839b259ed15881f6069152ddd9f
|
data/_includes/getPostData.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
/*********** getPostData.js [
|
3
|
+
/*********** getPostData.js [e9ad72fa62] ***********/
|
4
4
|
|
5
|
-
function hm_getPostData(e,t){e=(""+e).substring(0,4);let
|
6
|
-
;let t="_singleyearFlg"+e,
|
7
|
-
;return
|
8
|
-
|
9
|
-
Promise.
|
5
|
+
function hm_getPostData(e,t){e=(""+e).substring(0,4);let r=t.split("/");r.pop();const n=r.join("/");var o=window.__GDATA__;o||(o={},window.__GDATA__);let l=window._y_queue||[];function a(e){if(o[e=""+e])return o[e]
|
6
|
+
;let t="_singleyearFlg"+e,r="_singleyearQueue"+e;if(1==o[t]){let e=o[r];return e||(e=[],o[r]=e),new Promise((t=>{e.push(t)}))}return o[t]=1,fetch(`${n}/${e}.json`).then((e=>e.json())).then((n=>{o[t]=0,o[e]=n;let l=o[r]
|
7
|
+
;return l&&l.length&&(l.forEach((e=>{e(n)})),l.length=0,o[r]=void 0),n})).then((e=>{if(e)for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];Array.isArray(r)&&r.forEach((e=>{const t=e.extra
|
8
|
+
;if(t)for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const n=t[r];e[r]=n}}))}return e})).catch((e=>null))}return window._y_queue=l,function(){let r=""+e,n=""+(Number(r)-1)
|
9
|
+
;return(o._allYear?o._allYear:1==window._isFetchAllYearData?new Promise((e=>{l.push(e)})):(window._isFetchAllYearData=1,fetch(t).then((e=>e.json())).then((e=>(window._isFetchAllYearData=0,l.length&&(l.forEach((t=>{t(e)})),l.length=0),o._allYear=e,
|
10
|
+
e))))).then((e=>{let t=e,o=[];return t[r]&&o.push(a(r)),t[n]&&o.push(a(n)),Promise.all(o).then((e=>{let t={},r=e[0],n=e[1];return r&&r.year&&(t[r.year]=r),n&&n.year&&(t[n.year]=n),Promise.resolve(t)}))}))}()}
|
@@ -66,6 +66,8 @@
|
|
66
66
|
|
67
67
|
|
68
68
|
GDATA[queueFlgKey] = 1;
|
69
|
+
|
70
|
+
|
69
71
|
// console.log('RealQuery',year,Math.random())
|
70
72
|
return fetch(`${jsonUrlBase}/${year}.json`)
|
71
73
|
.then((r) => r.json())
|
@@ -82,6 +84,36 @@
|
|
82
84
|
}
|
83
85
|
|
84
86
|
return d})
|
87
|
+
.then(d=>{
|
88
|
+
/// 将extra 提取出来
|
89
|
+
if(d){
|
90
|
+
for (const key in d ) {
|
91
|
+
if (Object.prototype.hasOwnProperty.call(d , key)) {
|
92
|
+
const element = d [key];
|
93
|
+
|
94
|
+
if (Array.isArray(element)) {
|
95
|
+
console.log(element)
|
96
|
+
element.forEach(postItem=>{
|
97
|
+
const extraItem = postItem.extra;
|
98
|
+
if(!extraItem) return
|
99
|
+
for (const key2 in extraItem) {
|
100
|
+
if (Object.prototype.hasOwnProperty.call(extraItem, key2)) {
|
101
|
+
const extraV = extraItem[key2];
|
102
|
+
postItem[key2] = extraV
|
103
|
+
|
104
|
+
console.log(key2,extraV,postItem)
|
105
|
+
}
|
106
|
+
|
107
|
+
}
|
108
|
+
})
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
return d
|
116
|
+
})
|
85
117
|
.catch((e) => {
|
86
118
|
return null;
|
87
119
|
});
|
data/_layouts/heatmap.html
CHANGED
@@ -30,14 +30,19 @@ generate this page only once。
|
|
30
30
|
{
|
31
31
|
"year":"{{post.name}}",
|
32
32
|
{%- for item0 in itemM %}
|
33
|
-
|
33
|
+
"{{item0.name }}":
|
34
34
|
[
|
35
35
|
{%- for item00 in item0.items -%}
|
36
36
|
{
|
37
37
|
"title":"{{ item00.title | replace: '"', ' '}}",
|
38
38
|
"url":"{{ item00.url | relative_url}}",
|
39
39
|
"date": "{{ item00.date | date:"%Y-%m-%d"}}"
|
40
|
-
|
40
|
+
{%- if item00.extra -%}
|
41
|
+
,
|
42
|
+
"extra":{{ item00.extra | jsonify }}
|
43
|
+
{% endif %}
|
44
|
+
}
|
45
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
41
46
|
{%- endfor -%}
|
42
47
|
]
|
43
48
|
{%- unless forloop.last -%},{%- endunless -%}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-zeta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|