mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Compare commits
1355 Commits
v2.0.2
...
cache-incl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c5399b947 | ||
|
|
0d6064b1a1 | ||
|
|
32ff033f9f | ||
|
|
d47b882af2 | ||
|
|
2f4e5fa28b | ||
|
|
c4d617e6aa | ||
|
|
f95d0ba840 | ||
|
|
502fd94f2c | ||
|
|
c58ac78a5e | ||
|
|
7655b533c9 | ||
|
|
620115a986 | ||
|
|
1ca06e70d3 | ||
|
|
919d37fb37 | ||
|
|
f7dafb1f04 | ||
|
|
6504645c60 | ||
|
|
fc0ea20a85 | ||
|
|
b20a175c27 | ||
|
|
2f06f4aad7 | ||
|
|
ff3fa84b8a | ||
|
|
7f370cb82f | ||
|
|
51951c43e8 | ||
|
|
a88f2567f7 | ||
|
|
d159684f87 | ||
|
|
d29dd11ae3 | ||
|
|
8d968ebae0 | ||
|
|
86f7196ef5 | ||
|
|
064d6de48d | ||
|
|
21bd3e6c5a | ||
|
|
07bd3a3759 | ||
|
|
e40e12fabd | ||
|
|
a098dc80cd | ||
|
|
419aaba07c | ||
|
|
7cd5847826 | ||
|
|
9109da32f9 | ||
|
|
7bcf8d689e | ||
|
|
f66862c508 | ||
|
|
cb95a72f5a | ||
|
|
9b81f29625 | ||
|
|
5e10958faa | ||
|
|
7f034f51e3 | ||
|
|
1fc99bdd97 | ||
|
|
7fc47bfc43 | ||
|
|
b2146e8659 | ||
|
|
e0a011c917 | ||
|
|
63ec07a062 | ||
|
|
5f03314d85 | ||
|
|
442deb6a7e | ||
|
|
d7d7d924f7 | ||
|
|
35a5af783a | ||
|
|
a6781bda30 | ||
|
|
bab7ef4b1d | ||
|
|
6f7ea381b3 | ||
|
|
612eb737a5 | ||
|
|
191c2279d2 | ||
|
|
e39dfa3f0b | ||
|
|
5af7694f3b | ||
|
|
6e5850c6ab | ||
|
|
be23e18555 | ||
|
|
928be16fab | ||
|
|
eac3ac095f | ||
|
|
aa4beda868 | ||
|
|
1fad3a074f | ||
|
|
0fe2094dd2 | ||
|
|
c576d23908 | ||
|
|
8c19a6f430 | ||
|
|
ac41312c5d | ||
|
|
232a58d5b4 | ||
|
|
0c0aea3ad7 | ||
|
|
657b16519e | ||
|
|
f81601ee53 | ||
|
|
b6641be8ef | ||
|
|
a8ec9cd507 | ||
|
|
2f8248a6f1 | ||
|
|
0eb2796a66 | ||
|
|
e120c255ff | ||
|
|
990a9e6e6d | ||
|
|
c24c6b7f3d | ||
|
|
039c521e8c | ||
|
|
d35af9c1f3 | ||
|
|
f6bff6fb61 | ||
|
|
a103898980 | ||
|
|
3957efac15 | ||
|
|
38309569c4 | ||
|
|
8bfc696569 | ||
|
|
b68dd3a5cb | ||
|
|
3940e1e9df | ||
|
|
70a331d854 | ||
|
|
5bf1596414 | ||
|
|
3234041510 | ||
|
|
37631eefac | ||
|
|
82b1ad0552 | ||
|
|
2c2347fac1 | ||
|
|
0aa61f66a8 | ||
|
|
b1a517ccb6 | ||
|
|
4070143d5b | ||
|
|
6e4e290ab0 | ||
|
|
d6995d347a | ||
|
|
52085d2e34 | ||
|
|
f3a274377a | ||
|
|
0fcba080c3 | ||
|
|
922ba5d0ea | ||
|
|
cb2eea0e41 | ||
|
|
8284714d8a | ||
|
|
aaf6f28fde | ||
|
|
7227ad4ebb | ||
|
|
c3e47437a3 | ||
|
|
76301722e9 | ||
|
|
d05df326b9 | ||
|
|
dc12bd3023 | ||
|
|
878c689f76 | ||
|
|
68a7ebf2ee | ||
|
|
63ed335463 | ||
|
|
fe14434f8d | ||
|
|
a069ad77c0 | ||
|
|
5343fc3b54 | ||
|
|
2dad0d3304 | ||
|
|
f789168522 | ||
|
|
7656b9d295 | ||
|
|
176dc3cef7 | ||
|
|
360412364e | ||
|
|
49115dbdab | ||
|
|
383a0d0aa7 | ||
|
|
b735170ceb | ||
|
|
59acdaab9a | ||
|
|
12651c19e5 | ||
|
|
1694f8609c | ||
|
|
e80469b7b0 | ||
|
|
032139bd2f | ||
|
|
6deed4c66b | ||
|
|
253bcc2faf | ||
|
|
43a28aed96 | ||
|
|
5d9662f80f | ||
|
|
ed9cc80ff9 | ||
|
|
9b6eeba81e | ||
|
|
40e4c031e3 | ||
|
|
f80dc07f82 | ||
|
|
52f0b36558 | ||
|
|
f8af94431d | ||
|
|
89bdd47ebc | ||
|
|
2c85f4ef24 | ||
|
|
c8fc567c8d | ||
|
|
460dd81fe1 | ||
|
|
7c8c41f0d7 | ||
|
|
3b57879e71 | ||
|
|
19527b47ab | ||
|
|
8298733e67 | ||
|
|
64b0102686 | ||
|
|
bfab00a65a | ||
|
|
fea79dcbab | ||
|
|
b4bc3b0aa0 | ||
|
|
ac7f592839 | ||
|
|
4ccf9ea683 | ||
|
|
7de9433fbc | ||
|
|
9c8acdd3ea | ||
|
|
e9904fd44b | ||
|
|
ba9a309572 | ||
|
|
d0e12d69bc | ||
|
|
75cf2d73f6 | ||
|
|
974fab6c9c | ||
|
|
2a37f459d4 | ||
|
|
5a554572e3 | ||
|
|
a701e59c07 | ||
|
|
b6d81c58df | ||
|
|
4776b27ff3 | ||
|
|
87d08ec827 | ||
|
|
229303bbc8 | ||
|
|
8603738a89 | ||
|
|
932cd3b575 | ||
|
|
02f281eef3 | ||
|
|
8a257aca6b | ||
|
|
588f21f5cd | ||
|
|
0662d31bf6 | ||
|
|
a6f8b6c7d6 | ||
|
|
e51f94a038 | ||
|
|
1aa5c7a820 | ||
|
|
37af23b5d7 | ||
|
|
df87a51ade | ||
|
|
2a138e4ca9 | ||
|
|
e546eb3e9f | ||
|
|
d250efccb9 | ||
|
|
dc30114605 | ||
|
|
2a5cf11ee2 | ||
|
|
e23a74aad9 | ||
|
|
5b77d02e3b | ||
|
|
c2b24e82e5 | ||
|
|
10030ae8cd | ||
|
|
75c5c16297 | ||
|
|
ef53e677a4 | ||
|
|
03d9396b85 | ||
|
|
4acf343fea | ||
|
|
665178d210 | ||
|
|
b1bba1945a | ||
|
|
8ed6c7b077 | ||
|
|
9a94829bcb | ||
|
|
d17b80bf2a | ||
|
|
ac03af3229 | ||
|
|
fe6bfc6f1b | ||
|
|
d438362971 | ||
|
|
842470b0c4 | ||
|
|
11917645f2 | ||
|
|
cb8a4b4d62 | ||
|
|
a75ed0b33d | ||
|
|
58511822e6 | ||
|
|
876253edce | ||
|
|
0f669ba9b1 | ||
|
|
a9a21e6572 | ||
|
|
3b05b0d867 | ||
|
|
b16d47a444 | ||
|
|
d2d3087d3b | ||
|
|
b9a4cf0485 | ||
|
|
848e402937 | ||
|
|
c0951b0a19 | ||
|
|
3592284969 | ||
|
|
0f458edf2b | ||
|
|
1adf8974bf | ||
|
|
da443039e1 | ||
|
|
4aee950418 | ||
|
|
9e454d24a0 | ||
|
|
5185c8d72b | ||
|
|
6f9d28f398 | ||
|
|
2195e5e469 | ||
|
|
60202782ea | ||
|
|
32b14d6402 | ||
|
|
22275e571d | ||
|
|
4142630614 | ||
|
|
3d8368fa4f | ||
|
|
687b9cdf19 | ||
|
|
ecca3accdc | ||
|
|
5aa747e99a | ||
|
|
b5a32a6d46 | ||
|
|
426f2a79fc | ||
|
|
d9cdc7992a | ||
|
|
829133cf98 | ||
|
|
27362a1984 | ||
|
|
3014fbd344 | ||
|
|
596b9e0785 | ||
|
|
39c9fb120f | ||
|
|
314fb875b5 | ||
|
|
3b40d964fb | ||
|
|
a48379a715 | ||
|
|
d4c15efff9 | ||
|
|
2a41945014 | ||
|
|
dc248345a9 | ||
|
|
b6f3adb6e3 | ||
|
|
472c18e409 | ||
|
|
e42f5ac2dc | ||
|
|
06750b8502 | ||
|
|
bd907c5be6 | ||
|
|
c79fe1125c | ||
|
|
20f0940455 | ||
|
|
84cef2202d | ||
|
|
eaa132c65b | ||
|
|
2d31d07602 | ||
|
|
d99814baa5 | ||
|
|
ab05a2cd4f | ||
|
|
db8163b6e8 | ||
|
|
22d11bef2d | ||
|
|
70159ac8cb | ||
|
|
5eb300043f | ||
|
|
95b62e564b | ||
|
|
ad745702ca | ||
|
|
4b0089712e | ||
|
|
264caac94c | ||
|
|
58180b1ac1 | ||
|
|
067f8b6be7 | ||
|
|
4df73ced0d | ||
|
|
c7603f3ebf | ||
|
|
ae7f10b922 | ||
|
|
023e4e6ceb | ||
|
|
742893410c | ||
|
|
c1aba46a1e | ||
|
|
23712cf4dc | ||
|
|
21de59a90e | ||
|
|
e11fb4d427 | ||
|
|
328fbd83d4 | ||
|
|
ffe7860625 | ||
|
|
5b54f78875 | ||
|
|
989c70fe4a | ||
|
|
2f4448eab6 | ||
|
|
90bdcaddb7 | ||
|
|
a0afa19e9a | ||
|
|
7918dad26f | ||
|
|
13bb7360c0 | ||
|
|
5d23760280 | ||
|
|
5a350788e7 | ||
|
|
e543fedf3f | ||
|
|
b02a5ba76a | ||
|
|
5a288e7de4 | ||
|
|
8ee1b2a1fd | ||
|
|
b0a7f9c8c9 | ||
|
|
519b60d012 | ||
|
|
0ad2c338c4 | ||
|
|
34de676713 | ||
|
|
01b11d098e | ||
|
|
1b68a29f29 | ||
|
|
18930b01f6 | ||
|
|
b29fd6d380 | ||
|
|
9a15a09028 | ||
|
|
774c65a869 | ||
|
|
a822219086 | ||
|
|
2ec1dc1831 | ||
|
|
50d0fc3c85 | ||
|
|
90cddade53 | ||
|
|
2ee8d690c4 | ||
|
|
ca40c771d0 | ||
|
|
0c6137b2d3 | ||
|
|
4bccbdead4 | ||
|
|
8d02c5cd94 | ||
|
|
68e9c84a18 | ||
|
|
f7b1782294 | ||
|
|
2690c045ec | ||
|
|
656e772388 | ||
|
|
817f6cb658 | ||
|
|
179b5ab193 | ||
|
|
b4a2788626 | ||
|
|
3762878381 | ||
|
|
9cbc24fce5 | ||
|
|
4078bde3ba | ||
|
|
3b634134a0 | ||
|
|
461e16f8bc | ||
|
|
0bc88975c8 | ||
|
|
98182aab4a | ||
|
|
3a3be7e5a7 | ||
|
|
7e1cc4b684 | ||
|
|
0f2a3a606b | ||
|
|
314dce62cf | ||
|
|
bd72265e74 | ||
|
|
ab8441259e | ||
|
|
ccd1941378 | ||
|
|
4272537f69 | ||
|
|
23f4c5804c | ||
|
|
a16dfef840 | ||
|
|
e1f7139b9c | ||
|
|
f9e249ae20 | ||
|
|
81f4abdbcd | ||
|
|
9a82b474aa | ||
|
|
57ca3a04d5 | ||
|
|
257f852b96 | ||
|
|
8dcf7a6680 | ||
|
|
02e53fb6ff | ||
|
|
485f7634bd | ||
|
|
0fc256dbef | ||
|
|
3fb1356593 | ||
|
|
cd9d38c5ea | ||
|
|
0fe1d0686a | ||
|
|
4e8ebd999a | ||
|
|
578f38748d | ||
|
|
ae01b1d5df | ||
|
|
5cb0aee251 | ||
|
|
2eb318a929 | ||
|
|
ab3f27e674 | ||
|
|
e028d50b3f | ||
|
|
a30498ba42 | ||
|
|
7c05312d5c | ||
|
|
7e37892bbd | ||
|
|
4e07dfef1f | ||
|
|
0511ece2f5 | ||
|
|
1395d5686b | ||
|
|
3227c4ecea | ||
|
|
b9c4fc93d7 | ||
|
|
95e96a0f83 | ||
|
|
c92ad3b595 | ||
|
|
3285aebd4f | ||
|
|
9cc3085dd0 | ||
|
|
5b37ad57cc | ||
|
|
3dedcbf894 | ||
|
|
2ca2990f6b | ||
|
|
7fd9f102c0 | ||
|
|
cc3a31e363 | ||
|
|
5ed4638400 | ||
|
|
a64e7e8814 | ||
|
|
6723db8157 | ||
|
|
996db6912d | ||
|
|
c77d06446d | ||
|
|
68c0e8f847 | ||
|
|
4b4a46579a | ||
|
|
c95f4c0f5b | ||
|
|
078b2785e4 | ||
|
|
1d726a87b9 | ||
|
|
90b6723288 | ||
|
|
a9d7031e7c | ||
|
|
db220a9de6 | ||
|
|
9f5835871b | ||
|
|
b62415019b | ||
|
|
00d29e7e77 | ||
|
|
5b5a25a03a | ||
|
|
be3d723d73 | ||
|
|
7cad48a3ee | ||
|
|
b564214535 | ||
|
|
63a6d595c4 | ||
|
|
22cc393cd4 | ||
|
|
0400ffe377 | ||
|
|
b07cbcecbd | ||
|
|
626706c8c5 | ||
|
|
a7c0fffcec | ||
|
|
73ca205a5c | ||
|
|
4942b2947b | ||
|
|
fbe98df488 | ||
|
|
44c9f81921 | ||
|
|
681d71ac04 | ||
|
|
3902e373d8 | ||
|
|
ce8d8d929c | ||
|
|
3994d9116d | ||
|
|
c2caaeaf11 | ||
|
|
56ac50c568 | ||
|
|
25d77cb05a | ||
|
|
70174e8831 | ||
|
|
f6ea8b4d50 | ||
|
|
9083511de3 | ||
|
|
8cc07231df | ||
|
|
94a1330d61 | ||
|
|
13919b4f3c | ||
|
|
8fe9c76d08 | ||
|
|
d674305092 | ||
|
|
ac1d1a4053 | ||
|
|
66578b0c90 | ||
|
|
a84af462d4 | ||
|
|
ceaa2eb267 | ||
|
|
ec0e1dcb14 | ||
|
|
fb435c2c7e | ||
|
|
ba31c5c387 | ||
|
|
5ea3286b09 | ||
|
|
b0c0fbd70b | ||
|
|
28bb15d4ee | ||
|
|
1db62cca9e | ||
|
|
ad9a656d8d | ||
|
|
cae5958362 | ||
|
|
f0e22be32b | ||
|
|
6657e374b2 | ||
|
|
b965d44b5f | ||
|
|
1ccd2156c5 | ||
|
|
8e481cdf8e | ||
|
|
7aa43f37fb | ||
|
|
2a83bdccd5 | ||
|
|
97ed8622c7 | ||
|
|
7a2f7a569b | ||
|
|
aed5554a1b | ||
|
|
961a3504ba | ||
|
|
592cee9596 | ||
|
|
7869586e43 | ||
|
|
42a8dba642 | ||
|
|
98b5ff0d17 | ||
|
|
dd25ca30d4 | ||
|
|
d57d248152 | ||
|
|
314f476d11 | ||
|
|
0e6dc41db5 | ||
|
|
1b923fb504 | ||
|
|
7539e2109b | ||
|
|
4a5f70b315 | ||
|
|
bec32b14cb | ||
|
|
a041d50681 | ||
|
|
0553dc2f85 | ||
|
|
0701fa7b16 | ||
|
|
f80d82cfcc | ||
|
|
aaf813902a | ||
|
|
e3c74d5365 | ||
|
|
1f2250e7a4 | ||
|
|
6dbe112f79 | ||
|
|
ccef84a803 | ||
|
|
3a96d01e4a | ||
|
|
95644a844f | ||
|
|
bd0eebdb05 | ||
|
|
3319c0ab56 | ||
|
|
dc0add15af | ||
|
|
6f585e5da5 | ||
|
|
0c32f389bc | ||
|
|
8990d7199e | ||
|
|
e6f89074d4 | ||
|
|
633c9be95c | ||
|
|
14c58213c7 | ||
|
|
f2689ddf8f | ||
|
|
a5a8be97de | ||
|
|
1a88178fbf | ||
|
|
e013c16ba9 | ||
|
|
52c76b5d93 | ||
|
|
e68a584a27 | ||
|
|
bc9699e420 | ||
|
|
951fa8981f | ||
|
|
6a06a627f8 | ||
|
|
a7eeeda99f | ||
|
|
0f008c02d8 | ||
|
|
3086ea3036 | ||
|
|
2efe14d656 | ||
|
|
c03dadbe2c | ||
|
|
9efb68f957 | ||
|
|
2c9f6b0bd5 | ||
|
|
84ce5c3589 | ||
|
|
bfe83cdec2 | ||
|
|
51ebd69162 | ||
|
|
c11edf5272 | ||
|
|
a3f8336571 | ||
|
|
36baf435b5 | ||
|
|
1416e0e0ce | ||
|
|
c789a93bc8 | ||
|
|
121a06a9eb | ||
|
|
24d13fcc55 | ||
|
|
bf1a2320e2 | ||
|
|
fdf58c5ce2 | ||
|
|
5445a1bead | ||
|
|
566eb6ef3b | ||
|
|
19b2d2eeb6 | ||
|
|
c08a7f3fbd | ||
|
|
a0d46942b9 | ||
|
|
7cf64b6ab5 | ||
|
|
a34dbd45cf | ||
|
|
44506bf376 | ||
|
|
86af9952ce | ||
|
|
12046270a6 | ||
|
|
f7ef16ba06 | ||
|
|
65bcf2adb2 | ||
|
|
7790b42f8c | ||
|
|
6ed54bd31a | ||
|
|
d9e5fdde5b | ||
|
|
c3ec158f2d | ||
|
|
bf8cc236ee | ||
|
|
6c0e791236 | ||
|
|
960a918330 | ||
|
|
671b435b3b | ||
|
|
219a52e37b | ||
|
|
a4f0f0dd0c | ||
|
|
838753cc96 | ||
|
|
8f41d3db61 | ||
|
|
928e5e1c07 | ||
|
|
b99ec48407 | ||
|
|
7c128bc7a2 | ||
|
|
99b5569ffa | ||
|
|
1c2f7cb182 | ||
|
|
e72f8cf5b1 | ||
|
|
39783a6f46 | ||
|
|
88244ff71d | ||
|
|
1cb1cbba50 | ||
|
|
87f72f0c63 | ||
|
|
c776a657af | ||
|
|
568a0b0e08 | ||
|
|
196a56e3ec | ||
|
|
80106f1b67 | ||
|
|
3994faaeaa | ||
|
|
95dd0dc479 | ||
|
|
4fb6e1cde9 | ||
|
|
cab4333f70 | ||
|
|
d786e81f46 | ||
|
|
06c9b1b33c | ||
|
|
deb4e0d24a | ||
|
|
5fe73a6671 | ||
|
|
0675f2a423 | ||
|
|
41a6037a11 | ||
|
|
6644c77d23 | ||
|
|
a569799ffc | ||
|
|
3668437c96 | ||
|
|
afd30b0a9b | ||
|
|
4da07bb2c3 | ||
|
|
e7c8bbf5df | ||
|
|
934c37b578 | ||
|
|
0e4549013d | ||
|
|
39172e53bf | ||
|
|
0422c5fde6 | ||
|
|
192e5b9188 | ||
|
|
c3dc5cceee | ||
|
|
1a11a994ea | ||
|
|
a2fedfc615 | ||
|
|
77297744ce | ||
|
|
394eab4a3a | ||
|
|
2d3ca08d91 | ||
|
|
d950680bbe | ||
|
|
9f558d1cec | ||
|
|
787bb582da | ||
|
|
b5020bc590 | ||
|
|
64b2e11106 | ||
|
|
7215c44146 | ||
|
|
4435bcb1f8 | ||
|
|
fa86afb336 | ||
|
|
58a76911bb | ||
|
|
aa97f1025d | ||
|
|
62a3961739 | ||
|
|
4adc35aaf3 | ||
|
|
702b39dec5 | ||
|
|
3ca1245027 | ||
|
|
5674226b68 | ||
|
|
6928adf501 | ||
|
|
cfd17b2e7d | ||
|
|
e4975836f4 | ||
|
|
820d6b3543 | ||
|
|
05d65f0341 | ||
|
|
be2b16507e | ||
|
|
a5e51cfdbe | ||
|
|
93f63df172 | ||
|
|
4dec3c8c6b | ||
|
|
cca9c50c26 | ||
|
|
bcb6798838 | ||
|
|
9e9f4f1c53 | ||
|
|
18eb8e6fb7 | ||
|
|
8993cbe445 | ||
|
|
5b6b558c5a | ||
|
|
081e34a5ab | ||
|
|
8f46e23aa1 | ||
|
|
27d3126d54 | ||
|
|
b5dbc36975 | ||
|
|
6cee2a87cc | ||
|
|
7de681ef58 | ||
|
|
ba05d00ac4 | ||
|
|
943dc27e78 | ||
|
|
eea5921856 | ||
|
|
ca2e291306 | ||
|
|
7baa56e1b2 | ||
|
|
7ff5505e97 | ||
|
|
106148280d | ||
|
|
f9bc50e010 | ||
|
|
efd2c17eba | ||
|
|
f90d8db827 | ||
|
|
2d485ab6fe | ||
|
|
30d1f90b44 | ||
|
|
cd50388781 | ||
|
|
190ab7f6b8 | ||
|
|
0c42174917 | ||
|
|
d395183ee2 | ||
|
|
5330980c5f | ||
|
|
5475c64d89 | ||
|
|
41311841f4 | ||
|
|
98ed3b1c8f | ||
|
|
d84b801fec | ||
|
|
1238ccefcc | ||
|
|
55de135467 | ||
|
|
79992fc3c8 | ||
|
|
71b10e2d4a | ||
|
|
927edfc078 | ||
|
|
568464bc0e | ||
|
|
37db35dc10 | ||
|
|
56cd73eb35 | ||
|
|
a72706ace6 | ||
|
|
cc4a0d1704 | ||
|
|
67422e42c6 | ||
|
|
ac1f2e2049 | ||
|
|
d9da7cbd76 | ||
|
|
e8b00fb6f2 | ||
|
|
069805c6f7 | ||
|
|
caec5339e8 | ||
|
|
9560429ac3 | ||
|
|
ca1e6071e3 | ||
|
|
1aa9d6255e | ||
|
|
00c898b2e9 | ||
|
|
25f5bb2795 | ||
|
|
9df020f7e9 | ||
|
|
9b5f766333 | ||
|
|
11f629b00e | ||
|
|
a90a7b2fba | ||
|
|
c54fb1aa20 | ||
|
|
c4a2ac2c4b | ||
|
|
e8f2272918 | ||
|
|
be74029960 | ||
|
|
74c812b565 | ||
|
|
8959ec448d | ||
|
|
034b3e94a5 | ||
|
|
ce37de30a5 | ||
|
|
f7a4cdbf2b | ||
|
|
133463235a | ||
|
|
5d67438612 | ||
|
|
cccfda7de8 | ||
|
|
4fb022ce33 | ||
|
|
9d4c3fbbdf | ||
|
|
5931b80ef3 | ||
|
|
7b09a80dc7 | ||
|
|
866935dadf | ||
|
|
3a89923142 | ||
|
|
687176e22c | ||
|
|
166298e3f5 | ||
|
|
f2b9154fa9 | ||
|
|
59b6cafef7 | ||
|
|
f4726d0ebc | ||
|
|
1591557bc4 | ||
|
|
20f1cce6a5 | ||
|
|
7f6b1dd458 | ||
|
|
bc954683cb | ||
|
|
1f877fde1e | ||
|
|
d70f9d4a29 | ||
|
|
17a4d15d3b | ||
|
|
135c5f313b | ||
|
|
72cfee7ea6 | ||
|
|
7c266e0fb9 | ||
|
|
a97659a4a1 | ||
|
|
4e7dd8a563 | ||
|
|
038baa12c7 | ||
|
|
e5306284ff | ||
|
|
c4abe6ec8f | ||
|
|
4d8e335da1 | ||
|
|
f84cd4e4ed | ||
|
|
adb6d4d2d7 | ||
|
|
9738ea452f | ||
|
|
839501e012 | ||
|
|
59b32626a8 | ||
|
|
fac5a2eb02 | ||
|
|
566d3718b0 | ||
|
|
2b81e5ed19 | ||
|
|
315cc386e5 | ||
|
|
10cc45fc45 | ||
|
|
141ce32382 | ||
|
|
56b9238af5 | ||
|
|
5031dfa3b9 | ||
|
|
c0df4b1047 | ||
|
|
530e049d2d | ||
|
|
f16a5cbae1 | ||
|
|
bcc539999b | ||
|
|
7b1763a124 | ||
|
|
b0e144065c | ||
|
|
eabde41267 | ||
|
|
14b73667b8 | ||
|
|
707278f099 | ||
|
|
a330bb0801 | ||
|
|
5c9eb324e8 | ||
|
|
ba63a2c6d1 | ||
|
|
8ff9074ce5 | ||
|
|
db34c48927 | ||
|
|
5367bc3416 | ||
|
|
871e425fa0 | ||
|
|
90ec93373b | ||
|
|
2fd155615f | ||
|
|
e36d433100 | ||
|
|
9c090c862f | ||
|
|
60c29561f2 | ||
|
|
d57c4f1c01 | ||
|
|
f190a960a1 | ||
|
|
1dcf241677 | ||
|
|
1de1ab9303 | ||
|
|
7b9d392d6f | ||
|
|
1666bbc52e | ||
|
|
ebb4a4c1b6 | ||
|
|
fd2d7df9b7 | ||
|
|
8c0cd10b07 | ||
|
|
6f8b8816f5 | ||
|
|
6470804a51 | ||
|
|
47b38cf9ee | ||
|
|
e4b829da3b | ||
|
|
3ad202429c | ||
|
|
fb02ce1e33 | ||
|
|
11373acb15 | ||
|
|
9b3ccee3dd | ||
|
|
f0e91b3667 | ||
|
|
966b22488c | ||
|
|
67da09e5e0 | ||
|
|
e5463b41f2 | ||
|
|
68fb130fd0 | ||
|
|
45a347c022 | ||
|
|
b2eae2e676 | ||
|
|
29254150b1 | ||
|
|
d74b179ecd | ||
|
|
69cc414c1b | ||
|
|
533ed6eb38 | ||
|
|
3264766762 | ||
|
|
c7c1eddd47 | ||
|
|
d0d8759c10 | ||
|
|
1261c1cd66 | ||
|
|
5a0c066845 | ||
|
|
d4fbf5c056 | ||
|
|
a2dfd6eddc | ||
|
|
d452fa65ba | ||
|
|
939c67222a | ||
|
|
23515acc31 | ||
|
|
a0f449d613 | ||
|
|
565bbada08 | ||
|
|
a0b30a9cc7 | ||
|
|
311f3be63b | ||
|
|
f29884593b | ||
|
|
d0ac4915cb | ||
|
|
d004bc4ea5 | ||
|
|
b00c5e9587 | ||
|
|
229cedfc50 | ||
|
|
5796690827 | ||
|
|
cb671acd0c | ||
|
|
85bd3836d0 | ||
|
|
a959c06e44 | ||
|
|
99a48499c7 | ||
|
|
21b6a01980 | ||
|
|
df91299550 | ||
|
|
5eacc9e831 | ||
|
|
9e679e7d4a | ||
|
|
f0105158bf | ||
|
|
8999df2f46 | ||
|
|
441a2496b8 | ||
|
|
e5a7f842be | ||
|
|
7f92e7ce00 | ||
|
|
b3069c0802 | ||
|
|
f39c2610ee | ||
|
|
4c4f803df2 | ||
|
|
a27313b1d0 | ||
|
|
9fd872e7b8 | ||
|
|
6ca8baa572 | ||
|
|
018390cf64 | ||
|
|
13425266eb | ||
|
|
738dd502b4 | ||
|
|
0594adb8fd | ||
|
|
83f726f503 | ||
|
|
36006fa68a | ||
|
|
a49244f4dd | ||
|
|
020f684093 | ||
|
|
101d614351 | ||
|
|
af1cc06184 | ||
|
|
d1b9dfc6c9 | ||
|
|
d8c330b215 | ||
|
|
e4029426de | ||
|
|
7d865269fd | ||
|
|
b24b870ec6 | ||
|
|
74974979ba | ||
|
|
4336e8e4b9 | ||
|
|
c7f8c70935 | ||
|
|
4cfbdb07bb | ||
|
|
3e98860241 | ||
|
|
81807cb5af | ||
|
|
d5322a73bf | ||
|
|
bd59fa14f3 | ||
|
|
5fdf637c6a | ||
|
|
9a6dc7b520 | ||
|
|
e75dc74bb1 | ||
|
|
ea7e8951d8 | ||
|
|
b906bff832 | ||
|
|
e44cfe29a8 | ||
|
|
989d5d357b | ||
|
|
f8c19df79a | ||
|
|
02b60d6d00 | ||
|
|
cfe9983741 | ||
|
|
4ca3fe5137 | ||
|
|
8db8b19ea0 | ||
|
|
503e54779a | ||
|
|
fd0c1f2273 | ||
|
|
36996107e1 | ||
|
|
cf2fe606a6 | ||
|
|
27f2d75d88 | ||
|
|
a902fefed5 | ||
|
|
274c6d3667 | ||
|
|
99f99169a4 | ||
|
|
1c8ae63ec3 | ||
|
|
da98869327 | ||
|
|
cf44052b0f | ||
|
|
febf2ea3cf | ||
|
|
df9c2f8371 | ||
|
|
b63d113fe0 | ||
|
|
7f5e04980c | ||
|
|
bc3b82850d | ||
|
|
89e45afcc1 | ||
|
|
7e2298b8d0 | ||
|
|
96b1778434 | ||
|
|
5fc3361720 | ||
|
|
d8bb7f7ad7 | ||
|
|
ff14d7b853 | ||
|
|
650d78c2cf | ||
|
|
0ed02e9c1e | ||
|
|
33cd956e4e | ||
|
|
413e22ce2b | ||
|
|
579a18c93b | ||
|
|
f6682de390 | ||
|
|
470d3a2a23 | ||
|
|
1d669ed34b | ||
|
|
8dd54b9ec3 | ||
|
|
cf94820e1a | ||
|
|
3f6b8468f2 | ||
|
|
d050fd11b5 | ||
|
|
9ccbfa0bae | ||
|
|
f57f1c7eef | ||
|
|
d8a7d770b4 | ||
|
|
6d62dbbafc | ||
|
|
9437a7abcd | ||
|
|
2642bd7415 | ||
|
|
30da34358b | ||
|
|
ab4b05127e | ||
|
|
2953a7c663 | ||
|
|
b53b4a5e5a | ||
|
|
e57cd0031d | ||
|
|
03bca72af6 | ||
|
|
2d3d65a930 | ||
|
|
5767346e9d | ||
|
|
dc894e41af | ||
|
|
5f828c6c2e | ||
|
|
2045984cee | ||
|
|
4df274f96d | ||
|
|
ee5828b2f7 | ||
|
|
3cb2e74b5c | ||
|
|
a4c9925e99 | ||
|
|
502f7991ad | ||
|
|
592afc270e | ||
|
|
2785d702e2 | ||
|
|
0fbdc69440 | ||
|
|
c99af68967 | ||
|
|
56a82b1e8a | ||
|
|
e9ae079fc3 | ||
|
|
fab2b1d3a0 | ||
|
|
18c033dc5c | ||
|
|
592630d48c | ||
|
|
d2aa8dcc43 | ||
|
|
9b107a129a | ||
|
|
10d6dcc4a9 | ||
|
|
16dbe54560 | ||
|
|
812c0e9281 | ||
|
|
7c021657e1 | ||
|
|
5dff30d90c | ||
|
|
3cc1b56810 | ||
|
|
fea4af0e63 | ||
|
|
a776fdabb9 | ||
|
|
2eb57279fe | ||
|
|
863ae5652f | ||
|
|
d0faba12a3 | ||
|
|
63991822e7 | ||
|
|
1404e041e8 | ||
|
|
55d78f3c9f | ||
|
|
e9f427c75b | ||
|
|
a661cd8295 | ||
|
|
1be83e4e33 | ||
|
|
9109495894 | ||
|
|
7586538432 | ||
|
|
4bd5614f4c | ||
|
|
c8e0fcfcdf | ||
|
|
7fa30c0dec | ||
|
|
a0d679439f | ||
|
|
072ddb799f | ||
|
|
ac744a6313 | ||
|
|
c8b22a19ad | ||
|
|
a262ea02d9 | ||
|
|
de9c591ffc | ||
|
|
70e535bee3 | ||
|
|
749def2ef5 | ||
|
|
c0750c1a3f | ||
|
|
475e08bba3 | ||
|
|
2a1e7cb5c9 | ||
|
|
c4ae4aee2b | ||
|
|
8e3ad082e2 | ||
|
|
b48123c1e1 | ||
|
|
aa3b001a04 | ||
|
|
c0707844e6 | ||
|
|
bf465cd904 | ||
|
|
d8140f4142 | ||
|
|
e6698fc65a | ||
|
|
ab66326f97 | ||
|
|
9d07a97945 | ||
|
|
86cbffbae0 | ||
|
|
10d4e023c8 | ||
|
|
51c7757543 | ||
|
|
27f307b428 | ||
|
|
a92fe17ae0 | ||
|
|
275a2e79ee | ||
|
|
7f48331ed4 | ||
|
|
e511550c91 | ||
|
|
7f68b471aa | ||
|
|
73893a921c | ||
|
|
70ca41dd44 | ||
|
|
22af1f07bf | ||
|
|
cfecc151d9 | ||
|
|
fde3a02b71 | ||
|
|
56b0582272 | ||
|
|
b67dae1f65 | ||
|
|
d1057e821a | ||
|
|
5314bbf952 | ||
|
|
c7cc36abdb | ||
|
|
a97ae67552 | ||
|
|
4cc6a0f263 | ||
|
|
04d744fda3 | ||
|
|
4b67c31277 | ||
|
|
84e0b1c904 | ||
|
|
61a8512805 | ||
|
|
08a4c02d38 | ||
|
|
1cbff6b771 | ||
|
|
9df9edc4c7 | ||
|
|
685cdbe124 | ||
|
|
2716f65010 | ||
|
|
8006024715 | ||
|
|
2616a4cf5e | ||
|
|
57a9deb98d | ||
|
|
ece22497dd | ||
|
|
fb170007c8 | ||
|
|
36c5017300 | ||
|
|
e8e245e20f | ||
|
|
2141ea6564 | ||
|
|
d3959d5899 | ||
|
|
cbb4b10ce6 | ||
|
|
861c81b590 | ||
|
|
28131624b8 | ||
|
|
ce1f01c494 | ||
|
|
a13a4ca532 | ||
|
|
f830120044 | ||
|
|
7645a72b2f | ||
|
|
ff8a8b8302 | ||
|
|
a7cc026e2c | ||
|
|
c78bf2775f | ||
|
|
0082bb22fb | ||
|
|
febf80cccd | ||
|
|
4d8dab6e33 | ||
|
|
f385fd9efd | ||
|
|
a66d96ce0a | ||
|
|
05f1fac2a7 | ||
|
|
03ae38a41e | ||
|
|
fbb8c056d4 | ||
|
|
0e68d34e1b | ||
|
|
a62027d5f3 | ||
|
|
db38498d06 | ||
|
|
af11f66646 | ||
|
|
2a422e1d83 | ||
|
|
f463aea399 | ||
|
|
f93da3cfb1 | ||
|
|
253b10818c | ||
|
|
2c0e086761 | ||
|
|
8882f4dd14 | ||
|
|
2cf76cb701 | ||
|
|
bb9517b73f | ||
|
|
f681b35b65 | ||
|
|
8c5d36f0ee | ||
|
|
08d0ff0922 | ||
|
|
e5683b1da5 | ||
|
|
3dffa8284f | ||
|
|
e332197660 | ||
|
|
8b36b71833 | ||
|
|
7eb5e07e9d | ||
|
|
0b9eb3c111 | ||
|
|
5f7a3f2b69 | ||
|
|
02676572dd | ||
|
|
404661fc72 | ||
|
|
5c3f013325 | ||
|
|
ea4aa4f149 | ||
|
|
0c8fc63b33 | ||
|
|
c239746363 | ||
|
|
12b47cc037 | ||
|
|
2c636086bd | ||
|
|
6a7386e6ba | ||
|
|
21ab9f8b9e | ||
|
|
eab113e4f5 | ||
|
|
bd4a8c1ce2 | ||
|
|
e2de7ab0c7 | ||
|
|
a6e80b2bc1 | ||
|
|
3f5a55e240 | ||
|
|
b79be6d320 | ||
|
|
60bb78e25b | ||
|
|
281fb549f8 | ||
|
|
d16f62cb38 | ||
|
|
912bd84629 | ||
|
|
d77078518d | ||
|
|
e310af00b4 | ||
|
|
cedbdf43ca | ||
|
|
911559fe05 | ||
|
|
c958eae551 | ||
|
|
053ba9a9ca | ||
|
|
c5aa74f823 | ||
|
|
20180923cf | ||
|
|
6e104c3ed0 | ||
|
|
880a503094 | ||
|
|
edbc273829 | ||
|
|
5f807e7421 | ||
|
|
579d9fc813 | ||
|
|
dc074fcc50 | ||
|
|
5d95267c4a | ||
|
|
69fdd45459 | ||
|
|
d3370bf596 | ||
|
|
d359c63018 | ||
|
|
a9376f0a41 | ||
|
|
e75dcc18f1 | ||
|
|
7da0cfd0d8 | ||
|
|
b0e51e2cba | ||
|
|
a762956000 | ||
|
|
e58c1ee306 | ||
|
|
fd3ceb60c8 | ||
|
|
4c04420a51 | ||
|
|
e345ceb01a | ||
|
|
f3e4157698 | ||
|
|
1a99b241ca | ||
|
|
74f0f27d18 | ||
|
|
5846cc7b70 | ||
|
|
b202b508f2 | ||
|
|
a7d20df95a | ||
|
|
674b540c6f | ||
|
|
8b860d3f0e | ||
|
|
35ed101651 | ||
|
|
99cc12cc0a | ||
|
|
21c7f2298a | ||
|
|
9da73b5222 | ||
|
|
db97d40f5e | ||
|
|
a78b5c2f8d | ||
|
|
df33ff7462 | ||
|
|
f589e11419 | ||
|
|
db462a181c | ||
|
|
b42e29c5a7 | ||
|
|
cc734930c6 | ||
|
|
11f9c22e56 | ||
|
|
d59b2c3ef6 | ||
|
|
116c00595c | ||
|
|
8fb29a3af3 | ||
|
|
202c459413 | ||
|
|
dd3e9806af | ||
|
|
411cdb29a1 | ||
|
|
1005976a22 | ||
|
|
504f30e045 | ||
|
|
808f5dc452 | ||
|
|
b7d7f6d877 | ||
|
|
df334e809e | ||
|
|
ade601ab81 | ||
|
|
50b04cdf92 | ||
|
|
ccee1b6a55 | ||
|
|
27c9fce15b | ||
|
|
c2fd35c687 | ||
|
|
7e0bbf8161 | ||
|
|
35f5bb0039 | ||
|
|
ffd960ca4e | ||
|
|
c881d24553 | ||
|
|
290b0ea14b | ||
|
|
ccf97a62f1 | ||
|
|
d7d8dabb40 | ||
|
|
9d8b32c935 | ||
|
|
19532cae88 | ||
|
|
37e4a5ddae | ||
|
|
8792e509d7 | ||
|
|
b5b1ca068d | ||
|
|
ecdf6c2213 | ||
|
|
8b272b0bf0 | ||
|
|
6684a8f914 | ||
|
|
50fee0275c | ||
|
|
4e26874298 | ||
|
|
b126159360 | ||
|
|
dc622470c9 | ||
|
|
63eba6c634 | ||
|
|
2f70dd7015 | ||
|
|
441ac3742c | ||
|
|
90bc9314f1 | ||
|
|
3ee02c1433 | ||
|
|
ff02e12389 | ||
|
|
69aae64133 | ||
|
|
00ab79b7cf | ||
|
|
467945bedb | ||
|
|
460d9c1c44 | ||
|
|
ae67940544 | ||
|
|
497c10897f | ||
|
|
e868a8437f | ||
|
|
c8786b7b28 | ||
|
|
7a9bc641ee | ||
|
|
781e606e5a | ||
|
|
3c1c8c397f | ||
|
|
ed87454ff8 | ||
|
|
7977769d91 | ||
|
|
879abc0949 | ||
|
|
f9bbe8ed58 | ||
|
|
46c99e6c87 | ||
|
|
d34d4cbc37 | ||
|
|
4dd208a2b3 | ||
|
|
bce2d5242c | ||
|
|
83fb1fd0f6 | ||
|
|
39ee223ef8 | ||
|
|
4e37b51749 | ||
|
|
85c07ce47b | ||
|
|
041f727fe3 | ||
|
|
3f8ee8dc93 | ||
|
|
6849d6a5e5 | ||
|
|
2d0ba26497 | ||
|
|
e9ac432e0f | ||
|
|
42cc3cac21 | ||
|
|
a324eafac4 | ||
|
|
6203224f3e | ||
|
|
df40dc46bb | ||
|
|
8f9b0424b6 | ||
|
|
c4434f27af | ||
|
|
6ba077cf37 | ||
|
|
3893004f5e | ||
|
|
ba5922f468 | ||
|
|
72c410363c | ||
|
|
3b41a44050 | ||
|
|
04baeefaa8 | ||
|
|
4dcb877ff9 | ||
|
|
a68fb9d0b6 | ||
|
|
671a62e0fe | ||
|
|
0f7d4f57d8 | ||
|
|
6b9a443c05 | ||
|
|
4414c70b87 | ||
|
|
9e4ef3cbff | ||
|
|
62129d9a2f | ||
|
|
4bdf4197db | ||
|
|
e5b7373298 | ||
|
|
c2fcf53e53 | ||
|
|
e6345f39a9 | ||
|
|
4a73e099b7 | ||
|
|
a0595a00e8 | ||
|
|
bd836d88af | ||
|
|
43074632b3 | ||
|
|
2e2aac5988 | ||
|
|
f623404b89 | ||
|
|
8d65c9c92f | ||
|
|
6b971f7200 | ||
|
|
eaf02f5a79 | ||
|
|
b9c3d8ba03 | ||
|
|
c0e333af53 | ||
|
|
f416c686af | ||
|
|
581f34dced | ||
|
|
3c6377d665 | ||
|
|
b178960704 | ||
|
|
65275e5841 | ||
|
|
e37b3ca8e1 | ||
|
|
1241f2debd | ||
|
|
5aefaa1c48 | ||
|
|
c7fb38b606 | ||
|
|
7e05b6e0b3 | ||
|
|
879184fe37 | ||
|
|
cbe7e3e80e | ||
|
|
ebd87bfb78 | ||
|
|
beeca433ae | ||
|
|
d3f9427e37 | ||
|
|
c76e41d157 | ||
|
|
f695603dec | ||
|
|
5bb7c7eb9a | ||
|
|
395d65454c | ||
|
|
27381b7f07 | ||
|
|
e7c4fa0e5f | ||
|
|
7ce849a2b6 | ||
|
|
a07f690509 | ||
|
|
54fba9af4b | ||
|
|
2a1054b1a8 | ||
|
|
77cef764d6 | ||
|
|
2f3390750d | ||
|
|
936a00a974 | ||
|
|
658a4d0b47 | ||
|
|
5b281a06d6 | ||
|
|
45c9b82fb3 | ||
|
|
755088dbf0 | ||
|
|
9932eb667b | ||
|
|
921dbe0547 | ||
|
|
ab679cbe26 | ||
|
|
4147e92561 | ||
|
|
3413c96845 | ||
|
|
780cff46b3 | ||
|
|
5d6f6b0571 | ||
|
|
04b0fe0160 | ||
|
|
4d1c84aa2b | ||
|
|
1c11afd78d | ||
|
|
8b5fe24cb2 | ||
|
|
ba905a2c18 | ||
|
|
bd51b250be | ||
|
|
996bf25aee | ||
|
|
2a5336b93a | ||
|
|
b54f4e830a | ||
|
|
a38ea51994 | ||
|
|
7053e468cf | ||
|
|
5ea62443f4 | ||
|
|
8fc1e4b5ea | ||
|
|
da6d781768 | ||
|
|
11e3217ec1 | ||
|
|
12a8be0b98 | ||
|
|
6286b6cd76 | ||
|
|
e7b8123141 | ||
|
|
fc7f724529 | ||
|
|
418c978b91 | ||
|
|
89c782051b | ||
|
|
31d7afc987 | ||
|
|
2f1138cd11 | ||
|
|
8068702c15 | ||
|
|
604fb3286c | ||
|
|
a5b3104b0c | ||
|
|
a79279b1cc | ||
|
|
8f90ba82a4 | ||
|
|
9bd6c98320 | ||
|
|
6465cd6446 | ||
|
|
5e2c03635f | ||
|
|
a9cf8c4c04 | ||
|
|
3233005a0a | ||
|
|
d34f1d2c1a | ||
|
|
c68d83bce7 | ||
|
|
7cd95734df | ||
|
|
06cebb0816 | ||
|
|
b2f30f5bee | ||
|
|
ab990933a2 | ||
|
|
9a635f0ce3 | ||
|
|
7756adc75c | ||
|
|
5e9b22fbb2 | ||
|
|
01c09fd7fa | ||
|
|
af53111070 | ||
|
|
cba586f06f | ||
|
|
af9f1e6f48 | ||
|
|
53b2e1372c | ||
|
|
aee7d7327f | ||
|
|
03291eb5f4 | ||
|
|
0371b69952 | ||
|
|
6c22ae3759 | ||
|
|
56b64d688d | ||
|
|
50065a2781 | ||
|
|
1315112ab5 | ||
|
|
d3f9da7645 | ||
|
|
5129a3ccc3 | ||
|
|
bf3a20b2d7 | ||
|
|
fb523722b5 | ||
|
|
ab3aaebe6d | ||
|
|
5dcd84b71b | ||
|
|
6c48e9bbdf | ||
|
|
7f1b916f32 | ||
|
|
df3c163eeb | ||
|
|
d96f39360b | ||
|
|
fd1778203d | ||
|
|
9ba89b9ab1 | ||
|
|
d8e68bc0e1 | ||
|
|
9f6965c1b5 | ||
|
|
ae7e485474 | ||
|
|
4f20d7ab24 | ||
|
|
68a39a1d92 | ||
|
|
7d31d44047 | ||
|
|
f95aba2f73 | ||
|
|
f93de58f3b | ||
|
|
4e8ddd5fa3 | ||
|
|
5a0eb41d19 | ||
|
|
036823cd06 | ||
|
|
2326c509c3 | ||
|
|
8ba2f770e9 | ||
|
|
2d040c1aaa | ||
|
|
81ff5ed7aa | ||
|
|
70a06c9b59 | ||
|
|
b2f3a07708 | ||
|
|
fb33f55670 | ||
|
|
53454a370b | ||
|
|
c503424b42 | ||
|
|
38e9dd1fd9 | ||
|
|
2014d21dd2 | ||
|
|
ee021a6a5d | ||
|
|
e278997750 | ||
|
|
cd3f630fc5 | ||
|
|
c3b4ca7135 | ||
|
|
77e73d15af | ||
|
|
dd9e5668c2 | ||
|
|
f68098c7fc | ||
|
|
a5c1a01965 | ||
|
|
6a9db38006 | ||
|
|
db5fa3d15e | ||
|
|
edfa1c8ecd | ||
|
|
08a87ae4a0 | ||
|
|
6580374c4f | ||
|
|
803e4ecc93 | ||
|
|
d30a2db1e8 | ||
|
|
106e323205 | ||
|
|
228d2c4c44 | ||
|
|
24ed3e6e41 | ||
|
|
72cb5cae1e | ||
|
|
8641722b52 | ||
|
|
4835bbbdb4 | ||
|
|
9df239f2fd | ||
|
|
348bcae763 | ||
|
|
a6af5e26bc | ||
|
|
23a9db1e4d | ||
|
|
77c0249d72 | ||
|
|
daaae974b3 | ||
|
|
60f8f1477c | ||
|
|
fba56f2601 | ||
|
|
8f0146c564 | ||
|
|
f2f2ebfa4f | ||
|
|
cdb46f03f7 | ||
|
|
0022e5a67e | ||
|
|
8ad4dd332a | ||
|
|
8e5392e9d9 | ||
|
|
ac220ad38a | ||
|
|
da9b28d35c | ||
|
|
000880837e | ||
|
|
06bcd411d8 | ||
|
|
31ee99ea3e | ||
|
|
21f84e1548 | ||
|
|
0614d2f966 | ||
|
|
47649066b5 | ||
|
|
8aadecf3ff | ||
|
|
e6a750204a | ||
|
|
0905b2c1e4 | ||
|
|
216f1150cd | ||
|
|
c71a4717dd |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -13,3 +13,5 @@ site/_site/
|
||||
coverage
|
||||
.ruby-version
|
||||
.sass-cache
|
||||
tmp/stackprof-*
|
||||
.jekyll-metadata
|
||||
|
||||
25
.travis.yml
25
.travis.yml
@@ -1,15 +1,16 @@
|
||||
language: ruby
|
||||
cache: bundler
|
||||
install:
|
||||
- script/rebund download
|
||||
- travis_retry bundle install --path vendor/bundle
|
||||
sudo: false
|
||||
rvm:
|
||||
- 2.1.1
|
||||
- 2.0.0
|
||||
- 1.9.3
|
||||
- 2.2
|
||||
- 2.1
|
||||
- 2.0
|
||||
env:
|
||||
matrix:
|
||||
- TEST_SUITE=test
|
||||
- TEST_SUITE=cucumber
|
||||
before_script: bundle update
|
||||
script: script/cibuild
|
||||
after_script:
|
||||
- script/rebund upload
|
||||
notifications:
|
||||
irc:
|
||||
on_success: change
|
||||
@@ -17,11 +18,9 @@ notifications:
|
||||
channels:
|
||||
- irc.freenode.org#jekyll
|
||||
template:
|
||||
- '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}'
|
||||
- "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}"
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: never
|
||||
env:
|
||||
global:
|
||||
- secure: bt5nglPTdsc0N5fB1dOJz2WbM81dGpDuVD8PnhEsxgUfoo6xavhU4+pNrUADlSUqQ1aJrdU+MKW4x+JZ2ZnJS8vOpNzRymuMZSbFaljK4pgFGiKFgBdMKxVikvoYcxKCjLAl7NJZ11W6hUw+JtJScClDZwrJJAQB6I7Isp/LsdM=
|
||||
- secure: Ym8nx7nbfGYGo47my92M+deJykaiMkdZdb615EO51liv/xy/0aQ919Jpfieugc9d3zVnm+zFGPbpv4YzRpsik6OlVBNa4lP+BnQ27ptf5YcLWD8Hksi7845WFLecXMoaTCoYer/TvYZsIWJb2nSDMH9qbfZhnd1YZKuvUpK0rEU=
|
||||
slack:
|
||||
secure: dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4YGEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAYO1AanCUbJSEyJTju347xCBGzESU=
|
||||
|
||||
@@ -4,10 +4,10 @@ Contribute
|
||||
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
|
||||
following in mind:
|
||||
|
||||
* **Contributions will not be accepted without tests.**
|
||||
* **Contributions will not be accepted without tests or necessary documentation updates.**
|
||||
* If you're creating a small fix or patch to an existing feature, just a simple
|
||||
test will do. Please stay in the confines of the current test suite and use
|
||||
[Shoulda](http://github.com/thoughtbot/shoulda/tree/master) and
|
||||
[Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and
|
||||
[RR](https://github.com/rr/rr).
|
||||
* If it's a brand new feature, make sure to create a new
|
||||
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps
|
||||
|
||||
27
Gemfile
27
Gemfile
@@ -1,2 +1,29 @@
|
||||
source 'https://rubygems.org'
|
||||
gemspec
|
||||
|
||||
gem 'rake', '~> 10.1'
|
||||
gem 'rdoc', '~> 3.11'
|
||||
gem 'redgreen', '~> 1.2'
|
||||
gem 'shoulda', '~> 3.5'
|
||||
gem 'rr', '~> 1.1'
|
||||
gem 'cucumber', '1.3.18'
|
||||
gem 'RedCloth', '~> 4.2'
|
||||
gem 'maruku', '~> 0.7.0'
|
||||
gem 'rdiscount', '~> 1.6'
|
||||
gem 'launchy', '~> 2.3'
|
||||
gem 'simplecov', '~> 0.9'
|
||||
gem 'simplecov-gem-adapter', '~> 1.0.1'
|
||||
gem 'mime-types', '~> 1.5'
|
||||
gem 'activesupport', '~> 3.2.13'
|
||||
gem 'jekyll_test_plugin'
|
||||
gem 'jekyll_test_plugin_malicious'
|
||||
gem 'rouge', '~> 1.7'
|
||||
gem 'liquid-c', '~> 0.0.3'
|
||||
gem 'minitest' if RUBY_PLATFORM =~ /cygwin/
|
||||
gem 'test-unit' if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
|
||||
|
||||
if ENV['BENCHMARK']
|
||||
gem 'benchmark-ips'
|
||||
gem 'rbtrace'
|
||||
gem 'stackprof'
|
||||
end
|
||||
|
||||
543
History.markdown
543
History.markdown
@@ -2,31 +2,458 @@
|
||||
|
||||
### Major Enhancements
|
||||
|
||||
* Incremental regeneration (#3116)
|
||||
* Drop support for Ruby 1.9.3. (#3235)
|
||||
* Upgrade to Liquid 3.0.0 (#3002)
|
||||
* Support Ruby v2.2 (#3234)
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Sort static files just once, and call `site_payload` once for all collections (#3204)
|
||||
* Separate `jekyll docs` and optimize external gem handling (#3241)
|
||||
* Improve `Site#getConverterImpl` and call it `Site#find_converter_instance` (#3240)
|
||||
* Use relative path for `path` Liquid variable in Documents for consistency (#2908)
|
||||
* Generalize `Utils#slugify` for any scripts (#3047)
|
||||
* Added basic microdata to post template in site template (#3189)
|
||||
* Store log messages in an array of messages. (#3244)
|
||||
* Allow collection documents to override `output` property in front matter (#3172)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Remove unneeded end tag for `link` in site template (#3236)
|
||||
* Kramdown: Use `enable_coderay` key instead of `use_coderay` (#3237)
|
||||
* Unescape `Document` output path (#2924)
|
||||
* Fix nav items alignment when on multiple rows (#3264)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Improve the grammar in the documentation (#3233)
|
||||
* Update the LICENSE text to match the MIT license exactly (#3253)
|
||||
* Update rake task `site:publish` to fix minor bugs. (#3254)
|
||||
* Switch to shields.io for the README badges. (#3255)
|
||||
* Use `FileList` instead of `Dir.glob` in `site:publish` rake task (#3261)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
## v2.0.2 / 2014-05-07
|
||||
* Fixing the default host on docs (#3229)
|
||||
* Add `jekyll-thumbnail-filter` to list of third-party plugins (#2790)
|
||||
* Add link to 'Adding Ajax pagination to Jekyll' to Resources page (#3186)
|
||||
* Add a Resources link to tutorial on building dynamic navbars (#3185)
|
||||
* Semantic structure improvements to the post and page layouts (#3251)
|
||||
|
||||
## 2.5.3 / 2014-12-22
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Correct use of `url` and `baseurl` in the site template. (#2317)
|
||||
* Default `baseurl` to `""` (#2317)
|
||||
* When checking a Markdown extname, include position of the `.` (#3147)
|
||||
* Fix `jsonify` Liquid filter handling of boolean values (#3154)
|
||||
* Add comma to value of `viewport` meta tag (#3170)
|
||||
* Set the link type for the RSS feed to `application/rss+xml` (#3176)
|
||||
* Refactor `#as_liquid` (#3158)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Exclude built-in bundles from being added to coverage report (#3180)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Correct docs for the `gist` plugin so it always includes the username. (#2314)
|
||||
* Clarify new (defaults, `where` filter) features in docs (#2316)
|
||||
* Add `@alfredxing` to the `@jekyll/core` team. :tada: (#3218)
|
||||
* Document the `-q` option for the `build` and `serve` commands (#3149)
|
||||
* Fix some minor typos/flow fixes in documentation website content (#3165)
|
||||
* Add `keep_files` to configuration documentation (#3162)
|
||||
* Repeat warning about cleaning of the `destination` directory (#3161)
|
||||
* Add jekyll-500px-embed to list of third-party plugins (#3163)
|
||||
* Simplified platform detection in Gemfile example for Windows (#3177)
|
||||
* Add the `jekyll-jalali` plugin added to the list of third-party plugins. (#3198)
|
||||
* Add Table of Contents to Troubleshooting page (#3196)
|
||||
* Add `inline_highlight` plugin to list of third-party plugins (#3212)
|
||||
* Add `jekyll-mermaid` plugin to list of third-party plugins (#3222)
|
||||
|
||||
## 2.5.2 / 2014-11-17
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* `post_url` should match `post.name` instead of slugs and dates (#3058)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix bundle require for `:jekyll_plugins` (#3119)
|
||||
* Remove duplicate regexp phrase: `^\A` (#3089)
|
||||
* Remove duplicate `Conversion error:` message in `Convertible` (#3088)
|
||||
* Print full conversion error message in `Renderer#convert` (#3090)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Change variable names in Google Analytics script (#3093)
|
||||
* Mention CSV files in the docs for data files (#3101)
|
||||
* Add trailing slash to `paginate_path` example. (#3091)
|
||||
* Get rid of noifniof (`excerpt_separator`) (#3094)
|
||||
* Sass improvements, around nesting mostly. (#3123)
|
||||
* Add webmentions.io plugin to the list of third-party plugins (#3127)
|
||||
* Add Sass mixins and use them. (#2904)
|
||||
* Slightly compress jekyll-sticker.jpg. (#3133)
|
||||
* Update gridism and separate out related but custom styles. (#3132)
|
||||
* Add remote-include plugin to list of third-party plugins (#3136)
|
||||
|
||||
## 2.5.1 / 2014-11-09
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix path sanitation bug related to Windows drive names (#3077)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Add development time dependencies on minitest and test-unit to gemspec for cygwin (#3064)
|
||||
* Use Travis's built-in caching. (#3075)
|
||||
|
||||
## 2.5.0 / 2014-11-06
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Require gems in `:jekyll_plugins` Gemfile group unless `JEKYLL_NO_BUNDLER_REQUIRE` is specified in the environment. (#2865)
|
||||
* Centralize path sanitation in the `Site` object (#2882)
|
||||
* Allow placeholders in permalinks (#3031)
|
||||
* Allow users to specify the log level via `JEKYLL_LOG_LEVEL`. (#3067)
|
||||
* Fancy Indexing with WEBrick (#3018)
|
||||
* Allow Enumerables to be used with `where` filter. (#2986)
|
||||
* Meta descriptions in the site template now use `page.excerpt` if it's available (#2964)
|
||||
* Change indentation in `head.html` of site template to 2 spaces from 4 (#2973)
|
||||
* Use a `$content-width` variable instead of a fixed value in the site template CSS (#2972)
|
||||
* Strip newlines in site template `<meta>` description. (#2982)
|
||||
* Add link to atom feed in `head` of site template files (#2996)
|
||||
* Performance optimizations (#2994)
|
||||
* Use `Hash#each_key` instead of `Hash#keys.each` to speed up iteration
|
||||
over hash keys. (#3017)
|
||||
* Further minor performance enhancements. (#3022)
|
||||
* Add 'b' and 's' aliases for build and serve, respectively (#3065)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix Rouge's RedCarpet plugin interface integration (#2951)
|
||||
* Remove `--watch` from the site template blog post since it defaults
|
||||
to watching in in 2.4.0 (#2922)
|
||||
* Fix code for media query mixin in site template (#2946)
|
||||
* Allow post URL's to have `.htm` extensions (#2925)
|
||||
* `Utils.slugify`: Don't create new objects when gsubbing (#2997)
|
||||
* The jsonify filter should deep-convert to Liquid when given an Array. (#3032)
|
||||
* Apply `jsonify` filter to Hashes deeply and effectively (#3063)
|
||||
* Use `127.0.0.1` as default host instead of `0.0.0.0` (#3053)
|
||||
* In the case that a Gemfile does not exist, ensure Jekyll doesn't fail on requiring the Gemfile group (#3066)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Fix a typo in the doc block for `Jekyll::URL.escape_path` (#3052)
|
||||
* Add integration test for `jekyll new --blank` in TestUnit (#2913)
|
||||
* Add unit test for `jekyll new --force` logic (#2929)
|
||||
* Update outdated comment for `Convertible#transform` (#2957)
|
||||
* Add Hakiri badge to README. (#2953)
|
||||
* Add some simple benchmarking tools. (#2993)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* `NOKOGIRI_USE_SYSTEM_LIBRARIES=true` **decreases** installation time. (#3040)
|
||||
* Add FormKeep to resources as Jekyll form backend (#3010)
|
||||
* Fixing a mistake in the name of the new Liquid tag (#2969)
|
||||
* Update Font Awesome to v4.2.0. (#2898)
|
||||
* Fix link to #2895 in 2.4.0 release post. (#2899)
|
||||
* Add Big Footnotes for Kramdown plugin to list of third-party plugins (#2916)
|
||||
* Remove warning regarding GHP use of singular types for front matter defaults (#2919)
|
||||
* Fix quote character typo in site documentation for templates (#2917)
|
||||
* Point Liquid links to Liquid’s Github wiki (#2887)
|
||||
* Add HTTP Basic Auth (.htaccess) plugin to list of third-party plugins (#2931)
|
||||
* (Minor) Grammar & `_config.yml` filename fixes (#2911)
|
||||
* Added `mathml.rb` to the list of third-party plugins. (#2937)
|
||||
* Add `--force_polling` to the list of configuration options (#2943)
|
||||
* Escape unicode characters in site CSS (#2906)
|
||||
* Add note about using the github-pages gem via pages.github.com/versions.json (#2939)
|
||||
* Update usage documentation to reflect 2.4 auto-enabling of `--watch`. (#2954)
|
||||
* Add `--skip-initial-build` to configuration docs (#2949)
|
||||
* Fix a minor typo in Templates docs page (#2959)
|
||||
* Add a ditaa-ditaa plugin under Other section on the Plugins page (#2967)
|
||||
* Add `build/serve -V` option to configuration documentation (#2948)
|
||||
* Add 'Jekyll Twitter Plugin' to list of third-party plugins (#2979)
|
||||
* Docs: Update normalize.css to v3.0.2. (#2981)
|
||||
* Fix typo in Continuous Integration documentation (#2984)
|
||||
* Clarify behavior of `:categories` in permalinks (#3011)
|
||||
|
||||
## 2.4.0 / 2014-09-09
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Support a new `relative_include` tag (#2870)
|
||||
* Auto-enable watch on 'serve' (#2858)
|
||||
* Render Liquid in CoffeeScript files (#2830)
|
||||
* Array Liquid filters: `push`, `pop`, `unshift`, `shift` (#2895)
|
||||
* Add `:title` to collection URL template fillers (#2864)
|
||||
* Add support for CSV files in the `_data` directory (#2761)
|
||||
* Add the `name` variable to collection permalinks (#2799)
|
||||
* Add `inspect` liquid filter. (#2867)
|
||||
* Add a `slugify` Liquid filter (#2880)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Use `Jekyll.sanitized_path` when adding static files to Collections (#2849)
|
||||
* Fix encoding of `main.scss` in site template (#2771)
|
||||
* Fix orientation bugs in default site template (#2862)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Update simplecov gem to 0.9 (#2748)
|
||||
* Remove `docs/` dir (#2768)
|
||||
* add class `<< self` idiom to `New` command (#2817)
|
||||
* Allow Travis to 'parallelize' our tests (#2859)
|
||||
* Fix test for Liquid rendering in Sass (#2856)
|
||||
* Fixing "vertycal" typo in site template's `_base.scss` (#2889)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Document the `name` variable for collection permalinks (#2829)
|
||||
* Adds info about installing jekyll in current dir (#2839)
|
||||
* Remove deprecated `jekyll-projectlist` plugin from list of third-party
|
||||
plugins (#2742)
|
||||
* Remove tag plugins that are built in to Jekyll (#2751)
|
||||
* Add `markdown-writer` package for Atom Editor to list of third-party
|
||||
plugins (#2763)
|
||||
* Fix typo in site documentation for collections (#2764)
|
||||
* Fix minor typo on plugins docs page (#2765)
|
||||
* Replace markdown with HTML in `sass_dir` note on assets page (#2791)
|
||||
* Fixed "bellow" typo in datafiles docs (#2879)
|
||||
* Fix code/markdown issue in documentation for variables (#2877)
|
||||
* Remove Good Include third-party plugin from plugins page (#2881)
|
||||
* Add some more docs on `include_relative` (#2884)
|
||||
|
||||
## 2.3.0 / 2014-08-10
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Allow Convertibles to be converted by >= 1 converters (#2704)
|
||||
* Allow Sass files to be rendered in Liquid, but never place them in layouts. (#2733)
|
||||
* Add `jekyll help` command (#2707)
|
||||
* Use `.scss` for `site_template` styles. (#2667)
|
||||
* Don't require the `scope` key in front matter defaults (#2659)
|
||||
* No longer set `permalink: pretty` in the `_config.yml` for the site template (#2680)
|
||||
* Rework site template to utilize Sass (#2687)
|
||||
* Notify the user when auto-regeneration is disabled. (#2696)
|
||||
* Allow partial variables in include tag filename argument (#2693)
|
||||
* Move instances of `Time.parse` into a Utils method (#2682)
|
||||
* Ignore subfolders in the `_posts` folder (#2705) REVERTS (#2633)
|
||||
* Front Matter default types should always be pluralized (#2732)
|
||||
* Read in static files into `collection.files` as `StaticFile`s (#2737)
|
||||
* Add `sassify` and `scssify` Liquid filters (#2739)
|
||||
* Replace `classifier` gem with `classifier-reborn` (#2721)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Use only the last extname when multiple converters exist (#2722)
|
||||
* Call `#to_liquid` before calling `#to_json` in jsonify filter (#2729)
|
||||
* Use non padded config in `strftime` to avoid parse string twice (#2673)
|
||||
* Replace deprecated Ruby methods with undeprecated ones (#2664)
|
||||
* Catch errors when parsing Post `date` front matter value & produce nice error message (#2649)
|
||||
* Allow static files in Collections (#2615)
|
||||
* Fixed typo in `Deprecator#gracefully_require` error message (#2694)
|
||||
* Remove preemptive loading of the 'classifier' gem. (#2697)
|
||||
* Use case-insensitive checking for the file extensions when loading config files (#2718)
|
||||
* When Reading Documents, Respect `encoding` Option (#2720)
|
||||
* Refactor based on jekyll-watch clean-up. (#2716)
|
||||
* `Document#to_s` should produce just the content of the document (#2731)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Only include lib files in the gem (#2671)
|
||||
* Fix `git diff` command in `proof` script (#2672)
|
||||
* Make default rake task a multitask so tests run in parallel (#2735)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Use Sass and a Docs Collection (#2651)
|
||||
* Add `latest_version.txt` file to the site (#2740)
|
||||
* Be more ambiguous about `page.content`. But more transparent. (#2522)
|
||||
* Streamlining front matter wording (instead of front-matter/frontmatter) (#2674)
|
||||
* Add note that source directory cannot be modified in GitHub Pages (#2669)
|
||||
* Fix links from #2669 to be actual HTML. Whoops. (#2679)
|
||||
* Add link to `jekyll-slim` in list of third-party plugins (#2689)
|
||||
* Add Barry Clark's Smashing Magazine tutorial to resources page (#2688)
|
||||
* Reorganize and update default configuration settings (#2456)
|
||||
* Fixing indentation in the configuration docs about Redcarpet exts (#2717)
|
||||
* Use `null` in YAML instead of `nil` in default config list (#2719)
|
||||
* Fix typo in Continuous Integration docs (#2708)
|
||||
|
||||
## 2.2.0 / 2014-07-29
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Throw a warning if the specified layout does not exist (#2620)
|
||||
* Whitelist Pygments options in safe mode (#2642)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Remove unnecessary `Jekyll::Tags::IncludeTag#blank?` method (#2625)
|
||||
* Categories in the path are ignored (#2633)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Refactoring Errors & Requires of Third-Party stuff (#2591)
|
||||
* Add further tests for categories (#2584)
|
||||
* Proof site with html-proofer on change (#2605)
|
||||
* Fix up bug in #2605 which caused proofing the site not to function (#2608)
|
||||
* Use `bundle exec` in `script/proof` (#2610)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Update Kramdown urls (#2588)
|
||||
* Add `Jekyll::AutolinkEmail` and `Jekyll::GitMetadata` to the list of
|
||||
third-party plugins (#2596)
|
||||
* Fix a bunch of broken links in the site (#2601)
|
||||
* Replace dead links with working links (#2611)
|
||||
* Add jekyll-hook to deployment methods (#2617)
|
||||
* Added kramdown-with-pygments plugin to the list of third-party plugins (#2623)
|
||||
* Update outdated "Extras" page and remove duplicate documentation (#2622)
|
||||
* Add co2 plugin to list of third-party plugins (#2639)
|
||||
* Attempt to clarify the way Sass imports happen (#2642)
|
||||
|
||||
## 2.1.1 / 2014-07-01
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Patch read vulnerabilities for data & confirm none for layouts (#2563)
|
||||
* Update Maruku dependency to allow use of the latest version (#2576)
|
||||
* Remove conditional assignment from document URL to prevent stale urls (#2575)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Add vertical margin to `highlight` to separate code blocks (#2558)
|
||||
* Add `html_pages` to Variables docs (#2567)
|
||||
* Fixed broken link to Permalinks page (#2572)
|
||||
* Update link to Windows installation guide (#2578)
|
||||
|
||||
## 2.1.0 / 2014-06-28
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Bump to the latest Liquid version, 2.6.1 (#2495)
|
||||
* Add support for JSON files in the `_data` directory (#2369)
|
||||
* Allow subclasses to override `EXCERPT_ATTRIBUTES_FOR_LIQUID` (#2408)
|
||||
* Add `Jekyll.env` and `jekyll.environment` (the Liquid var) (#2417)
|
||||
* Use `_config.yaml` or `_config.yml` (`.yml` takes precedence) (#2406)
|
||||
* Override collection url template (#2418)
|
||||
* Allow subdirectories in `_data` (#2395)
|
||||
* Extract Pagination Generator into gem: `jekyll-paginate` (#2455)
|
||||
* Utilize `date_to_rfc822` filter in site template (#2437)
|
||||
* Add categories, last build datetime, and generator to site template
|
||||
feed (#2438)
|
||||
* Configurable, replaceable Logger-compliant logger (#2444)
|
||||
* Extract `gist` tag into a separate gem (#2469)
|
||||
* Add `collection` attribute to `Document#to_liquid` to access the
|
||||
document's collection label. (#2436)
|
||||
* Upgrade listen to `2.7.6 <= x < 3.0.0` (#2492)
|
||||
* Allow configuration of different Twitter and GitHub usernames in site template (#2485)
|
||||
* Bump Pygments to v0.6.0 (#2504)
|
||||
* Front matter defaults for documents in collections (#2419)
|
||||
* Include files with a url which ends in `/` in the `site.html_pages` list (#2524)
|
||||
* Make `highlight` tag use `language-` prefix in CSS class (#2511)
|
||||
* Lookup item property via `item#to_liquid` before `#data` or `#[]` in filters (#2493)
|
||||
* Skip initial build of site on serve with flag (#2477)
|
||||
* Add support for `hl_lines` in `highlight` tag (#2532)
|
||||
* Spike out `--watch` flag into a separate gem (#2550)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Liquid `sort` filter should sort even if one of the values is `nil` (#2345)
|
||||
* Remove padding on `pre code` in the site template CSS (#2383)
|
||||
* Set `log_level` earlier to silence info level configuration output (#2393)
|
||||
* Only list pages which have `title` in site template (#2411)
|
||||
* Accept `Numeric` values for dates, not `Number` values (#2377)
|
||||
* Prevent code from overflowing container in site template (#2429)
|
||||
* Encode URLs in UTF-8 when escaping and unescaping (#2420)
|
||||
* No Layouts or Liquid for Asset Files (#2431)
|
||||
* Allow front matter defaults to set post categories (#2373)
|
||||
* Fix command in subcommand deprecation warning (#2457)
|
||||
* Keep all parent directories of files/dirs in `keep_files` (#2458)
|
||||
* When using RedCarpet and Rouge without Rouge installed, fixed erroneous
|
||||
error which stated that redcarpet was missing, not rouge. (#2464)
|
||||
* Ignore *all* directories and files that merit it on auto-generation (#2459)
|
||||
* Before copying file, explicitly remove the old one (#2535)
|
||||
* Merge file system categories with categories from YAML. (#2531)
|
||||
* Deep merge front matter defaults (#2490)
|
||||
* Ensure exclude and include arrays are arrays of strings (#2542)
|
||||
* Allow collections to have dots in their filenames (#2552)
|
||||
* Collections shouldn't try to read in directories as files (#2552)
|
||||
* Be quiet very quickly. (#2520)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Test Ruby 2.1.2 instead of 2.1.1 (#2374)
|
||||
* Add test for sorting UTF-8 characters (#2384)
|
||||
* Use `https` for GitHub links in documentation (#2470)
|
||||
* Remove coverage reporting with Coveralls (#2494)
|
||||
* Fix a bit of missing TomDoc to `Jekyll::Commands::Build#build` (#2554)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Set `timezone` to `America/Los_Angeles` (#2394)
|
||||
* Improve JavaScript in `anchor_links.html` (#2368)
|
||||
* Remove note on Quickstart page about default markdown converter (#2387)
|
||||
* Remove broken link in extras.md to a Maruku fork (#2401)
|
||||
* Update Font Awesome to v4.1.0. (#2410)
|
||||
* Fix broken link on Installation page to Templates page (#2421)
|
||||
* Prevent table from extending parent width in permalink style table (#2424)
|
||||
* Add collections to info about pagination support (#2389)
|
||||
* Add `jekyll_github_sample` plugin to list of third-party plugins (#2463)
|
||||
* Clarify documentation around front matter defaults and add details
|
||||
about defaults for collections. (#2439)
|
||||
* Add Jekyll Project Version Tag to list of third-party plugins (#2468)
|
||||
* Use `https` for GitHub links across whole site (#2470)
|
||||
* Add StickerMule + Jekyll post (#2476)
|
||||
* Add Jekyll Asset Pipeline Reborn to list of third-party plugins (#2479)
|
||||
* Add link to jekyll-compress-html to list of third-party plugins (#2514)
|
||||
* Add Piwigo Gallery to list of third-party plugins (#2526)
|
||||
* Set `show_drafts` to `false` in default configuration listing (#2536)
|
||||
* Provide an updated link for Windows installation instructions (#2544)
|
||||
* Remove `url` from configuration docs (#2547)
|
||||
* Documentation for Continuous Integration for your Jekyll Site (#2432)
|
||||
|
||||
## 2.0.3 / 2014-05-08
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Properly prefix links in site template with URL or baseurl depending upon
|
||||
need. (#2319)
|
||||
* Update gist tag comments and error message to require username (#2326)
|
||||
* Fix `permalink` setting in site template (#2331)
|
||||
* Don't fail if any of the path objects are nil (#2325)
|
||||
* Instantiate all descendants for converters and generators, not just
|
||||
direct subclasses (#2334)
|
||||
* Replace all instances of `site.name` with `site.title` in site template (#2324)
|
||||
* `Jekyll::Filters#time` now accepts UNIX timestamps in string or number form (#2339)
|
||||
* Use `item_property` for `where` filter so it doesn't break on collections (#2359)
|
||||
* Rescue errors thrown so `--watch` doesn't fail (#2364)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Add missing "as" to assets docs page (#2337)
|
||||
* Update docs to reflect new `baseurl` default (#2341)
|
||||
* Add links to headers who have an ID. (#2342)
|
||||
* Use symbol instead of HTML number in `upgrading.md` (#2351)
|
||||
* Fix link to front matter defaults docs (#2353)
|
||||
* Fix for `History.markdown` in order to fix history page in docs (#2363)
|
||||
|
||||
## 2.0.2 / 2014-05-07
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Correct use of `url` and `baseurl` in the site template. (#2317)
|
||||
* Default `baseurl` to `""` (#2317)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Correct docs for the `gist` plugin so it always includes the username. (#2314)
|
||||
* Clarify new (defaults, `where` filter) features in docs (#2316)
|
||||
|
||||
## 2.0.1 / 2014-05-06
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Require `kramdown` gem instead of `maruku` gem
|
||||
* Require `kramdown` gem instead of `maruku` gem
|
||||
|
||||
## 2.0.0 / 2014-05-06
|
||||
|
||||
@@ -47,7 +474,7 @@
|
||||
* Expose `site.static_files` to Liquid (#2075)
|
||||
* Complete redesign of the template site generated by `jekyll new` (#2050)
|
||||
* Update Listen from 1.x to 2.x (#2097)
|
||||
* Front-matter defaults (#2205)
|
||||
* Front matter defaults (#2205)
|
||||
* Deprecate `relative_permalinks` configuration option (default to `false`) (#2307)
|
||||
* Exclude files based on prefix as well as `fnmatch?` (#2303)
|
||||
|
||||
@@ -92,7 +519,7 @@
|
||||
* Permit YAML blocks to end with three dots to better conform with the
|
||||
YAML spec (#2110)
|
||||
* Use `File.exist?` instead of deprecated `File.exists?` (#2214)
|
||||
* Require newline after start of YAML front-matter header (#2211)
|
||||
* Require newline after start of YAML Front Matter header (#2211)
|
||||
* Add the ability for pages to be marked as `published: false` (#1492)
|
||||
* Add `Jekyll::LiquidExtensions` with `.lookup_variable` method for easy
|
||||
looking up of variable values in a Liquid context. (#2253)
|
||||
@@ -167,7 +594,7 @@
|
||||
* Extract plugin management into its own class (#2197)
|
||||
* Add missing tests for `Command` (#2216)
|
||||
* Update `rr` link in CONTRIBUTING doc (#2247)
|
||||
* Streamline cucumber execution of `jekyll` subcommands (#2258)
|
||||
* Streamline Cucumber execution of `jekyll` subcommands (#2258)
|
||||
* Refactor `Commands::Serve`. (#2269)
|
||||
* Refactor `highlight` tag (#2154)
|
||||
* Update `Util` hash functions with latest from Rails (#2273)
|
||||
@@ -399,7 +826,7 @@
|
||||
* Refactor Site#render (#1638)
|
||||
* Remove duplication in command line options (#1637)
|
||||
* Add tests for all the coderay options (#1543)
|
||||
* Improve some of the cucumber test code (#1493)
|
||||
* Improve some of the Cucumber test code (#1493)
|
||||
* Improve comparisons of timestamps by ignoring the seconds (#1582)
|
||||
|
||||
### Site Enhancements
|
||||
@@ -569,7 +996,7 @@
|
||||
* Latest posts first in non-LSI `related_posts` (#1271)
|
||||
|
||||
### Development Fixes
|
||||
* Merge the theme and layout cucumber steps into one step (#1151)
|
||||
* Merge the theme and layout Cucumber steps into one step (#1151)
|
||||
* Restrict activesupport dependency to pre-4.0.0 to maintain compatibility with `<= 1.9.2`
|
||||
* Include/exclude deprecation handling simplification (#1284)
|
||||
* Convert README to Markdown. (#1267)
|
||||
@@ -599,7 +1026,7 @@
|
||||
* Update contributor information (#1192)
|
||||
* Update URL of article about Blogger migration (#1242)
|
||||
* Specify that RedCarpet is the default for new Jekyll sites on Quickstart page (#1247)
|
||||
* Added site.pages to Variables page in docs (#1251)
|
||||
* Added `site.pages` to Variables page in docs (#1251)
|
||||
* Add Youku and Tudou Embed link on Plugins page. (#1250)
|
||||
* Add note that `gist` tag supports private gists. (#1248)
|
||||
* Add `jekyll-timeago` to list of third-party plugins. (#1260)
|
||||
@@ -617,7 +1044,7 @@
|
||||
|
||||
### Minor Enhancements
|
||||
* Add support to gist tag for private gists. (#1189)
|
||||
* Fail loudly when MaRuKu errors out (#1190)
|
||||
* Fail loudly when Maruku errors out (#1190)
|
||||
* Move the building of related posts into their own class (#1057)
|
||||
* Removed trailing spaces in several places throughout the code (#1116)
|
||||
* Add a `--force` option to `jekyll new` (#1115)
|
||||
@@ -683,7 +1110,7 @@
|
||||
## 1.0.1 / 2013-05-08
|
||||
|
||||
### Minor Enhancements
|
||||
* Do not force use of toc_token when using generate_tok in RDiscount (#1048)
|
||||
* Do not force use of `toc_token` when using `generate_tok` in RDiscount (#1048)
|
||||
* Add newer `language-` class name prefix to code blocks (#1037)
|
||||
* Commander error message now preferred over process abort with incorrect args (#1040)
|
||||
|
||||
@@ -706,15 +1133,15 @@
|
||||
## 1.0.0 / 2013-05-06
|
||||
|
||||
### Major Enhancements
|
||||
* Add `jekyll new` subcommand: generate a jekyll scaffold (#764)
|
||||
* Refactored jekyll commands into subcommands: build, serve, and migrate. (#690)
|
||||
* Add `jekyll new` subcommand: generate a Jekyll scaffold (#764)
|
||||
* Refactored Jekyll commands into subcommands: build, serve, and migrate. (#690)
|
||||
* Removed importers/migrators from main project, migrated to jekyll-import sub-gem (#793)
|
||||
* Added ability to render drafts in `_drafts` folder via command line (#833)
|
||||
* Add ordinal date permalink style (/:categories/:year/:y_day/:title.html) (#928)
|
||||
|
||||
### Minor Enhancements
|
||||
* Site template HTML5-ified (#964)
|
||||
* Use post's directory path when matching for the post_url tag (#998)
|
||||
* Use post's directory path when matching for the `post_url` tag (#998)
|
||||
* Loosen dependency on Pygments so it's only required when it's needed (#1015)
|
||||
* Parse strings into Time objects for date-related Liquid filters (#1014)
|
||||
* Tell the user if there is no subcommand specified (#1008)
|
||||
@@ -728,7 +1155,7 @@
|
||||
* Expose new attribute to Liquid via `page`: `page.path` (#951)
|
||||
* Accept multiple config files from command line (#945)
|
||||
* Add page variable to liquid custom tags and blocks (#413)
|
||||
* Add paginator.previous_page_path and paginator.next_page_path (#942)
|
||||
* Add `paginator.previous_page_path` and `paginator.next_page_path` (#942)
|
||||
* Backwards compatibility for 'auto' (#821, #934)
|
||||
* Added date_to_rfc822 used on RSS feeds (#892)
|
||||
* Upgrade version of pygments.rb to 0.4.2 (#927)
|
||||
@@ -747,7 +1174,7 @@
|
||||
* Relaxed Kramdown version to 0.14 (#808)
|
||||
* Aliased `jekyll server` to `jekyll serve`. (#792)
|
||||
* Updated gem versions for Kramdown, Rake, Shoulda, Cucumber, and RedCarpet. (#744)
|
||||
* Refactored jekyll subcommands into Jekyll::Commands submodule, which now contains them (#768)
|
||||
* Refactored Jekyll subcommands into Jekyll::Commands submodule, which now contains them (#768)
|
||||
* Rescue from import errors in Wordpress.com migrator (#671)
|
||||
* Massively accelerate LSI performance (#664)
|
||||
* Truncate post slugs when importing from Tumblr (#496)
|
||||
@@ -762,10 +1189,10 @@
|
||||
* Paginate in subdirectories properly (#1016)
|
||||
* Ensure post and page URLs have a leading slash (#992)
|
||||
* Catch all exceptions, not just StandardError descendents (#1007)
|
||||
* Bullet-proof limit_posts option (#1004)
|
||||
* Bullet-proof `limit_posts` option (#1004)
|
||||
* Read in YAML as UTF-8 to accept non-ASCII chars (#836)
|
||||
* Fix the CLI option `--plugins` to actually accept dirs and files (#993)
|
||||
* Allow 'excerpt' in YAML Front-Matter to override the extracted excerpt (#946)
|
||||
* Allow 'excerpt' in YAML front matter to override the extracted excerpt (#946)
|
||||
* Fix cascade problem with site.baseurl, site.port and site.host. (#935)
|
||||
* Filter out directories with valid post names (#875)
|
||||
* Fix symlinked static files not being correctly built in unsafe mode (#909)
|
||||
@@ -774,10 +1201,10 @@
|
||||
* Force usage of older directory_watcher gem as 1.5 is broken (#883)
|
||||
* Ensure all Post categories are downcase (#842, #872)
|
||||
* Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors (#555)
|
||||
* Patch for multibyte URI problem with jekyll serve (#723)
|
||||
* Patch for multibyte URI problem with `jekyll serve` (#723)
|
||||
* Order plugin execution by priority (#864)
|
||||
* Fixed Page#dir and Page#url for edge cases (#536)
|
||||
* Fix broken post_url with posts with a time in their YAML Front-Matter (#831)
|
||||
* Fix broken `post_url` with posts with a time in their YAML front matter (#831)
|
||||
* Look for plugins under the source directory (#654)
|
||||
* Tumblr Migrator: finds `_posts` dir correctly, fixes truncation of long
|
||||
post names (#775)
|
||||
@@ -799,7 +1226,7 @@
|
||||
### Development Fixes
|
||||
* Exclude Cucumber 1.2.4, which causes tests to fail in 1.9.2 (#938)
|
||||
* Added "features:html" rake task for debugging purposes, cleaned up
|
||||
cucumber profiles (#832)
|
||||
Cucumber profiles (#832)
|
||||
* Explicitly require HTTPS rubygems source in Gemfile (#826)
|
||||
* Changed Ruby version for development to 1.9.3-p374 from p362 (#801)
|
||||
* Including a link to the GitHub Ruby style guide in CONTRIBUTING.md (#806)
|
||||
@@ -809,6 +1236,7 @@
|
||||
* Switch to Simplecov for coverage report (#765)
|
||||
|
||||
## 0.12.1 / 2013-02-19
|
||||
|
||||
### Minor Enhancements
|
||||
* Update Kramdown version to 0.14.1 (#744)
|
||||
* Test Enhancements
|
||||
@@ -817,11 +1245,12 @@
|
||||
* Update Redcarpet version to 2.2.2 (#744)
|
||||
|
||||
## 0.12.0 / 2012-12-22
|
||||
|
||||
### Minor Enhancements
|
||||
* Add ability to explicitly specify included files (#261)
|
||||
* Add --default-mimetype option (#279)
|
||||
* Add `--default-mimetype` option (#279)
|
||||
* Allow setting of RedCloth options (#284)
|
||||
* Add post_url Liquid tag for internal post linking (#369)
|
||||
* Add `post_url` Liquid tag for internal post linking (#369)
|
||||
* Allow multiple plugin dirs to be specified (#438)
|
||||
* Inline TOC token support for RDiscount (#333)
|
||||
* Add the option to specify the paginated url format (#342)
|
||||
@@ -831,10 +1260,10 @@
|
||||
* Bug Fixes
|
||||
* Allow some special characters in highlight names
|
||||
* URL escape category names in URL generation (#360)
|
||||
* Fix error with limit_posts (#442)
|
||||
* Fix error with `limit_posts` (#442)
|
||||
* Properly select dotfile during directory scan (#363, #431, #377)
|
||||
* Allow setting of Kramdown smart_quotes (#482)
|
||||
* Ensure front-matter is at start of file (#562)
|
||||
* Allow setting of Kramdown `smart_quotes` (#482)
|
||||
* Ensure front matter is at start of file (#562)
|
||||
|
||||
## 0.11.2 / 2011-12-27
|
||||
* Bug Fixes
|
||||
@@ -846,6 +1275,7 @@
|
||||
* Update dependencies
|
||||
|
||||
## 0.11.0 / 2011-07-10
|
||||
|
||||
### Major Enhancements
|
||||
* Add command line importer functionality (#253)
|
||||
* Add Redcarpet Markdown support (#318)
|
||||
@@ -867,9 +1297,10 @@
|
||||
|
||||
## 0.10.0 / 2010-12-16
|
||||
* Bug Fixes
|
||||
* Add --no-server option.
|
||||
* Add `--no-server` option.
|
||||
|
||||
## 0.9.0 / 2010-12-15
|
||||
|
||||
### Minor Enhancements
|
||||
* Use OptionParser's `[no-]` functionality for better boolean parsing.
|
||||
* Add Drupal migrator (#245)
|
||||
@@ -878,11 +1309,12 @@
|
||||
* Add Marley migrator (#28)
|
||||
|
||||
## 0.8.0 / 2010-11-22
|
||||
|
||||
### Minor Enhancements
|
||||
* Add wordpress.com importer (#207)
|
||||
* Add --limit-posts cli option (#212)
|
||||
* Add uri_escape filter (#234)
|
||||
* Add --base-url cli option (#235)
|
||||
* Add `--limit-posts` cli option (#212)
|
||||
* Add `uri_escape` filter (#234)
|
||||
* Add `--base-url` cli option (#235)
|
||||
* Improve MT migrator (#238)
|
||||
* Add kramdown support (#239)
|
||||
* Bug Fixes
|
||||
@@ -891,6 +1323,7 @@
|
||||
* Prevent `_includes` dir from being a symlink
|
||||
|
||||
## 0.7.0 / 2010-08-24
|
||||
|
||||
### Minor Enhancements
|
||||
* Add support for rdiscount extensions (#173)
|
||||
* Bug Fixes
|
||||
@@ -902,13 +1335,14 @@
|
||||
* Fix Rakefile 'release' task (tag pushing was missing origin)
|
||||
* Ensure that RedCloth is loaded when textilize filter is used (#183)
|
||||
* Expand source, destination, and plugin paths (#180)
|
||||
* Fix page.url to include full relative path (#181)
|
||||
* Fix `page.url` to include full relative path (#181)
|
||||
|
||||
## 0.6.1 / 2010-06-24
|
||||
* Bug Fixes
|
||||
* Fix Markdown Pygments prefix and suffix (#178)
|
||||
|
||||
## 0.6.0 / 2010-06-23
|
||||
|
||||
### Major Enhancements
|
||||
* Proper plugin system (#19, #100)
|
||||
* Add safe mode so unsafe converters/generators can be added
|
||||
@@ -919,9 +1353,9 @@
|
||||
### Minor Enhancements
|
||||
* Inclusion/exclusion of future dated posts (#59)
|
||||
* Generation for a specific time (#59)
|
||||
* Allocate site.time on render not per site_payload invocation (#59)
|
||||
* Allocate `site.time` on render not per site_payload invocation (#59)
|
||||
* Pages now present in the site payload and can be used through the
|
||||
site.pages and site.html_pages variables
|
||||
`site.pages` and `site.html_pages` variables
|
||||
* Generate phase added to site#process and pagination is now a generator
|
||||
* Switch to RakeGem for build/test process
|
||||
* Only regenerate static files when they have changed (#142)
|
||||
@@ -933,9 +1367,10 @@
|
||||
* Fix extension munging when pretty permalinks are enabled (#64)
|
||||
* Stop sorting categories (#33)
|
||||
* Preserve generated attributes over front matter (#119)
|
||||
* Fix source directory binding using Dir.pwd (#75)
|
||||
* Fix source directory binding using `Dir.pwd` (#75)
|
||||
|
||||
## 0.5.7 / 2010-01-12
|
||||
|
||||
### Minor Enhancements
|
||||
* Allow overriding of post date in the front matter (#62, #38)
|
||||
* Bug Fixes
|
||||
@@ -943,13 +1378,13 @@
|
||||
* Empty tags causes error in read_posts (#84)
|
||||
* Fix pagination to adhere to read/render/write paradigm
|
||||
* Test Enhancement
|
||||
* cucumber features no longer use site.posts.first where a better
|
||||
* Cucumber features no longer use site.posts.first where a better
|
||||
alternative is available
|
||||
|
||||
## 0.5.6 / 2010-01-08
|
||||
* Bug Fixes
|
||||
* Require redcloth >= 4.2.1 in tests (#92)
|
||||
* Don't break on triple dashes in yaml frontmatter (#93)
|
||||
* Don't break on triple dashes in yaml front matter (#93)
|
||||
|
||||
### Minor Enhancements
|
||||
* Allow .mkd as markdown extension
|
||||
@@ -984,9 +1419,9 @@
|
||||
* Configuration options set in config.yml are now available through the
|
||||
site payload (@vilcans)
|
||||
* Posts can now have an empty YAML front matter or none at all
|
||||
(@bahuvrihi)
|
||||
(@ bahuvrihi)
|
||||
* Bug Fixes
|
||||
* Fixing Ruby 1.9 issue that requires to_s on the err object
|
||||
* Fixing Ruby 1.9 issue that requires `#to_s` on the err object
|
||||
(@Chrononaut)
|
||||
* Fixes for pagination and ordering posts on the same day (@ujh)
|
||||
* Made pages respect permalinks style and permalinks in yml front matter
|
||||
@@ -996,11 +1431,12 @@
|
||||
* Added trailing slash to pretty permalink style so Apache is happy
|
||||
(@eugenebolshakov)
|
||||
* Bad markdown processor in config fails sooner and with better message
|
||||
(@gcnovus)
|
||||
* Allow CRLFs in yaml frontmatter (@juretta)
|
||||
(@ gcnovus)
|
||||
* Allow CRLFs in yaml front matter (@juretta)
|
||||
* Added Date#xmlschema for Ruby versions < 1.9
|
||||
|
||||
## 0.5.1 / 2009-05-06
|
||||
|
||||
### Major Enhancements
|
||||
* Next/previous posts in site payload (@pantulis, @tomo)
|
||||
* Permalink templating system
|
||||
@@ -1015,6 +1451,7 @@
|
||||
* CGI escaped post titles (@Chrononaut)
|
||||
|
||||
## 0.5.0 / 2009-04-07
|
||||
|
||||
### Minor Enhancements
|
||||
* Ability to set post categories via YAML (@qrush)
|
||||
* Ability to set prevent a post from publishing via YAML (@qrush)
|
||||
@@ -1033,18 +1470,20 @@
|
||||
* Add Cucumber acceptance test suite (@qrush, @technicalpickles)
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Minor Enhancements
|
||||
* Changed date format on wordpress converter (zeropadding) (@dysinger)
|
||||
* Bug Fixes
|
||||
* Add jekyll binary as executable to gemspec (@dysinger)
|
||||
* Add Jekyll binary as executable to gemspec (@dysinger)
|
||||
|
||||
## 0.4.0 / 2009-02-03
|
||||
|
||||
### Major Enhancements
|
||||
* Switch to Jeweler for packaging tasks
|
||||
|
||||
### Minor Enhancements
|
||||
* Type importer (@codeslinger)
|
||||
* site.topics accessor (@baz)
|
||||
* `site.topics` accessor (@baz)
|
||||
* Add `array_to_sentence_string` filter (@mchung)
|
||||
* Add a converter for textpattern (@PerfectlyNormal)
|
||||
* Add a working Mephisto / MySQL converter (@ivey)
|
||||
@@ -1059,8 +1498,9 @@
|
||||
* Fix site payload available to files (@matrix9180)
|
||||
|
||||
## 0.3.0 / 2008-12-24
|
||||
|
||||
### Major Enhancements
|
||||
* Added --server option to start a simple WEBrick server on destination
|
||||
* Added `--server` option to start a simple WEBrick server on destination
|
||||
directory (@johnreilly and @mchung)
|
||||
|
||||
### Minor Enhancements
|
||||
@@ -1079,23 +1519,24 @@
|
||||
## 0.2.1 / 2008-12-15
|
||||
* Major Changes
|
||||
* Use Maruku (pure Ruby) for Markdown by default (@mreid)
|
||||
* Allow use of RDiscount with --rdiscount flag
|
||||
* Allow use of RDiscount with `--rdiscount` flag
|
||||
|
||||
### Minor Enhancements
|
||||
* Don't load directory_watcher unless it's needed (@pjhyett)
|
||||
|
||||
## 0.2.0 / 2008-12-14
|
||||
* Major Changes
|
||||
* related_posts is now found in site.related_posts
|
||||
* related_posts is now found in `site.related_posts`
|
||||
|
||||
## 0.1.6 / 2008-12-13
|
||||
* Major Features
|
||||
* Include files in `_includes` with `{% include x.textile %}`
|
||||
|
||||
## 0.1.5 / 2008-12-12
|
||||
|
||||
### Major Enhancements
|
||||
* Code highlighting with Pygments if --pygments is specified
|
||||
* Disable true LSI by default, enable with --lsi
|
||||
* Code highlighting with Pygments if `--pygments` is specified
|
||||
* Disable true LSI by default, enable with `--lsi`
|
||||
|
||||
### Minor Enhancements
|
||||
* Output informative message if RDiscount is not available (@JackDanger)
|
||||
@@ -1114,7 +1555,7 @@
|
||||
* Code hilighting (@vanpelt)
|
||||
* Autobuild
|
||||
* Bug Fixes
|
||||
* Accept both \r\n and \n in YAML header (@vanpelt)
|
||||
* Accept both `\r\n` and `\n` in YAML header (@vanpelt)
|
||||
|
||||
## 0.1.2 / 2008-11-22
|
||||
* Major Features
|
||||
|
||||
6
LICENSE
6
LICENSE
@@ -1,9 +1,9 @@
|
||||
(The MIT License)
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2008-2014 Tom Preston-Werner
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the 'Software'), to deal
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
# [Jekyll](http://jekyllrb.com/)
|
||||
|
||||
[](http://badge.fury.io/rb/jekyll)
|
||||
[](https://rubygems.org/gems/jekyll)
|
||||
[](https://travis-ci.org/jekyll/jekyll)
|
||||
[](https://codeclimate.com/github/jekyll/jekyll)
|
||||
[](https://gemnasium.com/jekyll/jekyll)
|
||||
[](https://hakiri.io/github/jekyll/jekyll/master)
|
||||
|
||||
[](https://travis-ci.org/jekyll/jekyll)
|
||||
[](https://codeclimate.com/github/jekyll/jekyll)
|
||||
[](https://gemnasium.com/jekyll/jekyll)
|
||||
[](https://coveralls.io/r/jekyll/jekyll)
|
||||
|
||||
By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
|
||||
By Tom Preston-Werner, Nick Quaranto, Parker Moore, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
|
||||
|
||||
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
|
||||
|
||||
@@ -19,42 +18,19 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
|
||||
|
||||
* [Install](http://jekyllrb.com/docs/installation/) the gem
|
||||
* Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/)
|
||||
* Take a gander at some existing [Sites](http://wiki.github.com/jekyll/jekyll/sites)
|
||||
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
|
||||
* Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
|
||||
* Have questions? Check out `#jekyll` on irc.freenode.net.
|
||||
* Have questions? Check out [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/).
|
||||
|
||||
## Diving In
|
||||
|
||||
* [Migrate](http://jekyllrb.com/docs/migrations/) from your previous system
|
||||
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
|
||||
* Learn how the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) works
|
||||
* Put information on your site with [Variables](http://jekyllrb.com/docs/variables/)
|
||||
* Customize the [Permalinks](http://jekyllrb.com/docs/permalinks/) your posts are generated with
|
||||
* Use the built-in [Liquid Extensions](http://jekyllrb.com/docs/templates/) to make your life easier
|
||||
* Use custom [Plugins](http://jekyllrb.com/docs/plugins/) to generate content specific to your site
|
||||
|
||||
## Runtime Dependencies
|
||||
|
||||
* Commander: Command-line interface constructor (Ruby)
|
||||
* Colorator: Colorizes command line output (Ruby)
|
||||
* Classifier: Generating related posts (Ruby)
|
||||
* Directory Watcher: Auto-regeneration of sites (Ruby)
|
||||
* Kramdown: Default Markdown engine (Ruby)
|
||||
* Liquid: Templating system (Ruby)
|
||||
* Pygments.rb: Syntax highlighting (Ruby/Python)
|
||||
* RedCarpet: Markdown engine (Ruby)
|
||||
* Safe YAML: YAML Parser built for security (Ruby)
|
||||
|
||||
## Developer Dependencies
|
||||
|
||||
* Launchy: Cross-platform file launcher (Ruby)
|
||||
* Maruku: Markdown-superset interpreter (Ruby)
|
||||
* RDiscount: Discount Markdown Processor (Ruby)
|
||||
* RedCloth: Textile support (Ruby)
|
||||
* RedGreen: Nicer test output (Ruby)
|
||||
* RR: Mocking (Ruby)
|
||||
* Shoulda: Test framework (Ruby)
|
||||
* SimpleCov: Coverage framework (Ruby)
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE).
|
||||
|
||||
115
Rakefile
115
Rakefile
@@ -14,7 +14,7 @@ require 'jekyll/version'
|
||||
#############################################################################
|
||||
|
||||
def name
|
||||
@name ||= Dir['*.gemspec'].first.split('.').first
|
||||
@name ||= File.basename(Dir['*.gemspec'].first, ".*")
|
||||
end
|
||||
|
||||
def version
|
||||
@@ -29,12 +29,8 @@ def gem_file
|
||||
"#{name}-#{version}.gem"
|
||||
end
|
||||
|
||||
def replace_header(head, header_name)
|
||||
head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
|
||||
end
|
||||
|
||||
def normalize_bullets(markdown)
|
||||
markdown.gsub(/\s{2}\*{1}/, "-")
|
||||
markdown.gsub(/\n\s{2}\*{1}/, "\n-")
|
||||
end
|
||||
|
||||
def linkify_prs(markdown)
|
||||
@@ -57,13 +53,32 @@ def liquid_escape(markdown)
|
||||
markdown.gsub(/(`{[{%].+[}%]}`)/, "{% raw %}\\1{% endraw %}")
|
||||
end
|
||||
|
||||
def custom_release_header_anchors(markdown)
|
||||
header_regexp = /^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}/
|
||||
section_regexp = /^### \w+ \w+$/
|
||||
markdown.split(/^##\s/).map do |release_notes|
|
||||
_, major, minor, patch = *release_notes.match(header_regexp)
|
||||
release_notes
|
||||
.gsub(header_regexp, "\\0\n{: #v\\1-\\2-\\3}")
|
||||
.gsub(section_regexp) { |section| "#{section}\n{: ##{sluffigy(section)}-v#{major}-#{minor}-#{patch}}" }
|
||||
end.join("\n## ")
|
||||
end
|
||||
|
||||
def sluffigy(header)
|
||||
header.gsub(/#/, '').strip.downcase.gsub(/\s+/, '-')
|
||||
end
|
||||
|
||||
def remove_head_from_history(markdown)
|
||||
index = markdown =~ /^##\s+\d+\.\d+\.\d+/
|
||||
markdown[index..-1]
|
||||
end
|
||||
|
||||
def converted_history(markdown)
|
||||
remove_head_from_history(liquid_escape(linkify(normalize_bullets(markdown))))
|
||||
remove_head_from_history(
|
||||
custom_release_header_anchors(
|
||||
liquid_escape(
|
||||
linkify(
|
||||
normalize_bullets(markdown)))))
|
||||
end
|
||||
|
||||
#############################################################################
|
||||
@@ -72,14 +87,7 @@ end
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
if ENV["TRAVIS"] == "true"
|
||||
require 'coveralls/rake/task'
|
||||
Coveralls::RakeTask.new
|
||||
|
||||
task :default => [:test, :features, 'coveralls:push']
|
||||
else
|
||||
task :default => [:test, :features]
|
||||
end
|
||||
multitask :default => [:test, :features]
|
||||
|
||||
require 'rake/testtask'
|
||||
Rake::TestTask.new(:test) do |test|
|
||||
@@ -126,6 +134,7 @@ namespace :site do
|
||||
desc "Generate and view the site locally"
|
||||
task :preview do
|
||||
require "launchy"
|
||||
require "jekyll"
|
||||
|
||||
# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
|
||||
# then open it in a browser. Someday we can do better than this, I hope.
|
||||
@@ -137,44 +146,77 @@ namespace :site do
|
||||
|
||||
# Generate the site in server mode.
|
||||
puts "Running Jekyll..."
|
||||
Dir.chdir("site") do
|
||||
sh "#{File.expand_path('bin/jekyll', File.dirname(__FILE__))} serve --watch"
|
||||
end
|
||||
options = {
|
||||
"source" => File.expand_path("site"),
|
||||
"destination" => File.expand_path("site/_site"),
|
||||
"watch" => true,
|
||||
"serving" => true
|
||||
}
|
||||
Jekyll::Commands::Build.process(options)
|
||||
Jekyll::Commands::Serve.process(options)
|
||||
end
|
||||
|
||||
desc "Generate the site"
|
||||
task :generate => [:history, :version_file] do
|
||||
require "jekyll"
|
||||
Jekyll::Commands::Build.process({
|
||||
"source" => File.expand_path("site"),
|
||||
"destination" => File.expand_path("site/_site")
|
||||
})
|
||||
end
|
||||
|
||||
desc "Update normalize.css library to the latest version and minify"
|
||||
task :update_normalize_css do
|
||||
Dir.chdir("site/_includes/css") do
|
||||
Dir.chdir("site/_sass") do
|
||||
sh 'curl "http://necolas.github.io/normalize.css/latest/normalize.css" -o "normalize.scss"'
|
||||
sh 'sass "normalize.scss":"normalize.css" --style compressed'
|
||||
sh 'rm "normalize.scss"'
|
||||
sh 'sass "normalize.scss":"_normalize.scss" --style compressed'
|
||||
rm ['normalize.scss', Dir.glob('*.map')].flatten
|
||||
end
|
||||
end
|
||||
|
||||
desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
|
||||
task :publish => [:history] do
|
||||
task :publish => [:history, :version_file] do
|
||||
# Ensure the gh-pages dir exists so we can generate into it.
|
||||
puts "Checking for gh-pages dir..."
|
||||
unless File.exist?("./gh-pages")
|
||||
puts "No gh-pages directory found. Run the following commands first:"
|
||||
puts " `git clone git@github.com:jekyll/jekyll gh-pages"
|
||||
puts " `cd gh-pages"
|
||||
puts " `git checkout gh-pages`"
|
||||
exit(1)
|
||||
puts "Creating gh-pages dir..."
|
||||
sh "git clone git@github.com:jekyll/jekyll gh-pages"
|
||||
end
|
||||
|
||||
# Ensure gh-pages branch is up to date.
|
||||
# Ensure latest gh-pages branch history.
|
||||
Dir.chdir('gh-pages') do
|
||||
sh "git checkout gh-pages"
|
||||
sh "git pull origin gh-pages"
|
||||
end
|
||||
|
||||
# Copy to gh-pages dir.
|
||||
# Proceed to purge all files in case we removed a file in this release.
|
||||
puts "Cleaning gh-pages directory..."
|
||||
purge_exclude = %w[
|
||||
gh-pages/.
|
||||
gh-pages/..
|
||||
gh-pages/.git
|
||||
]
|
||||
FileList["gh-pages/{*,.*}"].exclude(*purge_exclude).each do |path|
|
||||
sh "rm -rf #{path}"
|
||||
end
|
||||
|
||||
# Copy site to gh-pages dir.
|
||||
puts "Copying site to gh-pages branch..."
|
||||
Dir.glob("site/*") do |path|
|
||||
next if path.include? "_site"
|
||||
copy_exclude = %w[
|
||||
site/.
|
||||
site/..
|
||||
site/.jekyll-metadata
|
||||
site/_site
|
||||
]
|
||||
FileList["site/{*,.*}"].exclude(*copy_exclude).each do |path|
|
||||
sh "cp -R #{path} gh-pages/"
|
||||
end
|
||||
|
||||
# Change any configuration settings for production.
|
||||
config = YAML.load_file("gh-pages/_config.yml")
|
||||
config.merge!({'sass' => {'style' => 'compressed'}})
|
||||
File.write('gh-pages/_config.yml', YAML.dump(config))
|
||||
|
||||
# Commit and push.
|
||||
puts "Committing and pushing to GitHub Pages..."
|
||||
sha = `git log`.match(/[a-z0-9]{40}/)[0]
|
||||
@@ -196,7 +238,7 @@ namespace :site do
|
||||
"permalink" => "/docs/history/",
|
||||
"prev_section" => "contributing"
|
||||
}
|
||||
Dir.chdir('site/docs/') do
|
||||
Dir.chdir('site/_docs/') do
|
||||
File.open("history.md", "w") do |file|
|
||||
file.write("#{front_matter.to_yaml}---\n\n")
|
||||
file.write(converted_history(history_file))
|
||||
@@ -207,6 +249,11 @@ namespace :site do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Write the site latest_version.txt file"
|
||||
task :version_file do
|
||||
File.open('site/latest_version.txt', 'wb') { |f| f.write(version) }
|
||||
end
|
||||
|
||||
namespace :releases do
|
||||
desc "Create new release post"
|
||||
task :new, :version do |t, args|
|
||||
@@ -239,18 +286,20 @@ end
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
desc "Release #{name} v#{version}"
|
||||
task :release => :build do
|
||||
unless `git branch` =~ /^\* master$/
|
||||
puts "You must be on the master branch to release!"
|
||||
exit!
|
||||
end
|
||||
sh "git commit --allow-empty -m 'Release #{version}'"
|
||||
sh "git commit --allow-empty -m 'Release :gem: #{version}'"
|
||||
sh "git tag v#{version}"
|
||||
sh "git push origin master"
|
||||
sh "git push origin v#{version}"
|
||||
sh "gem push pkg/#{name}-#{version}.gem"
|
||||
end
|
||||
|
||||
desc "Build #{name} v#{version} into pkg/"
|
||||
task :build do
|
||||
mkdir_p "pkg"
|
||||
sh "gem build #{gemspec_file}"
|
||||
|
||||
32
benchmark/cached-includes.rb
Normal file
32
benchmark/cached-includes.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
require 'benchmark/ips'
|
||||
require 'jekyll'
|
||||
|
||||
site = Jekyll::Site.new(Jekyll.configuration({
|
||||
'source' => File.expand_path('../site', __dir__),
|
||||
'destination' => File.expand_path('../site/_site', __dir__)
|
||||
}))
|
||||
payload = Jekyll::Utils.deep_merge_hashes(
|
||||
site.site_payload,
|
||||
{ 'site' => {'page' => site.pages.first.to_liquid } }
|
||||
)
|
||||
info = {
|
||||
filters: [Jekyll::Filters],
|
||||
registers: { :site => site, :page => payload['page'] }
|
||||
}
|
||||
|
||||
class WithoutCacheInclude < Jekyll::Tags::IncludeTag
|
||||
def source(file, context)
|
||||
File.read(file, file_read_opts(context))
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('include_woc', WithoutCacheInclude)
|
||||
|
||||
def parse(tag, payload, info)
|
||||
Liquid::Template.parse("{% #{tag} footer.html %}").render!(payload, info)
|
||||
end
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('cached') { parse 'include', payload, info }
|
||||
x.report('uncached') { parse 'include_woc', payload, info }
|
||||
end
|
||||
17
benchmark/flat-map
Normal file
17
benchmark/flat-map
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
enum = (0..50).to_a
|
||||
nested = enum.map { |i| [i] }
|
||||
|
||||
def do_thing(blah)
|
||||
blah * 1
|
||||
end
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('.map.flatten with nested arrays') { nested.map { |i| do_thing(i) }.flatten(1) }
|
||||
x.report('.flat_map with nested arrays') { nested.flat_map { |i| do_thing(i) } }
|
||||
|
||||
x.report('.map.flatten with no nested arrays') { enum.map { |i| do_thing(i) }.flatten(1) }
|
||||
x.report('.flat_map with no nested arrays') { enum.flat_map { |i| do_thing(i) } }
|
||||
end
|
||||
|
||||
9
benchmark/hash-fetch
Normal file
9
benchmark/hash-fetch
Normal file
@@ -0,0 +1,9 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
h = {:bar => 'uco'}
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('fetch with no block') { h.fetch(:bar, (0..9).to_a) }
|
||||
x.report('fetch with a block') { h.fetch(:bar) { (0..9).to_a } }
|
||||
x.report('brackets with an ||') { h[:bar] || (0..9).to_a }
|
||||
end
|
||||
46
benchmark/jekyll-sanitize-path
Normal file
46
benchmark/jekyll-sanitize-path
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative '../lib/jekyll'
|
||||
require 'benchmark/ips'
|
||||
|
||||
base_directory = Dir.pwd
|
||||
|
||||
Benchmark.ips do |x|
|
||||
#
|
||||
# Does not include the base_directory
|
||||
#
|
||||
x.report('with no questionable path') do
|
||||
Jekyll.sanitized_path(base_directory, '')
|
||||
end
|
||||
x.report('with a single-part questionable path') do
|
||||
Jekyll.sanitized_path(base_directory, 'thingy')
|
||||
end
|
||||
x.report('with a multi-part questionable path') do
|
||||
Jekyll.sanitized_path(base_directory, 'thingy/in/my/soup')
|
||||
end
|
||||
x.report('with a single-part traversal path') do
|
||||
Jekyll.sanitized_path(base_directory, '../thingy')
|
||||
end
|
||||
x.report('with a multi-part traversal path') do
|
||||
Jekyll.sanitized_path(base_directory, '../thingy/in/my/../../soup')
|
||||
end
|
||||
|
||||
#
|
||||
# Including the base_directory
|
||||
#
|
||||
x.report('with the exact same paths') do
|
||||
Jekyll.sanitized_path(base_directory, base_directory)
|
||||
end
|
||||
x.report('with a single-part absolute path including the base_directory') do
|
||||
Jekyll.sanitized_path(base_directory, File.join(base_directory, 'thingy'))
|
||||
end
|
||||
x.report('with a multi-part absolute path including the base_directory') do
|
||||
Jekyll.sanitized_path(base_directory, File.join(base_directory, 'thingy/in/my/soup'))
|
||||
end
|
||||
x.report('with a single-part traversal path including the base_directory') do
|
||||
Jekyll.sanitized_path(base_directory, File.join(base_directory, 'thingy/..'))
|
||||
end
|
||||
x.report('with a multi-part traversal path including the base_directory') do
|
||||
Jekyll.sanitized_path(base_directory, File.join('thingy/in/my/../../soup'))
|
||||
end
|
||||
end
|
||||
14
benchmark/proc-call-vs-yield
Normal file
14
benchmark/proc-call-vs-yield
Normal file
@@ -0,0 +1,14 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
def fast
|
||||
yield
|
||||
end
|
||||
|
||||
def slow(&block)
|
||||
block.call
|
||||
end
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('yield') { fast { (0..9).to_a } }
|
||||
x.report('block.call') { slow { (0..9).to_a } }
|
||||
end
|
||||
11
benchmark/sequential-assignment
Normal file
11
benchmark/sequential-assignment
Normal file
@@ -0,0 +1,11 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('parallel assignment') do
|
||||
a, b = 1, 2
|
||||
end
|
||||
x.report('multi-line assignment') do
|
||||
a = 1
|
||||
b = 2
|
||||
end
|
||||
end
|
||||
8
benchmark/string-concat
Normal file
8
benchmark/string-concat
Normal file
@@ -0,0 +1,8 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
url = "http://jekyllrb.com"
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('+=') { url += '/' }
|
||||
x.report('<<') { url << '/' }
|
||||
end
|
||||
13
benchmark/string-replacement
Normal file
13
benchmark/string-replacement
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
def str
|
||||
'http://baruco.org/2014/some-talk-with-some-amount-of-value'
|
||||
end
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('#tr') { str.tr('some', 'a') }
|
||||
x.report('#gsub') { str.gsub('some', 'a') }
|
||||
x.report('#gsub!') { str.gsub!('some', 'a') }
|
||||
x.report('#sub') { str.sub('some', 'a') }
|
||||
x.report('#sub!') { str.sub!('some', 'a') }
|
||||
end
|
||||
6
benchmark/symbol-to-proc
Normal file
6
benchmark/symbol-to-proc
Normal file
@@ -0,0 +1,6 @@
|
||||
require 'benchmark/ips'
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report('block') { (1..100).map { |i| i.to_s } }
|
||||
x.report('&:to_s') { (1..100).map(&:to_s) }
|
||||
end
|
||||
12
bin/jekyll
12
bin/jekyll
@@ -6,12 +6,11 @@ $:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
|
||||
require 'jekyll'
|
||||
require 'mercenary'
|
||||
|
||||
%w[jekyll-import].each do |blessed_gem|
|
||||
begin
|
||||
require blessed_gem
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
Jekyll::External.require_if_present(
|
||||
Jekyll::External.blessed_gems
|
||||
)
|
||||
|
||||
Jekyll::PluginManager.require_from_bundler
|
||||
|
||||
Jekyll::Deprecator.process(ARGV)
|
||||
|
||||
@@ -30,6 +29,7 @@ Mercenary.program(:jekyll) do |p|
|
||||
|
||||
p.action do |args, options|
|
||||
if args.empty?
|
||||
Jekyll.logger.error "A subcommand is required."
|
||||
puts p
|
||||
else
|
||||
unless p.has_command?(args.first)
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
default: --format pretty
|
||||
travis: --format progress
|
||||
html_report: --format progress --format html --out=features_report.html
|
||||
@@ -1,93 +0,0 @@
|
||||
コントリビュート
|
||||
==========
|
||||
|
||||
あなたは Jekyll に投じるすばらしいアイディアを持っています。
|
||||
すばらしいことです!次の事柄を心に留めてください。
|
||||
|
||||
* **テストなしではコントリビュートはできません。**
|
||||
* もし、既存の機能への小さな修正やパッチを作成したなら、シンプルなテストを行います。
|
||||
現在のテストスイートの範囲にとどまり、そして
|
||||
[Shoulda](http://github.com/thoughtbot/shoulda/tree/master) や
|
||||
[RR](http://github.com/btakita/rr/tree/master) を使用してください。
|
||||
* もし、それが新しい機能の場合は、必ず新しい
|
||||
[Cucumber](https://github.com/cucumber/cucumber/) の機能を作成し、
|
||||
必要に応じて手順を再利用します。
|
||||
また、あなたがフォークした `site` に
|
||||
急ぎいくつかのドキュメントを用意し、一度マージを行い
|
||||
メイン `site` の jekyllrb.com に転送していただければ幸いです。
|
||||
* あなたのコントリビュートによって Jekyll の振る舞いが変わった場合、ドキュメントを更新すべきです。
|
||||
それは `site/docs` にあります。
|
||||
もし、 docs に情報の誤りがあった場合、遠慮なく追加してください。
|
||||
すばらしいドキュメントはすばらしいプロジェクトを作ります!
|
||||
* Ruby のコードを変更するときは、 [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
|
||||
に従ってください。
|
||||
* **小さなプルリクエスト** に最善を尽くしてください。
|
||||
簡単に提案された変更はレビューされ、マージされる可能性が高いです。
|
||||
* プルリクエストを送信するとき、プルリクエストのボディを賢明に使用してください。
|
||||
変更されたかどうかの記述、変更の背後にある動機、 [完了したかどうかのタスクリスト](http://git.io/gfm-tasks)
|
||||
もレビュー時間を早めます。
|
||||
|
||||
テストの依存関係
|
||||
-----------------
|
||||
|
||||
テストスイートの実行や gem のビルドのために、
|
||||
Jekyll の依存ツールをインストールする必要があります。
|
||||
Jekyll は Bundler を使用しており、 `bundle` コマンドを実行すると全ての設定が迅速に行われます!
|
||||
|
||||
$ bundle
|
||||
|
||||
はじめる前に、テストを実行し、必ずテストが通ることを
|
||||
確認してください(あなたの環境が適切に設定されているかを確認するために):
|
||||
|
||||
$ bundle exec rake test
|
||||
$ bundle exec rake features
|
||||
|
||||
ワークフロー
|
||||
--------
|
||||
|
||||
これは、あなたの作業がプロジェクトにマージされるもっとも直接的な方法です:
|
||||
|
||||
* プロジェクトをフォークします。
|
||||
* あなたのフォークプロジェクトをクローンします ( `git clone git@github.com:<username>/jekyll.git` )。
|
||||
* トピックブランチを作成し、あなたの変更を含んでください ( `git checkout -b my_awesome_feature` )。
|
||||
* ハックし、テストを追加します。必ずしもこの順番でなくてかまいません
|
||||
* `rake` を実行し、テストが必ず全て通ることを確認してください
|
||||
* 必要に応じて、エラーがないようにコミットを論理的な塊にリベースしてください
|
||||
* ブランチをプッシュしてください ( `git push origin my_awesome_feature` ).
|
||||
* jekyll/jekyll プロジェクトの master ブランチに対してプルリクエストを作成し、
|
||||
あなたの変更内容と、なぜそれをマージすべきかを記述してください
|
||||
|
||||
ドキュメントの更新
|
||||
----------------------
|
||||
|
||||
私たちは Jekyll のドキュメントについて最善を尽くしたいです。
|
||||
私たちはドキュメントをオープンソース化しました、そして
|
||||
あなたが Jekyll に欠けているものを見つけた場合、私たちはプルリクエストを歓迎しています。
|
||||
|
||||
あなたは、 GitHub.com 上の Jekyll リポジトリの [site]({{ site.repository }}/tree/master/site) で
|
||||
jekyllrb.comのドキュメントを見つけることができます。
|
||||
|
||||
全てのドキュメントのプルリクエストは `master` に向けられる必要があります。
|
||||
他のブランチに向けたプルリクエストは受け入れられません。
|
||||
|
||||
GitHub の [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) は、
|
||||
自由に更新することができるように、プルリクエストなしで
|
||||
全ての GitHub ユーザがアクセス権を持つことができます。
|
||||
|
||||
落とし穴
|
||||
-------
|
||||
|
||||
* もし、 gem のバージョンがかちあった場合、コミットを分けてください。
|
||||
この方法だと、メンテナが gem をリリースするときに制御できます。
|
||||
* jekyll/jekyll の最新コミットに基づいて(複数の)パッチを維持してください。
|
||||
それは適用するためのあなたの仕事で、メンテナがしなければならないことを少なくするのは
|
||||
とてもよいことです。
|
||||
* あなたの GitHub issue で [fix], [feature] などのタグをつけないでください。
|
||||
メンテナは積極的に issue を読み、彼らが問題に出くわしたらラベルをつけるでしょう。
|
||||
|
||||
最後に…
|
||||
----------
|
||||
|
||||
ありがとう! Jekyll のハックは楽しいものでなければなりません。
|
||||
もし、あなたがこのハードを理解するための何かを発見した場合、知らせてください。
|
||||
我々のプロセスやドキュメントを改善することができます!
|
||||
@@ -1,69 +0,0 @@
|
||||
# [Jekyll](http://jekyllrb.com/)
|
||||
|
||||
[](http://badge.fury.io/rb/jekyll)
|
||||
|
||||
[](https://travis-ci.org/jekyll/jekyll)
|
||||
[](https://codeclimate.com/github/jekyll/jekyll)
|
||||
[](https://gemnasium.com/jekyll/jekyll)
|
||||
[](https://coveralls.io/r/jekyll/jekyll)
|
||||
|
||||
Tom Preston-Werner, Nick Quaranto や多くの[素晴らしいコントリビュータ](https://github.com/jekyll/jekyll/graphs/contributors)によって作成されています!
|
||||
|
||||
Jekyll は個人プロジェクトや組織のサイトに最適な、シンプルで、ブログを意識した静的サイトジェネレータです。
|
||||
複雑さを排除したファイルベースのCMSのようなものと考えてください。
|
||||
Jekyll はコンテンツを受け取り、 Markdown や Liquid テンプレート をレンダリングし、
|
||||
Apache や Nginx やその他の Web サーバに提供する準備ができた静的な Web サイトを完全に出力してくれます。
|
||||
Jekyll は [GitHub Pages](http://pages.github.com) の背後にあるエンジンなので、
|
||||
あなたの GitHub リポジトリからサイトをホストするために使用する事ができます。
|
||||
|
||||
## 原理
|
||||
|
||||
Jekyll あなたがするように伝えたことをします ― それ以上でもそれ以下でもありません。
|
||||
それは、大胆な仮定によってユーザの裏をかこうとせず、
|
||||
また、不必要な複雑さや設定をユーザに負担しません。
|
||||
簡単に言えば、 Jekyll はあなたの道を開け、
|
||||
真に重要なもの: コンテンツに集中することができます。
|
||||
|
||||
## 開始方法
|
||||
|
||||
* gem を[インストール](http://jekyllrb.com/docs/installation/)します
|
||||
* [使用方法](http://jekyllrb.com/docs/usage/) と [設定方法](http://jekyllrb.com/docs/configuration/) を読みます
|
||||
* 既存の [Jekyll で作られたサイト](http://wiki.github.com/jekyll/jekyll/sites) をチラッと見ます
|
||||
* Fork し、あなたの変更を [コントリビュート](http://jekyllrb.com/docs/contributing/) します
|
||||
* 質問があったら? irc.freenode.net の `#jekyll` チャンネルをチェックしてください
|
||||
|
||||
## より深く
|
||||
|
||||
* 以前のシステムからの[移行](http://jekyllrb.com/docs/migrations/)
|
||||
* [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) がどのように働くかを学ぶ
|
||||
* [変数](http://jekyllrb.com/docs/variables/)を使ってサイトに情報を表示する
|
||||
* posts が生成される時の[パーマリンク](http://jekyllrb.com/docs/permalinks/)をカスタマイズ
|
||||
* 人生を容易にするために、組み込みの [Liquid 拡張](http://jekyllrb.com/docs/templates/)を使用する
|
||||
* あなたのサイト固有のコンテンツを生成するために、カスタム[プラグイン](http://jekyllrb.com/docs/plugins/)を使用する
|
||||
|
||||
## 実行時の依存関係
|
||||
|
||||
* Commander: コマンドラインインターフェース構築 (Ruby)
|
||||
* Colorator: コマンドライン出力に色付け (Ruby)
|
||||
* Classifier: posts の関連を生成 (Ruby)
|
||||
* Directory Watcher: サイトの自動再生成 (Ruby)
|
||||
* Kramdown: デフォルトの Markdown エンジン (Ruby)
|
||||
* Liquid: テンプレートシステム (Ruby)
|
||||
* Pygments.rb: シンタックスハイライト (Ruby/Python)
|
||||
* RedCarpet: Markdown エンジン (Ruby)
|
||||
* Safe YAML: セキュリティのために構築された YAML パーサ (Ruby)
|
||||
|
||||
## 開発時の依存関係
|
||||
|
||||
* Launchy: クロスプラットフォーム ファイルランチャ (Ruby)
|
||||
* Maruku: Markdown スーパーセット インタプリタ (Ruby)
|
||||
* RDiscount: Discount Markdown プロセッサ (Ruby)
|
||||
* RedCloth: Textile サポート (Ruby)
|
||||
* RedGreen: よりよいテスト出力 (Ruby)
|
||||
* RR: モック (Ruby)
|
||||
* Shoulda: テストフレームワーク (Ruby)
|
||||
* SimpleCov: カバレッジフレームワーク (Ruby)
|
||||
|
||||
## ライセンス
|
||||
|
||||
[ライセンス](https://github.com/jekyll/jekyll/blob/master/LICENSE)を見てください。
|
||||
@@ -9,7 +9,7 @@ Feature: Collections
|
||||
And I have a configuration file with "collections" set to "['methods']"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Collections: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p><code>Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Create dat site.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
|
||||
And I should see "Collections: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p>Signs are nice</p>\n<p><code>Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Page without title.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
|
||||
And the "_site/methods/configuration.html" file should not exist
|
||||
|
||||
Scenario: Rendered collection
|
||||
@@ -29,6 +29,20 @@ Feature: Collections
|
||||
And I should see "Methods metadata: bar" in "_site/collection_metadata.html"
|
||||
And I should see "<p>Whatever: foo.bar</p>" in "_site/methods/configuration.html"
|
||||
|
||||
Scenario: Rendered collection at a custom URL
|
||||
Given I have an "index.html" page that contains "Collections: {{ site.collections }}"
|
||||
And I have fixture collections
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
methods:
|
||||
output: true
|
||||
permalink: /:collection/:path/
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "<p>Whatever: foo.bar</p>" in "_site/methods/configuration/index.html"
|
||||
|
||||
Scenario: Rendered document in a layout
|
||||
Given I have an "index.html" page that contains "Collections: {{ site.collections }}"
|
||||
And I have a default layout that contains "<div class='title'>Tom Preston-Werner</div> {{content}}"
|
||||
@@ -56,7 +70,7 @@ Feature: Collections
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Collections: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
||||
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
||||
|
||||
Scenario: Collections specified as an hash
|
||||
Given I have an "index.html" page that contains "Collections: {% for method in site.methods %}{{ method.relative_path }} {% endfor %}"
|
||||
@@ -64,12 +78,11 @@ Feature: Collections
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
methods:
|
||||
baz: bin
|
||||
- methods
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Collections: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
||||
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
||||
|
||||
Scenario: All the documents
|
||||
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
|
||||
@@ -81,7 +94,7 @@ Feature: Collections
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "All documents: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
||||
And I should see "All documents: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
||||
|
||||
Scenario: Documents have an output attribute, which is the converted HTML
|
||||
Given I have an "index.html" page that contains "First document's output: {{ site.documents.first.output }}"
|
||||
@@ -94,3 +107,39 @@ Feature: Collections
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "First document's output: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
|
||||
|
||||
Scenario: Filter documents by where
|
||||
Given I have an "index.html" page that contains "{% assign items = site.methods | where: 'whatever','foo.bar' %}Item count: {{ items.size }}"
|
||||
And I have fixture collections
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
- methods
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Item count: 1" in "_site/index.html"
|
||||
|
||||
Scenario: Sort by title
|
||||
Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}1. of {{ items.size }}: {{ items.first.output }}"
|
||||
And I have fixture collections
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
- methods
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "1. of 6: <p>Page without title.</p>" in "_site/index.html"
|
||||
|
||||
Scenario: Sort by relative_path
|
||||
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{% for method in methods %}{{ method.title }}, {% endfor %}"
|
||||
And I have fixture collections
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
- methods
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Collections: Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, , Site#generate," in "_site/index.html"
|
||||
|
||||
@@ -33,6 +33,32 @@ Feature: Data
|
||||
And I should see "Jack" in "_site/index.html"
|
||||
And I should see "Leon" in "_site/index.html"
|
||||
|
||||
Scenario: autoload *.json files in _data directory
|
||||
Given I have a _data directory
|
||||
And I have a "_data/members.json" file with content:
|
||||
"""
|
||||
[{"name": "Jack", "age": 28},{"name": "Leon", "age": 34}]
|
||||
"""
|
||||
And I have an "index.html" page that contains "{% for member in site.data.members %}{{member.name}}{% endfor %}"
|
||||
When I run jekyll build
|
||||
Then the "_site/index.html" file should exist
|
||||
And I should see "Jack" in "_site/index.html"
|
||||
And I should see "Leon" in "_site/index.html"
|
||||
|
||||
Scenario: autoload *.csv files in _data directory
|
||||
Given I have a _data directory
|
||||
And I have a "_data/members.csv" file with content:
|
||||
"""
|
||||
name,age
|
||||
Jack,28
|
||||
Leon,34
|
||||
"""
|
||||
And I have an "index.html" page that contains "{% for member in site.data.members %}{{member.name}}{% endfor %}"
|
||||
When I run jekyll build
|
||||
Then the "_site/index.html" file should exist
|
||||
And I should see "Jack" in "_site/index.html"
|
||||
And I should see "Leon" in "_site/index.html"
|
||||
|
||||
Scenario: autoload *.yml files in _data directory with space in file name
|
||||
Given I have a _data directory
|
||||
And I have a "_data/team members.yml" file with content:
|
||||
@@ -48,6 +74,35 @@ Feature: Data
|
||||
And I should see "Jack" in "_site/index.html"
|
||||
And I should see "Leon" in "_site/index.html"
|
||||
|
||||
Scenario: autoload *.yaml files in subdirectories in _data directory
|
||||
Given I have a _data directory
|
||||
And I have a _data/categories directory
|
||||
And I have a "_data/categories/dairy.yaml" file with content:
|
||||
"""
|
||||
name: Dairy Products
|
||||
"""
|
||||
And I have an "index.html" page that contains "{{ site.data.categories.dairy.name }}"
|
||||
When I run jekyll build
|
||||
Then the "_site/index.html" file should exist
|
||||
And I should see "Dairy Products" in "_site/index.html"
|
||||
|
||||
Scenario: folders should have precedence over files with the same name
|
||||
Given I have a _data directory
|
||||
And I have a _data/categories directory
|
||||
And I have a "_data/categories/dairy.yaml" file with content:
|
||||
"""
|
||||
name: Dairy Products
|
||||
"""
|
||||
And I have a "_data/categories.yaml" file with content:
|
||||
"""
|
||||
dairy:
|
||||
name: Should not display this
|
||||
"""
|
||||
And I have an "index.html" page that contains "{{ site.data.categories.dairy.name }}"
|
||||
When I run jekyll build
|
||||
Then the "_site/index.html" file should exist
|
||||
And I should see "Dairy Products" in "_site/index.html"
|
||||
|
||||
Scenario: should be backward compatible with site.data in _config.yml
|
||||
Given I have a "_config.yml" file with content:
|
||||
"""
|
||||
@@ -62,4 +117,3 @@ Feature: Data
|
||||
Then the "_site/index.html" file should exist
|
||||
And I should see "Jack" in "_site/index.html"
|
||||
And I should see "Leon" in "_site/index.html"
|
||||
|
||||
|
||||
@@ -77,3 +77,62 @@ Feature: frontmatter defaults
|
||||
Then I should see "a blog by some guy" in "_site/frontmatter.html"
|
||||
And I should see "nothing" in "_site/override.html"
|
||||
But the "_site/perma.html" file should not exist
|
||||
|
||||
Scenario: Use frontmatter defaults in collections
|
||||
Given I have a _slides directory
|
||||
And I have a "index.html" file that contains "nothing"
|
||||
And I have a "_slides/slide1.html" file with content:
|
||||
"""
|
||||
---
|
||||
---
|
||||
Value: {{ page.myval }}
|
||||
"""
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
slides:
|
||||
output: true
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
path: ""
|
||||
type: slides
|
||||
values:
|
||||
myval: "Test"
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Value: Test" in "_site/slides/slide1.html"
|
||||
|
||||
Scenario: Override frontmatter defaults inside a collection
|
||||
Given I have a _slides directory
|
||||
And I have a "index.html" file that contains "nothing"
|
||||
And I have a "_slides/slide2.html" file with content:
|
||||
"""
|
||||
---
|
||||
myval: Override
|
||||
---
|
||||
Value: {{ page.myval }}
|
||||
"""
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
slides:
|
||||
output: true
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
path: ""
|
||||
type: slides
|
||||
values:
|
||||
myval: "Test"
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Value: Override" in "_site/slides/slide2.html"
|
||||
|
||||
Scenario: Deep merge frontmatter defaults
|
||||
Given I have an "index.html" page with fruit "{orange: 1}" that contains "Fruits: {{ page.fruit.orange | plus: page.fruit.apple }}"
|
||||
And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {fruit: {apple: 2}}}]"
|
||||
When I run jekyll build
|
||||
Then I should see "Fruits: 3" in "_site/index.html"
|
||||
|
||||
@@ -66,3 +66,14 @@ Feature: Include tags
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "one included" in "_site/index.html"
|
||||
|
||||
Scenario: Include a file with partial variables
|
||||
Given I have an _includes directory
|
||||
And I have an "_includes/one.html" file that contains "one included"
|
||||
And I have a configuration file with:
|
||||
| key | value |
|
||||
| include_file | one |
|
||||
And I have an "index.html" page that contains "{% include {{ site.include_file }}.html %}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "one included" in "_site/index.html"
|
||||
|
||||
60
features/incremental_rebuild.feature
Normal file
60
features/incremental_rebuild.feature
Normal file
@@ -0,0 +1,60 @@
|
||||
Feature: Incremental rebuild
|
||||
As an impatient hacker who likes to blog
|
||||
I want to be able to make a static site
|
||||
Without waiting too long for it to build
|
||||
|
||||
Scenario: Produce correct output site
|
||||
Given I have a _layouts directory
|
||||
And I have a _posts directory
|
||||
And I have the following posts:
|
||||
| title | date | layout | content |
|
||||
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
|
||||
And I have a default layout that contains "Post Layout: {{ content }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
|
||||
|
||||
Scenario: Generate a metadata file
|
||||
Given I have an "index.html" file that contains "Basic Site"
|
||||
When I run jekyll build
|
||||
Then the ".jekyll-metadata" file should exist
|
||||
|
||||
Scenario: Rebuild when content is changed
|
||||
Given I have an "index.html" file that contains "Basic Site"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Basic Site" in "_site/index.html"
|
||||
When I wait 1 second
|
||||
Then I have an "index.html" file that contains "Bacon Site"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Bacon Site" in "_site/index.html"
|
||||
|
||||
Scenario: Rebuild when layout is changed
|
||||
Given I have a _layouts directory
|
||||
And I have an "index.html" page with layout "default" that contains "Basic Site with Layout"
|
||||
And I have a default layout that contains "Page Layout: {{ content }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Page Layout: Basic Site with Layout" in "_site/index.html"
|
||||
When I wait 1 second
|
||||
Then I have a default layout that contains "Page Layout Changed: {{ content }}"
|
||||
When I run jekyll build --full-rebuild
|
||||
Then the _site directory should exist
|
||||
And I should see "Page Layout Changed: Basic Site with Layout" in "_site/index.html"
|
||||
|
||||
Scenario: Rebuild when an include is changed
|
||||
Given I have a _includes directory
|
||||
And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
|
||||
And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
|
||||
When I wait 1 second
|
||||
Then I have an "_includes/about.textile" file that contains "Regenerated by Jekyll"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html"
|
||||
@@ -45,9 +45,9 @@ Feature: Markdown
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "My awesome code" in "_site/index.html"
|
||||
And I should see "<pre><code>\nMy awesome code\n</code></pre>" in "_site/index.html"
|
||||
And I should see "<pre><code>My awesome code</code></pre>" in "_site/index.html"
|
||||
|
||||
Scenario: Maruku fenced codeblocks
|
||||
Scenario: Maruku fenced codeblocks with syntax highlighting
|
||||
Given I have a configuration file with "markdown" set to "maruku"
|
||||
And I have an "index.markdown" file with content:
|
||||
"""
|
||||
@@ -64,4 +64,4 @@ Feature: Markdown
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "My awesome string" in "_site/index.html"
|
||||
And I should see "<pre class="ruby"><code class="ruby">\nputs "My awesome string"\n</code></pre>" in "_site/index.html"
|
||||
And I should see "<pre class="ruby"><code class="ruby">puts "My awesome string"</code></pre>" in "_site/index.html"
|
||||
|
||||
@@ -83,3 +83,13 @@ Feature: Fancy permalinks
|
||||
Then the _site directory should exist
|
||||
And the _site/custom/posts directory should exist
|
||||
And I should see "bla bla" in "_site/custom/posts/some.html"
|
||||
|
||||
Scenario: Use per-post ending in .htm
|
||||
Given I have a _posts directory
|
||||
And I have the following post:
|
||||
| title | date | permalink | content |
|
||||
| Some post | 2013-04-14 | /custom/posts/some.htm | bla bla |
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And the _site/custom/posts directory should exist
|
||||
And I should see "bla bla" in "_site/custom/posts/some.htm"
|
||||
|
||||
34
features/plugins.feature
Normal file
34
features/plugins.feature
Normal file
@@ -0,0 +1,34 @@
|
||||
Feature: Configuring and using plugins
|
||||
As a hacker
|
||||
I want to specify my own plugins that can modify Jekyll's behaviour
|
||||
|
||||
Scenario: Add a gem-based plugin
|
||||
Given I have an "index.html" file that contains "Whatever"
|
||||
And I have a configuration file with "gems" set to "[jekyll_test_plugin]"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Whatever" in "_site/index.html"
|
||||
And I should see "this is a test" in "_site/test.txt"
|
||||
|
||||
Scenario: Add an empty whitelist to restrict all gems
|
||||
Given I have an "index.html" file that contains "Whatever"
|
||||
And I have a configuration file with:
|
||||
| key | value |
|
||||
| gems | [jekyll_test_plugin] |
|
||||
| whitelist | [] |
|
||||
When I run jekyll build --safe
|
||||
Then the _site directory should exist
|
||||
And I should see "Whatever" in "_site/index.html"
|
||||
And the "_site/test.txt" file should not exist
|
||||
|
||||
Scenario: Add a whitelist to restrict some gems but allow others
|
||||
Given I have an "index.html" file that contains "Whatever"
|
||||
And I have a configuration file with:
|
||||
| key | value |
|
||||
| gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] |
|
||||
| whitelist | [jekyll_test_plugin] |
|
||||
When I run jekyll build --safe
|
||||
Then the _site directory should exist
|
||||
And I should see "Whatever" in "_site/index.html"
|
||||
And the "_site/test.txt" file should exist
|
||||
And I should see "this is a test" in "_site/test.txt"
|
||||
@@ -70,6 +70,42 @@ Feature: Post data
|
||||
Then the _site directory should exist
|
||||
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
||||
|
||||
Scenario: Use post.categories variable when category is in a folder and has category in YAML
|
||||
Given I have a movies directory
|
||||
And I have a movies/_posts directory
|
||||
And I have a _layouts directory
|
||||
And I have the following post in "movies":
|
||||
| title | date | layout | category | content |
|
||||
| Star Wars | 2009-03-27 | simple | film | Luke, I am your father. |
|
||||
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Post category: movies" in "_site/movies/film/2009/03/27/star-wars.html"
|
||||
|
||||
Scenario: Use post.categories variable when category is in a folder and has categories in YAML
|
||||
Given I have a movies directory
|
||||
And I have a movies/_posts directory
|
||||
And I have a _layouts directory
|
||||
And I have the following post in "movies":
|
||||
| title | date | layout | categories | content |
|
||||
| Star Wars | 2009-03-27 | simple | [film, scifi] | Luke, I am your father. |
|
||||
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Post category: movies" in "_site/movies/film/scifi/2009/03/27/star-wars.html"
|
||||
|
||||
Scenario: Use post.categories variable when category is in a folder and duplicated category is in YAML
|
||||
Given I have a movies directory
|
||||
And I have a movies/_posts directory
|
||||
And I have a _layouts directory
|
||||
And I have the following post in "movies":
|
||||
| title | date | layout | category | content |
|
||||
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
|
||||
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
||||
|
||||
Scenario: Use post.tags variable
|
||||
Given I have a _posts directory
|
||||
And I have a _layouts directory
|
||||
@@ -129,12 +165,23 @@ Feature: Post data
|
||||
Then the _site directory should exist
|
||||
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
||||
|
||||
Scenario: Use post.categories variable when category is in YAML
|
||||
Scenario: Use post.categories variable when categories are in YAML
|
||||
Given I have a _posts directory
|
||||
And I have a _layouts directory
|
||||
And I have the following post:
|
||||
| title | date | layout | category | content |
|
||||
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
|
||||
| title | date | layout | categories | content |
|
||||
| Star Wars | 2009-03-27 | simple | ['scifi', 'movies'] | Luke, I am your father. |
|
||||
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
|
||||
|
||||
Scenario: Use post.categories variable when categories are in YAML and are duplicated
|
||||
Given I have a _posts directory
|
||||
And I have a _layouts directory
|
||||
And I have the following post:
|
||||
| title | date | layout | categories | content |
|
||||
| Star Wars | 2009-03-27 | simple | ['movies', 'movies'] | Luke, I am your father. |
|
||||
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
|
||||
35
features/rendering.feature
Normal file
35
features/rendering.feature
Normal file
@@ -0,0 +1,35 @@
|
||||
Feature: Rendering
|
||||
As a hacker who likes to blog
|
||||
I want to be able to make a static site
|
||||
In order to share my awesome ideas with the interwebs
|
||||
But I want to make it as simply as possible
|
||||
So render with Liquid and place in Layouts
|
||||
|
||||
Scenario: Render Liquid and place in layout
|
||||
Given I have a "index.html" page with layout "simple" that contains "Hi there, Jekyll {{ jekyll.environment }}!"
|
||||
And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Hi there, Jekyll development!\nAhoy, indeed" in "_site/index.html"
|
||||
|
||||
Scenario: Don't place asset files in layout
|
||||
Given I have an "index.scss" page with layout "simple" that contains ".foo-bar { color:black; }"
|
||||
And I have an "index.coffee" page with layout "simple" that contains "whatever()"
|
||||
And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should not see "Ahoy, indeed!" in "_site/index.css"
|
||||
And I should not see "Ahoy, indeed!" in "_site/index.js"
|
||||
|
||||
Scenario: Render liquid in Sass
|
||||
Given I have an "index.scss" page that contains ".foo-bar { color:{{site.color}}; }"
|
||||
And I have a configuration file with "color" set to "red"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see ".foo-bar {\n color: red; }" in "_site/index.css"
|
||||
|
||||
Scenario: Render liquid in CoffeeScript
|
||||
Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "hey = 'for cicada';" in "_site/index.js"
|
||||
@@ -243,33 +243,10 @@ Feature: Site configuration
|
||||
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
|
||||
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"
|
||||
|
||||
Scenario: Add a gem-based plugin
|
||||
Given I have an "index.html" file that contains "Whatever"
|
||||
And I have a configuration file with "gems" set to "[jekyll_test_plugin]"
|
||||
Scenario: arbitrary file reads via layouts
|
||||
Given I have an "index.html" page with layout "page" that contains "FOO"
|
||||
And I have a "_config.yml" file that contains "layouts: '../../../../../../../../../../../../../../usr/include'"
|
||||
When I run jekyll build
|
||||
Then the _site directory should exist
|
||||
And I should see "Whatever" in "_site/index.html"
|
||||
And I should see "this is a test" in "_site/test.txt"
|
||||
|
||||
Scenario: Add an empty whitelist to restrict all gems
|
||||
Given I have an "index.html" file that contains "Whatever"
|
||||
And I have a configuration file with:
|
||||
| key | value |
|
||||
| gems | [jekyll_test_plugin] |
|
||||
| whitelist | [] |
|
||||
When I run jekyll build --safe
|
||||
Then the _site directory should exist
|
||||
And I should see "Whatever" in "_site/index.html"
|
||||
And the "_site/test.txt" file should not exist
|
||||
|
||||
Scenario: Add a whitelist to restrict some gems but allow others
|
||||
Given I have an "index.html" file that contains "Whatever"
|
||||
And I have a configuration file with:
|
||||
| key | value |
|
||||
| gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] |
|
||||
| whitelist | [jekyll_test_plugin] |
|
||||
When I run jekyll build --safe
|
||||
Then the _site directory should exist
|
||||
And I should see "Whatever" in "_site/index.html"
|
||||
And the "_site/test.txt" file should exist
|
||||
And I should see "this is a test" in "_site/test.txt"
|
||||
And I should see "FOO" in "_site/index.html"
|
||||
And I should not see " " in "_site/index.html"
|
||||
|
||||
@@ -22,8 +22,9 @@ Before do
|
||||
end
|
||||
|
||||
After do
|
||||
FileUtils.rm_rf(TEST_DIR) if File.exists?(TEST_DIR)
|
||||
FileUtils.rm(JEKYLL_COMMAND_OUTPUT_FILE) if File.exists?(JEKYLL_COMMAND_OUTPUT_FILE)
|
||||
FileUtils.rm_rf(TEST_DIR) if File.exist?(TEST_DIR)
|
||||
FileUtils.rm(JEKYLL_COMMAND_OUTPUT_FILE) if File.exist?(JEKYLL_COMMAND_OUTPUT_FILE)
|
||||
Dir.chdir(File.dirname(TEST_DIR))
|
||||
end
|
||||
|
||||
World(Test::Unit::Assertions)
|
||||
@@ -133,6 +134,10 @@ Given /^I have fixture collections$/ do
|
||||
FileUtils.cp_r File.join(JEKYLL_SOURCE_DIR, "test", "source", "_methods"), source_dir
|
||||
end
|
||||
|
||||
Given /^I wait (\d+) second(s?)$/ do |time, plural|
|
||||
sleep(time.to_f)
|
||||
end
|
||||
|
||||
##################
|
||||
#
|
||||
# Changing stuff
|
||||
@@ -141,7 +146,14 @@ end
|
||||
|
||||
When /^I run jekyll(.*)$/ do |args|
|
||||
status = run_jekyll(args)
|
||||
if !status || args.include?("--verbose")
|
||||
if args.include?("--verbose") || ENV['DEBUG']
|
||||
puts jekyll_run_output
|
||||
end
|
||||
end
|
||||
|
||||
When /^I run bundle(.*)$/ do |args|
|
||||
status = run_bundle(args)
|
||||
if args.include?("--verbose") || ENV['DEBUG']
|
||||
puts jekyll_run_output
|
||||
end
|
||||
end
|
||||
@@ -181,7 +193,15 @@ Then /^I should see escaped "(.*)" in "(.*)"$/ do |text, file|
|
||||
end
|
||||
|
||||
Then /^the "(.*)" file should +exist$/ do |file|
|
||||
assert File.file?(file), "The file \"#{file}\" does not exist"
|
||||
file_does_exist = File.file?(file)
|
||||
unless file_does_exist
|
||||
all_steps_to_path(file).each do |dir|
|
||||
STDERR.puts ""
|
||||
STDERR.puts "Dir #{dir}:"
|
||||
STDERR.puts Dir["#{dir}/**/*"]
|
||||
end
|
||||
end
|
||||
assert file_does_exist, "The file \"#{file}\" does not exist.\n"
|
||||
end
|
||||
|
||||
Then /^the "(.*)" file should not exist$/ do |file|
|
||||
@@ -195,3 +215,7 @@ end
|
||||
Then /^I should see today's date in "(.*)"$/ do |file|
|
||||
assert_match Regexp.new(Date.today.to_s), file_contents(file)
|
||||
end
|
||||
|
||||
Then /^I should see "(.*)" in the build output$/ do |text|
|
||||
assert_match Regexp.new(text), jekyll_run_output
|
||||
end
|
||||
|
||||
@@ -1,30 +1,48 @@
|
||||
require 'coveralls'
|
||||
Coveralls.wear_merged!
|
||||
|
||||
require 'fileutils'
|
||||
require 'posix-spawn'
|
||||
require 'rr'
|
||||
require 'test/unit'
|
||||
require 'time'
|
||||
|
||||
JEKYLL_SOURCE_DIR = File.dirname(File.dirname(File.dirname(__FILE__)))
|
||||
TEST_DIR = File.expand_path(File.join('..', '..', 'tmp', 'jekyll'), File.dirname(__FILE__))
|
||||
JEKYLL_PATH = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll')
|
||||
JEKYLL_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll'))
|
||||
JEKYLL_COMMAND_OUTPUT_FILE = File.join(File.dirname(TEST_DIR), 'jekyll_output.txt')
|
||||
|
||||
def source_dir(*files)
|
||||
File.join(TEST_DIR, *files)
|
||||
end
|
||||
|
||||
def all_steps_to_path(path)
|
||||
source = Pathname.new(source_dir('_site')).expand_path
|
||||
dest = Pathname.new(path).expand_path
|
||||
paths = []
|
||||
dest.ascend do |f|
|
||||
break if f.eql? source
|
||||
paths.unshift f.to_s
|
||||
end
|
||||
paths
|
||||
end
|
||||
|
||||
def jekyll_output_file
|
||||
JEKYLL_COMMAND_OUTPUT_FILE
|
||||
end
|
||||
|
||||
def jekyll_run_output
|
||||
File.read(jekyll_output_file)
|
||||
File.read(jekyll_output_file) if File.file?(jekyll_output_file)
|
||||
end
|
||||
|
||||
def run_bundle(args)
|
||||
child = run_in_shell('bundle', *args.strip.split(' '))
|
||||
end
|
||||
|
||||
def run_jekyll(args)
|
||||
system "#{JEKYLL_PATH} #{args} --trace > #{jekyll_output_file} 2>&1"
|
||||
child = run_in_shell(JEKYLL_PATH, *args.strip.split(' '), "--trace")
|
||||
child.status.exitstatus == 0
|
||||
end
|
||||
|
||||
def run_in_shell(*args)
|
||||
POSIX::Spawn::Child.new *args, :out => [JEKYLL_COMMAND_OUTPUT_FILE, "w"]
|
||||
end
|
||||
|
||||
def slug(title)
|
||||
|
||||
147
features/support/overview.rb
Normal file
147
features/support/overview.rb
Normal file
@@ -0,0 +1,147 @@
|
||||
require 'fileutils'
|
||||
require 'colorator'
|
||||
require 'cucumber/formatter/console'
|
||||
require 'cucumber/formatter/io'
|
||||
require 'gherkin/formatter/escaping'
|
||||
|
||||
module Features
|
||||
module Support
|
||||
# The formatter used for <tt>--format pretty</tt> (the default formatter).
|
||||
#
|
||||
# This formatter prints features to plain text - exactly how they were parsed,
|
||||
# just prettier. That means with proper indentation and alignment of table columns.
|
||||
#
|
||||
# If the output is STDOUT (and not a file), there are bright colours to watch too.
|
||||
#
|
||||
class Overview
|
||||
include FileUtils
|
||||
include Cucumber::Formatter::Console
|
||||
include Cucumber::Formatter::Io
|
||||
include Gherkin::Formatter::Escaping
|
||||
attr_writer :indent
|
||||
attr_reader :runtime
|
||||
|
||||
def initialize(runtime, path_or_io, options)
|
||||
@runtime, @io, @options = runtime, ensure_io(path_or_io, "pretty"), options
|
||||
@exceptions = []
|
||||
@indent = 0
|
||||
@prefixes = options[:prefixes] || {}
|
||||
@delayed_messages = []
|
||||
end
|
||||
|
||||
def before_features(features)
|
||||
print_profile_information
|
||||
end
|
||||
|
||||
def after_features(features)
|
||||
@io.puts
|
||||
print_summary(features)
|
||||
end
|
||||
|
||||
def before_feature(feature)
|
||||
@exceptions = []
|
||||
@indent = 0
|
||||
end
|
||||
|
||||
def comment_line(comment_line)
|
||||
end
|
||||
|
||||
def after_tags(tags)
|
||||
end
|
||||
|
||||
def tag_name(tag_name)
|
||||
end
|
||||
|
||||
def before_feature_element(feature_element)
|
||||
@indent = 2
|
||||
@scenario_indent = 2
|
||||
end
|
||||
|
||||
def after_feature_element(feature_element)
|
||||
end
|
||||
|
||||
def before_background(background)
|
||||
@indent = 2
|
||||
@scenario_indent = 2
|
||||
@in_background = true
|
||||
end
|
||||
|
||||
def after_background(background)
|
||||
@in_background = nil
|
||||
end
|
||||
|
||||
def background_name(keyword, name, file_colon_line, source_indent)
|
||||
print_feature_element_name(keyword, name, file_colon_line, source_indent)
|
||||
end
|
||||
|
||||
def scenario_name(keyword, name, file_colon_line, source_indent)
|
||||
print_feature_element_name(keyword, name, file_colon_line, source_indent)
|
||||
end
|
||||
|
||||
def before_step(step)
|
||||
@current_step = step
|
||||
end
|
||||
|
||||
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
|
||||
@hide_this_step = false
|
||||
if exception
|
||||
if @exceptions.include?(exception)
|
||||
@hide_this_step = true
|
||||
return
|
||||
end
|
||||
@exceptions << exception
|
||||
end
|
||||
if status != :failed && @in_background ^ background
|
||||
@hide_this_step = true
|
||||
return
|
||||
end
|
||||
@status = status
|
||||
end
|
||||
|
||||
CHARS = {
|
||||
:failed => "x".red,
|
||||
:pending => "?".yellow,
|
||||
:undefined => "x".red,
|
||||
:passed => ".".green,
|
||||
:skipped => "-".blue
|
||||
}
|
||||
|
||||
def step_name(keyword, step_match, status, source_indent, background, file_colon_line)
|
||||
@io.print CHARS[status]
|
||||
end
|
||||
|
||||
def exception(exception, status)
|
||||
return if @hide_this_step
|
||||
@io.puts
|
||||
print_exception(exception, status, @indent)
|
||||
@io.flush
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def print_feature_element_name(keyword, name, file_colon_line, source_indent)
|
||||
@io.puts
|
||||
names = name.empty? ? [name] : name.split("\n")
|
||||
line = " #{keyword}: #{names[0]}"
|
||||
if @options[:source]
|
||||
line_comment = "#{file_colon_line}"
|
||||
@io.print(line_comment)
|
||||
end
|
||||
@io.print(line)
|
||||
@io.print " "
|
||||
@io.flush
|
||||
end
|
||||
|
||||
def cell_prefix(status)
|
||||
@prefixes[status]
|
||||
end
|
||||
|
||||
def print_summary(features)
|
||||
@io.puts
|
||||
print_stats(features, @options)
|
||||
print_snippets(@options)
|
||||
print_passing_wip(@options)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5,58 +5,44 @@ require 'jekyll/version'
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.specification_version = 2 if s.respond_to? :specification_version=
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
||||
s.rubygems_version = '2.2.2'
|
||||
s.required_ruby_version = '>= 1.9.3'
|
||||
s.required_ruby_version = '>= 2.0.0'
|
||||
|
||||
s.name = 'jekyll'
|
||||
s.version = Jekyll::VERSION
|
||||
s.license = 'MIT'
|
||||
s.name = 'jekyll'
|
||||
s.version = Jekyll::VERSION
|
||||
s.license = 'MIT'
|
||||
|
||||
s.summary = "A simple, blog aware, static site generator."
|
||||
s.description = "Jekyll is a simple, blog aware, static site generator."
|
||||
s.summary = 'A simple, blog aware, static site generator.'
|
||||
s.description = 'Jekyll is a simple, blog aware, static site generator.'
|
||||
|
||||
s.authors = ["Tom Preston-Werner"]
|
||||
s.email = 'tom@mojombo.com'
|
||||
s.homepage = 'http://github.com/jekyll/jekyll'
|
||||
s.authors = ['Tom Preston-Werner']
|
||||
s.email = 'tom@mojombo.com'
|
||||
s.homepage = 'https://github.com/jekyll/jekyll'
|
||||
|
||||
s.files = `git ls-files`.split($/)
|
||||
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
||||
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
||||
s.require_paths = ["lib"]
|
||||
all_files = `git ls-files -z`.split("\x0")
|
||||
s.files = all_files.grep(%r{^(bin|lib)/})
|
||||
s.executables = all_files.grep(%r{^bin/}) { |f| File.basename(f) }
|
||||
s.require_paths = ['lib']
|
||||
|
||||
s.rdoc_options = ["--charset=UTF-8"]
|
||||
s.rdoc_options = ['--charset=UTF-8']
|
||||
s.extra_rdoc_files = %w[README.markdown LICENSE]
|
||||
|
||||
s.add_runtime_dependency('liquid', "~> 2.5.5")
|
||||
s.add_runtime_dependency('classifier', "~> 1.3")
|
||||
s.add_runtime_dependency('listen', "~> 2.5")
|
||||
s.add_runtime_dependency('kramdown', "~> 1.3")
|
||||
s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
|
||||
s.add_runtime_dependency('mercenary', "~> 0.3.1")
|
||||
s.add_runtime_dependency('safe_yaml', "~> 1.0")
|
||||
s.add_runtime_dependency('colorator', "~> 0.1")
|
||||
s.add_runtime_dependency('redcarpet', "~> 3.1")
|
||||
s.add_runtime_dependency('liquid', '~> 3.0')
|
||||
s.add_runtime_dependency('kramdown', '~> 1.3')
|
||||
s.add_runtime_dependency('mercenary', '~> 0.3.3')
|
||||
s.add_runtime_dependency('safe_yaml', '~> 1.0')
|
||||
s.add_runtime_dependency('colorator', '~> 0.1')
|
||||
|
||||
# Before 3.0 drops, phase the following gems out as dev dependencies
|
||||
# and gracefully handle their absence.
|
||||
s.add_runtime_dependency('pygments.rb', '~> 0.6.0')
|
||||
s.add_runtime_dependency('redcarpet', '~> 3.1')
|
||||
s.add_runtime_dependency('toml', '~> 0.1.0')
|
||||
s.add_runtime_dependency('jekyll-paginate', '~> 1.0')
|
||||
s.add_runtime_dependency('jekyll-gist', '~> 1.0')
|
||||
s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0')
|
||||
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
|
||||
|
||||
s.add_development_dependency('rake', "~> 10.1")
|
||||
s.add_development_dependency('rdoc', "~> 3.11")
|
||||
s.add_development_dependency('redgreen', "~> 1.2")
|
||||
s.add_development_dependency('shoulda', "~> 3.5")
|
||||
s.add_development_dependency('rr', "~> 1.1")
|
||||
s.add_development_dependency('cucumber', "1.3.11")
|
||||
s.add_development_dependency('RedCloth', "~> 4.2")
|
||||
s.add_development_dependency('maruku', "0.7.0")
|
||||
s.add_development_dependency('rdiscount', "~> 1.6")
|
||||
s.add_development_dependency('launchy', "~> 2.3")
|
||||
s.add_development_dependency('simplecov', "~> 0.7")
|
||||
s.add_development_dependency('simplecov-gem-adapter', "~> 1.0.1")
|
||||
s.add_development_dependency('coveralls', "~> 0.7.0")
|
||||
s.add_development_dependency('mime-types', "~> 1.5")
|
||||
s.add_development_dependency('activesupport', '~> 3.2.13')
|
||||
s.add_development_dependency('jekyll_test_plugin')
|
||||
s.add_development_dependency('jekyll_test_plugin_malicious')
|
||||
s.add_development_dependency('rouge', '~> 1.3')
|
||||
s.add_runtime_dependency('jekyll-watch', '~> 1.1')
|
||||
s.add_runtime_dependency('classifier-reborn', '~> 2.0')
|
||||
end
|
||||
|
||||
235
lib/jekyll.rb
235
lib/jekyll.rb
@@ -18,50 +18,150 @@ require 'rubygems'
|
||||
# stdlib
|
||||
require 'fileutils'
|
||||
require 'time'
|
||||
require 'safe_yaml/load'
|
||||
require 'English'
|
||||
require 'pathname'
|
||||
require 'logger'
|
||||
require 'set'
|
||||
|
||||
# 3rd party
|
||||
require 'safe_yaml/load'
|
||||
require 'liquid'
|
||||
require 'kramdown'
|
||||
require 'colorator'
|
||||
require 'toml'
|
||||
|
||||
# internal requires
|
||||
require 'jekyll/version'
|
||||
require 'jekyll/utils'
|
||||
require 'jekyll/stevenson'
|
||||
require 'jekyll/deprecator'
|
||||
require 'jekyll/configuration'
|
||||
require 'jekyll/document'
|
||||
require 'jekyll/collection'
|
||||
require 'jekyll/plugin_manager'
|
||||
require 'jekyll/frontmatter_defaults'
|
||||
require 'jekyll/site'
|
||||
require 'jekyll/convertible'
|
||||
require 'jekyll/url'
|
||||
require 'jekyll/layout'
|
||||
require 'jekyll/page'
|
||||
require 'jekyll/post'
|
||||
require 'jekyll/excerpt'
|
||||
require 'jekyll/draft'
|
||||
require 'jekyll/filters'
|
||||
require 'jekyll/static_file'
|
||||
require 'jekyll/errors'
|
||||
require 'jekyll/related_posts'
|
||||
require 'jekyll/cleaner'
|
||||
require 'jekyll/entry_filter'
|
||||
require 'jekyll/layout_reader'
|
||||
require 'jekyll/publisher'
|
||||
require 'jekyll/renderer'
|
||||
SafeYAML::OPTIONS[:suppress_warnings] = true
|
||||
Liquid::Template.error_mode = :strict
|
||||
|
||||
# extensions
|
||||
require 'jekyll/plugin'
|
||||
require 'jekyll/converter'
|
||||
require 'jekyll/generator'
|
||||
require 'jekyll/command'
|
||||
require 'jekyll/liquid_extensions'
|
||||
module Jekyll
|
||||
|
||||
# internal requires
|
||||
autoload :Cleaner, 'jekyll/cleaner'
|
||||
autoload :Collection, 'jekyll/collection'
|
||||
autoload :Configuration, 'jekyll/configuration'
|
||||
autoload :Convertible, 'jekyll/convertible'
|
||||
autoload :Deprecator, 'jekyll/deprecator'
|
||||
autoload :Document, 'jekyll/document'
|
||||
autoload :Draft, 'jekyll/draft'
|
||||
autoload :EntryFilter, 'jekyll/entry_filter'
|
||||
autoload :Errors, 'jekyll/errors'
|
||||
autoload :Excerpt, 'jekyll/excerpt'
|
||||
autoload :External, 'jekyll/external'
|
||||
autoload :Filters, 'jekyll/filters'
|
||||
autoload :FrontmatterDefaults, 'jekyll/frontmatter_defaults'
|
||||
autoload :Layout, 'jekyll/layout'
|
||||
autoload :LayoutReader, 'jekyll/layout_reader'
|
||||
autoload :LogAdapter, 'jekyll/log_adapter'
|
||||
autoload :Metadata, 'jekyll/metadata'
|
||||
autoload :Page, 'jekyll/page'
|
||||
autoload :PluginManager, 'jekyll/plugin_manager'
|
||||
autoload :Post, 'jekyll/post'
|
||||
autoload :Publisher, 'jekyll/publisher'
|
||||
autoload :RelatedPosts, 'jekyll/related_posts'
|
||||
autoload :Renderer, 'jekyll/renderer'
|
||||
autoload :Site, 'jekyll/site'
|
||||
autoload :StaticFile, 'jekyll/static_file'
|
||||
autoload :Stevenson, 'jekyll/stevenson'
|
||||
autoload :URL, 'jekyll/url'
|
||||
autoload :Utils, 'jekyll/utils'
|
||||
autoload :VERSION, 'jekyll/version'
|
||||
|
||||
# extensions
|
||||
require 'jekyll/plugin'
|
||||
require 'jekyll/converter'
|
||||
require 'jekyll/generator'
|
||||
require 'jekyll/command'
|
||||
require 'jekyll/liquid_extensions'
|
||||
|
||||
class << self
|
||||
# Public: Tells you which Jekyll environment you are building in so you can skip tasks
|
||||
# if you need to. This is useful when doing expensive compression tasks on css and
|
||||
# images and allows you to skip that when working in development.
|
||||
|
||||
def env
|
||||
ENV["JEKYLL_ENV"] || "development"
|
||||
end
|
||||
|
||||
# Public: Generate a Jekyll configuration Hash by merging the default
|
||||
# options with anything in _config.yml, and adding the given options on top.
|
||||
#
|
||||
# override - A Hash of config directives that override any options in both
|
||||
# the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
|
||||
# list of option names and their defaults.
|
||||
#
|
||||
# Returns the final configuration Hash.
|
||||
def configuration(override = Hash.new)
|
||||
config = Configuration[Configuration::DEFAULTS]
|
||||
override = Configuration[override].stringify_keys
|
||||
unless override.delete('skip_config_files')
|
||||
config = config.read_config_files(config.config_files(override))
|
||||
end
|
||||
|
||||
# Merge DEFAULTS < _config.yml < override
|
||||
config = Utils.deep_merge_hashes(config, override).stringify_keys
|
||||
set_timezone(config['timezone']) if config['timezone']
|
||||
|
||||
config
|
||||
end
|
||||
|
||||
# Public: Set the TZ environment variable to use the timezone specified
|
||||
#
|
||||
# timezone - the IANA Time Zone
|
||||
#
|
||||
# Returns nothing
|
||||
def set_timezone(timezone)
|
||||
ENV['TZ'] = timezone
|
||||
end
|
||||
|
||||
# Public: Fetch the logger instance for this Jekyll process.
|
||||
#
|
||||
# Returns the LogAdapter instance.
|
||||
def logger
|
||||
@logger ||= LogAdapter.new(Stevenson.new, (ENV["JEKYLL_LOG_LEVEL"] || :info).to_sym)
|
||||
end
|
||||
|
||||
# Public: Set the log writer.
|
||||
# New log writer must respond to the same methods
|
||||
# as Ruby's interal Logger.
|
||||
#
|
||||
# writer - the new Logger-compatible log transport
|
||||
#
|
||||
# Returns the new logger.
|
||||
def logger=(writer)
|
||||
@logger = LogAdapter.new(writer)
|
||||
end
|
||||
|
||||
# Public: An array of sites
|
||||
#
|
||||
# Returns the Jekyll sites created.
|
||||
def sites
|
||||
@sites ||= []
|
||||
end
|
||||
|
||||
# Public: Ensures the questionable path is prefixed with the base directory
|
||||
# and prepends the questionable path with the base directory if false.
|
||||
#
|
||||
# base_directory - the directory with which to prefix the questionable path
|
||||
# questionable_path - the path we're unsure about, and want prefixed
|
||||
#
|
||||
# Returns the sanitized path.
|
||||
def sanitized_path(base_directory, questionable_path)
|
||||
return base_directory if base_directory.eql?(questionable_path)
|
||||
|
||||
clean_path = File.expand_path(questionable_path, "/")
|
||||
clean_path = clean_path.sub(/\A\w\:\//, '/')
|
||||
|
||||
unless clean_path.start_with?(base_directory.sub(/\A\w\:\//, '/'))
|
||||
File.join(base_directory, clean_path)
|
||||
else
|
||||
clean_path
|
||||
end
|
||||
end
|
||||
|
||||
# Conditional optimizations
|
||||
Jekyll::External.require_if_present('liquid-c')
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
require_all 'jekyll/commands'
|
||||
require_all 'jekyll/converters'
|
||||
@@ -69,60 +169,11 @@ require_all 'jekyll/converters/markdown'
|
||||
require_all 'jekyll/generators'
|
||||
require_all 'jekyll/tags'
|
||||
|
||||
# plugins
|
||||
require 'jekyll-coffeescript'
|
||||
require 'jekyll-sass-converter'
|
||||
|
||||
SafeYAML::OPTIONS[:suppress_warnings] = true
|
||||
|
||||
module Jekyll
|
||||
# Public: Generate a Jekyll configuration Hash by merging the default
|
||||
# options with anything in _config.yml, and adding the given options on top.
|
||||
#
|
||||
# override - A Hash of config directives that override any options in both
|
||||
# the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
|
||||
# list of option names and their defaults.
|
||||
#
|
||||
# Returns the final configuration Hash.
|
||||
def self.configuration(override)
|
||||
config = Configuration[Configuration::DEFAULTS]
|
||||
override = Configuration[override].stringify_keys
|
||||
config = config.read_config_files(config.config_files(override))
|
||||
|
||||
# Merge DEFAULTS < _config.yml < override
|
||||
config = Utils.deep_merge_hashes(config, override).stringify_keys
|
||||
set_timezone(config['timezone']) if config['timezone']
|
||||
|
||||
config
|
||||
end
|
||||
|
||||
# Static: Set the TZ environment variable to use the timezone specified
|
||||
#
|
||||
# timezone - the IANA Time Zone
|
||||
#
|
||||
# Returns nothing
|
||||
def self.set_timezone(timezone)
|
||||
ENV['TZ'] = timezone
|
||||
end
|
||||
|
||||
def self.logger
|
||||
@logger ||= Stevenson.new
|
||||
end
|
||||
|
||||
# Public: File system root
|
||||
#
|
||||
# Returns the root of the filesystem as a Pathname
|
||||
def self.fs_root
|
||||
@fs_root ||= "/"
|
||||
end
|
||||
|
||||
def self.sanitized_path(base_directory, questionable_path)
|
||||
clean_path = File.expand_path(questionable_path, fs_root)
|
||||
clean_path.gsub!(/\A\w\:\//, '/')
|
||||
unless clean_path.start_with?(base_directory)
|
||||
File.join(base_directory, clean_path)
|
||||
else
|
||||
clean_path
|
||||
end
|
||||
end
|
||||
end
|
||||
# Eventually remove these for 3.0 as non-core
|
||||
Jekyll::External.require_with_graceful_fail(%w[
|
||||
toml
|
||||
jekyll-paginate
|
||||
jekyll-gist
|
||||
jekyll-coffeescript
|
||||
jekyll-sass-converter
|
||||
])
|
||||
|
||||
@@ -13,6 +13,7 @@ module Jekyll
|
||||
# Cleans up the site's destination directory
|
||||
def cleanup!
|
||||
FileUtils.rm_rf(obsolete_files)
|
||||
FileUtils.rm_rf(metadata_file) if @site.full_rebuild?
|
||||
end
|
||||
|
||||
private
|
||||
@@ -24,13 +25,20 @@ module Jekyll
|
||||
(existing_files - new_files - new_dirs + replaced_files).to_a
|
||||
end
|
||||
|
||||
# Private: The metadata file storing dependency tree and build history
|
||||
#
|
||||
# Returns an Array with the metdata file as the only item
|
||||
def metadata_file
|
||||
[site.metadata.metadata_file]
|
||||
end
|
||||
|
||||
# Private: The list of existing files, apart from those included in keep_files and hidden files.
|
||||
#
|
||||
# Returns a Set with the file paths
|
||||
def existing_files
|
||||
files = Set.new
|
||||
Dir.glob(File.join(site.dest, "**", "*"), File::FNM_DOTMATCH) do |file|
|
||||
files << file unless file =~ /\/\.{1,2}$/ || file =~ keep_file_regex
|
||||
Dir.glob(site.in_dest_dir("**", "*"), File::FNM_DOTMATCH) do |file|
|
||||
files << file unless file =~ /\/\.{1,2}$/ || file =~ keep_file_regex || keep_dirs.include?(file)
|
||||
end
|
||||
files
|
||||
end
|
||||
@@ -49,7 +57,19 @@ module Jekyll
|
||||
#
|
||||
# Returns a Set with the directory paths
|
||||
def new_dirs
|
||||
new_files.map { |file| File.dirname(file) }.to_set
|
||||
new_files.map { |file| parent_dirs(file) }.flatten.to_set
|
||||
end
|
||||
|
||||
# Private: The list of parent directories of a given file
|
||||
#
|
||||
# Returns an Array with the directory paths
|
||||
def parent_dirs(file)
|
||||
parent_dir = File.dirname(file)
|
||||
if parent_dir == site.dest
|
||||
[]
|
||||
else
|
||||
[parent_dir] + parent_dirs(parent_dir)
|
||||
end
|
||||
end
|
||||
|
||||
# Private: The list of existing files that will be replaced by a directory during build
|
||||
@@ -59,6 +79,14 @@ module Jekyll
|
||||
new_dirs.select { |dir| File.file?(dir) }.to_set
|
||||
end
|
||||
|
||||
# Private: The list of directories that need to be kept because they are parent directories
|
||||
# of files specified in keep_files
|
||||
#
|
||||
# Returns a Set with the directory paths
|
||||
def keep_dirs
|
||||
site.keep_files.map { |file| parent_dirs(site.in_dest_dir(file)) }.flatten.to_set
|
||||
end
|
||||
|
||||
# Private: Creates a regular expression from the config's keep_files array
|
||||
#
|
||||
# Examples
|
||||
|
||||
@@ -22,14 +22,29 @@ module Jekyll
|
||||
@docs ||= []
|
||||
end
|
||||
|
||||
# Fetch the static files in this collection.
|
||||
# Defaults to an empty array if no static files have been read in.
|
||||
#
|
||||
# Returns an array of Jekyll::StaticFile objects.
|
||||
def files
|
||||
@files ||= []
|
||||
end
|
||||
|
||||
# Read the allowed documents into the collection's array of docs.
|
||||
#
|
||||
# Returns the sorted array of docs.
|
||||
def read
|
||||
filtered_entries.each do |file_path|
|
||||
doc = Jekyll::Document.new(Jekyll.sanitized_path(directory, file_path), { site: site, collection: self })
|
||||
doc.read
|
||||
docs << doc
|
||||
full_path = collection_dir(file_path)
|
||||
next if File.directory?(full_path)
|
||||
if Utils.has_yaml_header? full_path
|
||||
doc = Jekyll::Document.new(full_path, { site: site, collection: self })
|
||||
doc.read
|
||||
docs << doc if site.publisher.publish?(doc)
|
||||
else
|
||||
relative_dir = Jekyll.sanitized_path(relative_directory, File.dirname(file_path)).chomp("/.")
|
||||
files << StaticFile.new(site, site.source, relative_dir, File.basename(full_path), self)
|
||||
end
|
||||
end
|
||||
docs.sort!
|
||||
end
|
||||
@@ -40,9 +55,10 @@ module Jekyll
|
||||
# relative to the collection's directory
|
||||
def entries
|
||||
return Array.new unless exists?
|
||||
Dir.glob(File.join(directory, "**", "*.*")).map do |entry|
|
||||
entry[File.join(directory, "")] = ''; entry
|
||||
end
|
||||
@entries ||=
|
||||
Dir.glob(collection_dir("**", "*.*")).map do |entry|
|
||||
entry["#{collection_dir}/"] = ''; entry
|
||||
end
|
||||
end
|
||||
|
||||
# Filtered version of the entries in this collection.
|
||||
@@ -51,9 +67,13 @@ module Jekyll
|
||||
# Returns a list of filtered entry paths.
|
||||
def filtered_entries
|
||||
return Array.new unless exists?
|
||||
Dir.chdir(directory) do
|
||||
entry_filter.filter(entries)
|
||||
end
|
||||
@filtered_entries ||=
|
||||
Dir.chdir(directory) do
|
||||
entry_filter.filter(entries).reject do |f|
|
||||
path = collection_dir(f)
|
||||
File.directory?(path) || (File.symlink?(f) && site.safe)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# The directory for this Collection, relative to the site source.
|
||||
@@ -61,15 +81,28 @@ module Jekyll
|
||||
# Returns a String containing the directory name where the collection
|
||||
# is stored on the filesystem.
|
||||
def relative_directory
|
||||
"_#{label}"
|
||||
@relative_directory ||= "_#{label}"
|
||||
end
|
||||
|
||||
# The full path to the directory containing the
|
||||
# The full path to the directory containing the collection.
|
||||
#
|
||||
# Returns a String containing th directory name where the collection
|
||||
# is stored on the filesystem.
|
||||
def directory
|
||||
Jekyll.sanitized_path(site.source, relative_directory)
|
||||
@directory ||= site.in_source_dir(relative_directory)
|
||||
end
|
||||
|
||||
# The full path to the directory containing the collection, with
|
||||
# optional subpaths.
|
||||
#
|
||||
# *files - (optional) any other path pieces relative to the
|
||||
# directory to append to the path
|
||||
#
|
||||
# Returns a String containing th directory name where the collection
|
||||
# is stored on the filesystem.
|
||||
def collection_dir(*files)
|
||||
return directory if files.empty?
|
||||
site.in_source_dir(relative_directory, *files)
|
||||
end
|
||||
|
||||
# Checks whether the directory "exists" for this collection.
|
||||
@@ -105,7 +138,7 @@ module Jekyll
|
||||
#
|
||||
# Returns a sanitized version of the label.
|
||||
def sanitize_label(label)
|
||||
label.gsub(/[^a-z0-9_\-]/i, '')
|
||||
label.gsub(/[^a-z0-9_\-\.]/i, '')
|
||||
end
|
||||
|
||||
# Produce a representation of this Collection for use in Liquid.
|
||||
@@ -118,6 +151,7 @@ module Jekyll
|
||||
metadata.merge({
|
||||
"label" => label,
|
||||
"docs" => docs,
|
||||
"files" => files,
|
||||
"directory" => directory,
|
||||
"output" => write?,
|
||||
"relative_directory" => relative_directory
|
||||
@@ -132,6 +166,13 @@ module Jekyll
|
||||
!!metadata['output']
|
||||
end
|
||||
|
||||
# The URL template to render collection's documents at.
|
||||
#
|
||||
# Returns the URL template to render collection's documents at.
|
||||
def url_template
|
||||
metadata.fetch('permalink', "/:collection/:path:output_ext")
|
||||
end
|
||||
|
||||
# Extract options for this collection from the site configuration.
|
||||
#
|
||||
# Returns the metadata for this collection
|
||||
@@ -142,6 +183,5 @@ module Jekyll
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,21 +19,6 @@ module Jekyll
|
||||
super(base)
|
||||
end
|
||||
|
||||
# Listing of all directories (globbed to include subfiles and folders)
|
||||
#
|
||||
# source - the source path
|
||||
# destination - the destination path
|
||||
#
|
||||
# Returns an Array of directory globs in the source, excluding the destination
|
||||
def globs(source, destination)
|
||||
Dir.chdir(source) do
|
||||
dirs = Dir['*'].select { |x| File.directory?(x) }
|
||||
dirs -= [destination, File.expand_path(destination), File.basename(destination)]
|
||||
dirs = dirs.map { |x| "#{x}/**/*" }
|
||||
dirs += ['*']
|
||||
end
|
||||
end
|
||||
|
||||
# Run Site#process and catch errors
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
@@ -41,7 +26,7 @@ module Jekyll
|
||||
# Returns nothing
|
||||
def process_site(site)
|
||||
site.process
|
||||
rescue Jekyll::FatalException => e
|
||||
rescue Jekyll::Errors::FatalException => e
|
||||
Jekyll.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
|
||||
Jekyll.logger.error "", "------------------------------------"
|
||||
Jekyll.logger.error "", e.message
|
||||
@@ -66,13 +51,14 @@ module Jekyll
|
||||
c.option 'config', '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
||||
c.option 'future', '--future', 'Publishes posts with a future date'
|
||||
c.option 'limit_posts', '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
|
||||
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
|
||||
c.option 'watch', '-w', '--[no-]watch', 'Watch for changes and rebuild'
|
||||
c.option 'force_polling', '--force_polling', 'Force watch to use polling'
|
||||
c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
|
||||
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
|
||||
c.option 'unpublished', '--unpublished', 'Render posts that were marked as unpublished'
|
||||
c.option 'quiet', '-q', '--quiet', 'Silence output.'
|
||||
c.option 'verbose', '-V', '--verbose', 'Print verbose output.'
|
||||
c.option 'full_rebuild', '-f', '--full-rebuild', 'Disable incremental rebuild.'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -9,6 +9,7 @@ module Jekyll
|
||||
prog.command(:build) do |c|
|
||||
c.syntax 'build [options]'
|
||||
c.description 'Build your site'
|
||||
c.alias :b
|
||||
|
||||
add_build_options(c)
|
||||
|
||||
@@ -22,26 +23,37 @@ module Jekyll
|
||||
# Build your jekyll site
|
||||
# Continuously watch if `watch` is set to true in the config.
|
||||
def process(options)
|
||||
Jekyll.logger.log_level = :error if options['quiet']
|
||||
|
||||
options = configuration_from_options(options)
|
||||
site = Jekyll::Site.new(options)
|
||||
|
||||
Jekyll.logger.log_level = :error if options['quiet']
|
||||
if options.fetch('skip_initial_build', false)
|
||||
Jekyll.logger.warn "Build Warning:", "Skipping the initial build. This may result in an out-of-date site."
|
||||
else
|
||||
build(site, options)
|
||||
end
|
||||
|
||||
build(site, options)
|
||||
watch(site, options) if options['watch']
|
||||
if options.fetch('watch', false)
|
||||
watch(site, options)
|
||||
else
|
||||
Jekyll.logger.info "Auto-regeneration:", "disabled. Use --watch to enable."
|
||||
end
|
||||
end
|
||||
|
||||
# Build your Jekyll site.
|
||||
#
|
||||
# site - the Jekyll::Site instance to build
|
||||
# options - the
|
||||
# options - A Hash of options passed to the command
|
||||
#
|
||||
# Returns nothing.
|
||||
def build(site, options)
|
||||
source = options['source']
|
||||
destination = options['destination']
|
||||
full_build = options['full_rebuild']
|
||||
Jekyll.logger.info "Source:", source
|
||||
Jekyll.logger.info "Destination:", destination
|
||||
Jekyll.logger.info "Incremental build:", (full_build ? "disabled" : "enabled")
|
||||
Jekyll.logger.info "Generating..."
|
||||
process_site(site)
|
||||
Jekyll.logger.info "", "done."
|
||||
@@ -54,43 +66,8 @@ module Jekyll
|
||||
#
|
||||
# Returns nothing.
|
||||
def watch(site, options)
|
||||
require 'listen'
|
||||
|
||||
source = options['source']
|
||||
destination = options['destination']
|
||||
|
||||
begin
|
||||
dest = Pathname.new(destination).relative_path_from(Pathname.new(source)).to_s
|
||||
ignored = Regexp.new(Regexp.escape(dest))
|
||||
rescue ArgumentError
|
||||
# Destination is outside the source, no need to ignore it.
|
||||
ignored = nil
|
||||
end
|
||||
|
||||
Jekyll.logger.info "Auto-regeneration:", "enabled"
|
||||
|
||||
listener = Listen.to(
|
||||
source,
|
||||
:ignore => ignored,
|
||||
:force_polling => options['force_polling']
|
||||
) do |modified, added, removed|
|
||||
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
||||
n = modified.length + added.length + removed.length
|
||||
print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "
|
||||
process_site(site)
|
||||
puts "...done."
|
||||
end
|
||||
listener.start
|
||||
|
||||
unless options['serving']
|
||||
trap("INT") do
|
||||
listener.stop
|
||||
puts " Halting auto-regeneration."
|
||||
exit 0
|
||||
end
|
||||
|
||||
loop { sleep 1000 }
|
||||
end
|
||||
External.require_with_graceful_fail 'jekyll-watch'
|
||||
Jekyll::Watcher.watch(options)
|
||||
end
|
||||
|
||||
end # end of class << self
|
||||
|
||||
42
lib/jekyll/commands/clean.rb
Normal file
42
lib/jekyll/commands/clean.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
module Jekyll
|
||||
module Commands
|
||||
class Clean < Command
|
||||
class << self
|
||||
|
||||
def init_with_program(prog)
|
||||
prog.command(:clean) do |c|
|
||||
c.syntax 'clean [subcommand]'
|
||||
c.description 'Clean the site (removes site output and metadata file) without building.'
|
||||
|
||||
c.action do |args, _|
|
||||
Jekyll::Commands::Clean.process({})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def process(options)
|
||||
options = configuration_from_options(options)
|
||||
destination = options['destination']
|
||||
metadata_file = File.join(options['source'], '.jekyll-metadata')
|
||||
|
||||
if File.directory? destination
|
||||
Jekyll.logger.info "Cleaning #{destination}..."
|
||||
FileUtils.rm_rf(destination)
|
||||
Jekyll.logger.info "", "done."
|
||||
else
|
||||
Jekyll.logger.info "Nothing to do for #{destination}."
|
||||
end
|
||||
|
||||
if File.file? metadata_file
|
||||
Jekyll.logger.info "Removing #{metadata_file}..."
|
||||
FileUtils.rm_rf(metadata_file)
|
||||
Jekyll.logger.info "", "done."
|
||||
else
|
||||
Jekyll.logger.info "Nothing to do for #{metadata_file}."
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,30 +0,0 @@
|
||||
module Jekyll
|
||||
module Commands
|
||||
class Docs < Command
|
||||
|
||||
class << self
|
||||
|
||||
def init_with_program(prog)
|
||||
prog.command(:docs) do |c|
|
||||
c.syntax 'docs'
|
||||
c.description "Launch local server with docs for Jekyll v#{Jekyll::VERSION}"
|
||||
|
||||
c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
|
||||
c.option 'host', '-H', '--host [HOST]', 'Host to bind to'
|
||||
|
||||
c.action do |args, options|
|
||||
options.merge!({
|
||||
'source' => File.expand_path("../../../site", File.dirname(__FILE__)),
|
||||
'destination' => File.expand_path("../../../site/_site", File.dirname(__FILE__))
|
||||
})
|
||||
Jekyll::Commands::Build.process(options)
|
||||
Jekyll::Commands::Serve.process(options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
33
lib/jekyll/commands/help.rb
Normal file
33
lib/jekyll/commands/help.rb
Normal file
@@ -0,0 +1,33 @@
|
||||
module Jekyll
|
||||
module Commands
|
||||
class Help < Command
|
||||
class << self
|
||||
|
||||
def init_with_program(prog)
|
||||
prog.command(:help) do |c|
|
||||
c.syntax 'help [subcommand]'
|
||||
c.description 'Show the help message, optionally for a given subcommand.'
|
||||
|
||||
c.action do |args, _|
|
||||
cmd = (args.first || "").to_sym
|
||||
if args.empty?
|
||||
puts prog
|
||||
elsif prog.has_command? cmd
|
||||
puts prog.commands[cmd]
|
||||
else
|
||||
invalid_command(prog, cmd)
|
||||
abort
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def invalid_command(prog, cmd)
|
||||
Jekyll.logger.error "Error:", "Hmm... we don't know what the '#{cmd}' command is."
|
||||
Jekyll.logger.info "Valid commands:", prog.commands.keys.join(", ")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -3,78 +3,80 @@ require 'erb'
|
||||
module Jekyll
|
||||
module Commands
|
||||
class New < Command
|
||||
def self.init_with_program(prog)
|
||||
prog.command(:new) do |c|
|
||||
c.syntax 'new PATH'
|
||||
c.description 'Creates a new Jekyll site scaffold in PATH'
|
||||
class << self
|
||||
def init_with_program(prog)
|
||||
prog.command(:new) do |c|
|
||||
c.syntax 'new PATH'
|
||||
c.description 'Creates a new Jekyll site scaffold in PATH'
|
||||
|
||||
c.option 'force', '--force', 'Force creation even if PATH already exists'
|
||||
c.option 'blank', '--blank', 'Creates scaffolding but with empty files'
|
||||
|
||||
c.action do |args, options|
|
||||
Jekyll::Commands::New.process(args, options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.process(args, options = {})
|
||||
raise ArgumentError.new('You must specify a path.') if args.empty?
|
||||
|
||||
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
||||
FileUtils.mkdir_p new_blog_path
|
||||
if preserve_source_location?(new_blog_path, options)
|
||||
Jekyll.logger.abort_with "Conflict:", "#{new_blog_path} exists and is not empty."
|
||||
end
|
||||
|
||||
if options["blank"]
|
||||
create_blank_site new_blog_path
|
||||
else
|
||||
create_sample_files new_blog_path
|
||||
|
||||
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
|
||||
f.write(scaffold_post_content)
|
||||
c.option 'force', '--force', 'Force creation even if PATH already exists'
|
||||
c.option 'blank', '--blank', 'Creates scaffolding but with empty files'
|
||||
|
||||
c.action do |args, options|
|
||||
Jekyll::Commands::New.process(args, options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
|
||||
end
|
||||
def process(args, options = {})
|
||||
raise ArgumentError.new('You must specify a path.') if args.empty?
|
||||
|
||||
def self.create_blank_site(path)
|
||||
Dir.chdir(path) do
|
||||
FileUtils.mkdir(%w(_layouts _posts _drafts))
|
||||
FileUtils.touch("index.html")
|
||||
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
||||
FileUtils.mkdir_p new_blog_path
|
||||
if preserve_source_location?(new_blog_path, options)
|
||||
Jekyll.logger.abort_with "Conflict:", "#{new_blog_path} exists and is not empty."
|
||||
end
|
||||
|
||||
if options["blank"]
|
||||
create_blank_site new_blog_path
|
||||
else
|
||||
create_sample_files new_blog_path
|
||||
|
||||
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
|
||||
f.write(scaffold_post_content)
|
||||
end
|
||||
end
|
||||
|
||||
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
|
||||
end
|
||||
end
|
||||
|
||||
def self.scaffold_post_content
|
||||
ERB.new(File.read(File.expand_path(scaffold_path, site_template))).result
|
||||
end
|
||||
def create_blank_site(path)
|
||||
Dir.chdir(path) do
|
||||
FileUtils.mkdir(%w(_layouts _posts _drafts))
|
||||
FileUtils.touch("index.html")
|
||||
end
|
||||
end
|
||||
|
||||
# Internal: Gets the filename of the sample post to be created
|
||||
#
|
||||
# Returns the filename of the sample post, as a String
|
||||
def self.initialized_post_name
|
||||
"_posts/#{Time.now.strftime('%Y-%m-%d')}-welcome-to-jekyll.markdown"
|
||||
end
|
||||
def scaffold_post_content
|
||||
ERB.new(File.read(File.expand_path(scaffold_path, site_template))).result
|
||||
end
|
||||
|
||||
private
|
||||
# Internal: Gets the filename of the sample post to be created
|
||||
#
|
||||
# Returns the filename of the sample post, as a String
|
||||
def initialized_post_name
|
||||
"_posts/#{Time.now.strftime('%Y-%m-%d')}-welcome-to-jekyll.markdown"
|
||||
end
|
||||
|
||||
def self.preserve_source_location?(path, options)
|
||||
!options["force"] && !Dir["#{path}/**/*"].empty?
|
||||
end
|
||||
private
|
||||
|
||||
def self.create_sample_files(path)
|
||||
FileUtils.cp_r site_template + '/.', path
|
||||
FileUtils.rm File.expand_path(scaffold_path, path)
|
||||
end
|
||||
def preserve_source_location?(path, options)
|
||||
!options["force"] && !Dir["#{path}/**/*"].empty?
|
||||
end
|
||||
|
||||
def self.site_template
|
||||
File.expand_path("../../site_template", File.dirname(__FILE__))
|
||||
end
|
||||
def create_sample_files(path)
|
||||
FileUtils.cp_r site_template + '/.', path
|
||||
FileUtils.rm File.expand_path(scaffold_path, path)
|
||||
end
|
||||
|
||||
def self.scaffold_path
|
||||
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
|
||||
end
|
||||
def site_template
|
||||
File.expand_path("../../site_template", File.dirname(__FILE__))
|
||||
end
|
||||
|
||||
def scaffold_path
|
||||
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,7 @@ module Jekyll
|
||||
c.syntax 'serve [options]'
|
||||
c.description 'Serve your site locally'
|
||||
c.alias :server
|
||||
c.alias :s
|
||||
|
||||
add_build_options(c)
|
||||
|
||||
@@ -17,9 +18,11 @@ module Jekyll
|
||||
c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
|
||||
c.option 'host', '-H', '--host [HOST]', 'Host to bind to'
|
||||
c.option 'baseurl', '-b', '--baseurl [URL]', 'Base URL'
|
||||
c.option 'skip_initial_build', '--skip-initial-build', 'Skips the initial site build which occurs before the server is started.'
|
||||
|
||||
c.action do |args, options|
|
||||
options["serving"] ||= true
|
||||
options["serving"] = true
|
||||
options["watch"] = true unless options.key?("watch")
|
||||
Jekyll::Commands::Build.process(options)
|
||||
Jekyll::Commands::Serve.process(options)
|
||||
end
|
||||
@@ -73,16 +76,20 @@ module Jekyll
|
||||
|
||||
def webrick_options(config)
|
||||
opts = {
|
||||
:DocumentRoot => config['destination'],
|
||||
:Port => config['port'],
|
||||
:BindAddress => config['host'],
|
||||
:MimeTypes => mime_types,
|
||||
:DirectoryIndex => %w(index.html index.htm index.cgi index.rhtml index.xml),
|
||||
:DocumentRoot => config['destination'],
|
||||
:DoNotReverseLookup => true,
|
||||
:StartCallback => start_callback(config['detach']),
|
||||
:DirectoryIndex => %w(index.html index.htm index.cgi index.rhtml index.xml)
|
||||
:MimeTypes => mime_types,
|
||||
:Port => config['port'],
|
||||
:StartCallback => start_callback(config['detach'])
|
||||
}
|
||||
|
||||
if !config['verbose']
|
||||
if config['verbose']
|
||||
opts.merge!({
|
||||
:Logger => WEBrick::Log.new($stdout, WEBrick::Log::DEBUG)
|
||||
})
|
||||
else
|
||||
opts.merge!({
|
||||
:AccessLog => [],
|
||||
:Logger => WEBrick::Log.new([], WEBrick::Log::WARN)
|
||||
@@ -116,9 +123,10 @@ module Jekyll
|
||||
|
||||
# recreate NondisclosureName under utf-8 circumstance
|
||||
def file_handler_options
|
||||
fh_option = WEBrick::Config::FileHandler
|
||||
fh_option[:NondisclosureName] = ['.ht*','~*']
|
||||
fh_option
|
||||
WEBrick::Config::FileHandler.merge({
|
||||
:FancyIndexing => true,
|
||||
:NondisclosureName => ['.ht*','~*']
|
||||
})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -6,46 +6,56 @@ module Jekyll
|
||||
# Default options. Overridden by values in _config.yml.
|
||||
# Strings rather than symbols are used for compatibility with YAML.
|
||||
DEFAULTS = {
|
||||
# Where things are
|
||||
'source' => Dir.pwd,
|
||||
'destination' => File.join(Dir.pwd, '_site'),
|
||||
'plugins' => '_plugins',
|
||||
'layouts' => '_layouts',
|
||||
'data_source' => '_data',
|
||||
'keep_files' => ['.git','.svn'],
|
||||
'gems' => [],
|
||||
'collections' => nil,
|
||||
|
||||
'timezone' => nil, # use the local timezone
|
||||
|
||||
'encoding' => 'utf-8', # always use utf-8 encoding. NEVER FORGET
|
||||
|
||||
# Handling Reading
|
||||
'safe' => false,
|
||||
'detach' => false, # default to not detaching the server
|
||||
'include' => ['.htaccess'],
|
||||
'exclude' => [],
|
||||
'keep_files' => ['.git','.svn'],
|
||||
'encoding' => 'utf-8',
|
||||
'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md',
|
||||
'textile_ext' => 'textile',
|
||||
'full_rebuild' => false,
|
||||
|
||||
# Filtering Content
|
||||
'show_drafts' => nil,
|
||||
'limit_posts' => 0,
|
||||
'lsi' => false,
|
||||
'future' => true, # remove and make true just default
|
||||
'unpublished' => false,
|
||||
|
||||
'relative_permalinks' => false,
|
||||
# Plugins
|
||||
'whitelist' => [],
|
||||
'gems' => [],
|
||||
|
||||
# Conversion
|
||||
'markdown' => 'kramdown',
|
||||
'highlighter' => 'pygments',
|
||||
'permalink' => 'date',
|
||||
'baseurl' => '',
|
||||
'include' => ['.htaccess'],
|
||||
'exclude' => [],
|
||||
'paginate_path' => '/page:num',
|
||||
|
||||
'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md',
|
||||
'textile_ext' => 'textile',
|
||||
|
||||
'port' => '4000',
|
||||
'host' => '0.0.0.0',
|
||||
|
||||
'lsi' => false,
|
||||
'excerpt_separator' => "\n\n",
|
||||
|
||||
'defaults' => [],
|
||||
# Serving
|
||||
'detach' => false, # default to not detaching the server
|
||||
'port' => '4000',
|
||||
'host' => '127.0.0.1',
|
||||
'baseurl' => '',
|
||||
|
||||
# Backwards-compatibility options
|
||||
'relative_permalinks' => false,
|
||||
|
||||
# Output Configuration
|
||||
'permalink' => 'date',
|
||||
'paginate_path' => '/page:num',
|
||||
'timezone' => nil, # use the local timezone
|
||||
|
||||
'quiet' => false,
|
||||
'defaults' => [],
|
||||
|
||||
'maruku' => {
|
||||
'use_tex' => false,
|
||||
@@ -65,12 +75,12 @@ module Jekyll
|
||||
},
|
||||
|
||||
'kramdown' => {
|
||||
'auto_ids' => true,
|
||||
'footnote_nr' => 1,
|
||||
'entity_output' => 'as_char',
|
||||
'toc_levels' => '1..6',
|
||||
'smart_quotes' => 'lsquo,rsquo,ldquo,rdquo',
|
||||
'use_coderay' => false,
|
||||
'auto_ids' => true,
|
||||
'footnote_nr' => 1,
|
||||
'entity_output' => 'as_char',
|
||||
'toc_levels' => '1..6',
|
||||
'smart_quotes' => 'lsquo,rsquo,ldquo,rdquo',
|
||||
'enable_coderay' => false,
|
||||
|
||||
'coderay' => {
|
||||
'coderay_wrap' => 'div',
|
||||
@@ -103,11 +113,15 @@ module Jekyll
|
||||
override['source'] || self['source'] || DEFAULTS['source']
|
||||
end
|
||||
|
||||
def quiet?(override = {})
|
||||
override['quiet'] || self['quiet'] || DEFAULTS['quiet']
|
||||
end
|
||||
|
||||
def safe_load_file(filename)
|
||||
case File.extname(filename)
|
||||
when '.toml'
|
||||
when /\.toml/i
|
||||
TOML.load_file(filename)
|
||||
when /\.y(a)?ml/
|
||||
when /\.ya?ml/i
|
||||
SafeYAML.load_file(filename)
|
||||
else
|
||||
raise ArgumentError, "No parser for '#{filename}' is available. Use a .toml or .y(a)ml file instead."
|
||||
@@ -120,10 +134,16 @@ module Jekyll
|
||||
#
|
||||
# Returns an Array of config files
|
||||
def config_files(override)
|
||||
# Be quiet quickly.
|
||||
Jekyll.logger.log_level = :error if quiet?(override)
|
||||
|
||||
# Get configuration from <source>/_config.yml or <source>/<config_file>
|
||||
config_files = override.delete('config')
|
||||
if config_files.to_s.empty?
|
||||
config_files = File.join(source(override), "_config.yml")
|
||||
default = %w[yml yaml].find(Proc.new { 'yml' }) do |ext|
|
||||
File.exists? Jekyll.sanitized_path(source(override), "_config.#{ext}")
|
||||
end
|
||||
config_files = Jekyll.sanitized_path(source(override), "_config.#{default}")
|
||||
@default_config_file = true
|
||||
end
|
||||
config_files = [config_files] unless config_files.is_a? Array
|
||||
@@ -189,31 +209,31 @@ module Jekyll
|
||||
def backwards_compatibilize
|
||||
config = clone
|
||||
# Provide backwards-compatibility
|
||||
if config.has_key?('auto') || config.has_key?('watch')
|
||||
if config.key?('auto') || config.key?('watch')
|
||||
Jekyll.logger.warn "Deprecation:", "Auto-regeneration can no longer" +
|
||||
" be set from your configuration file(s). Use the"+
|
||||
" --watch/-w command-line option instead."
|
||||
" --[no-]watch/-w command-line option instead."
|
||||
config.delete('auto')
|
||||
config.delete('watch')
|
||||
end
|
||||
|
||||
if config.has_key? 'server'
|
||||
if config.key? 'server'
|
||||
Jekyll.logger.warn "Deprecation:", "The 'server' configuration option" +
|
||||
" is no longer accepted. Use the 'jekyll serve'" +
|
||||
" subcommand to serve your site with WEBrick."
|
||||
config.delete('server')
|
||||
end
|
||||
|
||||
if config.has_key? 'server_port'
|
||||
if config.key? 'server_port'
|
||||
Jekyll.logger.warn "Deprecation:", "The 'server_port' configuration option" +
|
||||
" has been renamed to 'port'. Please update your config" +
|
||||
" file accordingly."
|
||||
# copy but don't overwrite:
|
||||
config['port'] = config['server_port'] unless config.has_key?('port')
|
||||
config['port'] = config['server_port'] unless config.key?('port')
|
||||
config.delete('server_port')
|
||||
end
|
||||
|
||||
if config.has_key? 'pygments'
|
||||
if config.key? 'pygments'
|
||||
Jekyll.logger.warn "Deprecation:", "The 'pygments' configuration option" +
|
||||
" has been renamed to 'highlighter'. Please update your" +
|
||||
" config file accordingly. The allowed values are 'rouge', " +
|
||||
@@ -231,6 +251,13 @@ module Jekyll
|
||||
" as a list of comma-separated values."
|
||||
config[option] = csv_to_array(config[option])
|
||||
end
|
||||
config[option].map!(&:to_s)
|
||||
end
|
||||
|
||||
if (config['kramdown'] || {}).key?('use_coderay')
|
||||
Jekyll::Deprecator.deprecation_message "Please change 'use_coderay'" +
|
||||
" to 'enable_coderay' in your configuration file."
|
||||
config['kramdown']['use_coderay'] = config['kramdown'].delete('enable_coderay')
|
||||
end
|
||||
|
||||
if config.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku")
|
||||
@@ -244,7 +271,7 @@ module Jekyll
|
||||
def fix_common_issues
|
||||
config = clone
|
||||
|
||||
if config.has_key?('paginate') && (!config['paginate'].is_a?(Integer) || config['paginate'] < 1)
|
||||
if config.key?('paginate') && (!config['paginate'].is_a?(Integer) || config['paginate'] < 1)
|
||||
Jekyll.logger.warn "Config Warning:", "The `paginate` key must be a" +
|
||||
" positive integer or nil. It's currently set to '#{config['paginate'].inspect}'."
|
||||
config['paginate'] = nil
|
||||
|
||||
@@ -11,25 +11,50 @@ module Jekyll
|
||||
@parser =
|
||||
case @config['markdown'].downcase
|
||||
when 'redcarpet' then RedcarpetParser.new(@config)
|
||||
when 'kramdown' then KramdownParser.new(@config)
|
||||
when 'kramdown' then KramdownParser.new(@config)
|
||||
when 'rdiscount' then RDiscountParser.new(@config)
|
||||
when 'maruku' then MarukuParser.new(@config)
|
||||
when 'maruku' then MarukuParser.new(@config)
|
||||
else
|
||||
# So they can't try some tricky bullshit or go down the ancestor chain, I hope.
|
||||
if allowed_custom_class?(@config['markdown'])
|
||||
self.class.const_get(@config['markdown']).new(@config)
|
||||
else
|
||||
Jekyll.logger.error "Invalid Markdown Processor:", "#{@config['markdown']}"
|
||||
Jekyll.logger.error "", "Valid options are [ maruku | rdiscount | kramdown | redcarpet ]"
|
||||
raise FatalException, "Invalid Markdown Processor: #{@config['markdown']}"
|
||||
Jekyll.logger.error "", "Valid options are [ #{valid_processors.join(" | ")} ]"
|
||||
raise Errors::FatalException, "Invalid Markdown Processor: #{@config['markdown']}"
|
||||
end
|
||||
end
|
||||
@setup = true
|
||||
end
|
||||
|
||||
def valid_processors
|
||||
%w[
|
||||
maruku
|
||||
rdiscount
|
||||
kramdown
|
||||
redcarpet
|
||||
] + third_party_processors
|
||||
end
|
||||
|
||||
def third_party_processors
|
||||
self.class.constants - %w[
|
||||
KramdownParser
|
||||
MarukuParser
|
||||
RDiscountParser
|
||||
RedcarpetParser
|
||||
PRIORITIES
|
||||
].map(&:to_sym)
|
||||
end
|
||||
|
||||
def extname_matches_regexp
|
||||
@extname_matches_regexp ||= Regexp.new(
|
||||
'^\.(' + @config['markdown_ext'].gsub(',','|') +')$',
|
||||
Regexp::IGNORECASE
|
||||
)
|
||||
end
|
||||
|
||||
def matches(ext)
|
||||
rgx = '^\.(' + @config['markdown_ext'].gsub(',','|') +')$'
|
||||
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
|
||||
ext =~ extname_matches_regexp
|
||||
end
|
||||
|
||||
def output_ext(ext)
|
||||
|
||||
@@ -8,19 +8,19 @@ module Jekyll
|
||||
rescue LoadError
|
||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
||||
STDERR.puts ' $ [sudo] gem install kramdown'
|
||||
raise FatalException.new("Missing dependency: kramdown")
|
||||
raise Errors::FatalException.new("Missing dependency: kramdown")
|
||||
end
|
||||
|
||||
def convert(content)
|
||||
# Check for use of coderay
|
||||
if @config['kramdown']['use_coderay']
|
||||
if @config['kramdown']['enable_coderay']
|
||||
%w[wrap line_numbers line_numbers_start tab_width bold_every css default_lang].each do |opt|
|
||||
key = "coderay_#{opt}"
|
||||
@config['kramdown'][key] = @config['kramdown']['coderay'][key] unless @config['kramdown'].has_key?(key)
|
||||
@config['kramdown'][key] = @config['kramdown']['coderay'][key] unless @config['kramdown'].key?(key)
|
||||
end
|
||||
end
|
||||
|
||||
Kramdown::Document.new(content, Utils.symbolize_hash_keys(@config["kramdown"])).to_html
|
||||
Kramdown::Document.new(content, Utils.symbolize_hash_keys(@config['kramdown'])).to_html
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ module Jekyll
|
||||
rescue LoadError
|
||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
||||
STDERR.puts ' $ [sudo] gem install maruku'
|
||||
raise FatalException.new("Missing dependency: maruku")
|
||||
raise Errors::FatalException.new("Missing dependency: maruku")
|
||||
end
|
||||
|
||||
def load_divs_library
|
||||
|
||||
@@ -3,13 +3,9 @@ module Jekyll
|
||||
class Markdown
|
||||
class RDiscountParser
|
||||
def initialize(config)
|
||||
require 'rdiscount'
|
||||
Jekyll::External.require_with_graceful_fail "rdiscount"
|
||||
@config = config
|
||||
@rdiscount_extensions = @config['rdiscount']['extensions'].map { |e| e.to_sym }
|
||||
rescue LoadError
|
||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
||||
STDERR.puts ' $ [sudo] gem install rdiscount'
|
||||
raise FatalException.new("Missing dependency: rdiscount")
|
||||
end
|
||||
|
||||
def convert(content)
|
||||
|
||||
@@ -14,7 +14,7 @@ module Jekyll
|
||||
module WithPygments
|
||||
include CommonMethods
|
||||
def block_code(code, lang)
|
||||
require 'pygments'
|
||||
Jekyll::External.require_with_graceful_fail("pygments")
|
||||
lang = lang && lang.split.first || "text"
|
||||
add_code_tags(
|
||||
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
|
||||
@@ -48,45 +48,47 @@ module Jekyll
|
||||
end
|
||||
|
||||
protected
|
||||
def rouge_formatter(opts = {})
|
||||
Rouge::Formatters::HTML.new(opts.merge(wrap: false))
|
||||
def rouge_formatter(lexer)
|
||||
Rouge::Formatters::HTML.new(:wrap => false)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def initialize(config)
|
||||
require 'redcarpet'
|
||||
External.require_with_graceful_fail("redcarpet")
|
||||
@config = config
|
||||
@redcarpet_extensions = {}
|
||||
@config['redcarpet']['extensions'].each { |e| @redcarpet_extensions[e.to_sym] = true }
|
||||
|
||||
@renderer ||= case @config['highlighter']
|
||||
when 'pygments'
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
include WithPygments
|
||||
end
|
||||
when 'rouge'
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
require 'rouge'
|
||||
require 'rouge/plugins/redcarpet'
|
||||
@renderer ||= class_with_proper_highlighter(@config['highlighter'])
|
||||
end
|
||||
|
||||
if Rouge.version < '1.3.0'
|
||||
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
||||
end
|
||||
def class_with_proper_highlighter(highlighter)
|
||||
case highlighter
|
||||
when "pygments"
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
include WithPygments
|
||||
end
|
||||
when "rouge"
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
Jekyll::External.require_with_graceful_fail(%w[
|
||||
rouge
|
||||
rouge/plugins/redcarpet
|
||||
])
|
||||
|
||||
include Rouge::Plugins::Redcarpet
|
||||
include CommonMethods
|
||||
include WithRouge
|
||||
end
|
||||
else
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
include WithoutHighlighting
|
||||
end
|
||||
end
|
||||
rescue LoadError
|
||||
STDERR.puts 'You are missing a library required for Markdown. Please run:'
|
||||
STDERR.puts ' $ [sudo] gem install redcarpet'
|
||||
raise FatalException.new("Missing dependency: redcarpet")
|
||||
if Rouge.version < '1.3.0'
|
||||
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
||||
end
|
||||
|
||||
include Rouge::Plugins::Redcarpet
|
||||
include CommonMethods
|
||||
include WithRouge
|
||||
end
|
||||
else
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
include WithoutHighlighting
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def convert(content)
|
||||
|
||||
@@ -13,12 +13,18 @@ module Jekyll
|
||||
rescue LoadError
|
||||
STDERR.puts 'You are missing a library required for Textile. Please run:'
|
||||
STDERR.puts ' $ [sudo] gem install RedCloth'
|
||||
raise FatalException.new("Missing dependency: RedCloth")
|
||||
raise Errors::FatalException.new("Missing dependency: RedCloth")
|
||||
end
|
||||
|
||||
def extname_matches_regexp
|
||||
@extname_matches_regexp ||= Regexp.new(
|
||||
'(' + @config['textile_ext'].gsub(',','|') +')$',
|
||||
Regexp::IGNORECASE
|
||||
)
|
||||
end
|
||||
|
||||
def matches(ext)
|
||||
rgx = '(' + @config['textile_ext'].gsub(',','|') +')'
|
||||
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
|
||||
ext =~ extname_matches_regexp
|
||||
end
|
||||
|
||||
def output_ext(ext)
|
||||
@@ -32,7 +38,7 @@ module Jekyll
|
||||
return RedCloth.new(content).to_html if @config['redcloth'].nil?
|
||||
|
||||
# List of attributes defined on RedCloth
|
||||
# (from http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html)
|
||||
# (from https://github.com/jgarber/redcloth/blob/master/lib/redcloth/textile_doc.rb)
|
||||
attrs = ['filter_classes', 'filter_html', 'filter_ids', 'filter_styles',
|
||||
'hard_breaks', 'lite_mode', 'no_span_caps', 'sanitize_html']
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ module Jekyll
|
||||
|
||||
# Whether the file is published or not, as indicated in YAML front-matter
|
||||
def published?
|
||||
!(data.has_key?('published') && data['published'] == false)
|
||||
!(data.key?('published') && data['published'] == false)
|
||||
end
|
||||
|
||||
# Returns merged option hash for File.read of self.site (if exists)
|
||||
@@ -43,7 +43,7 @@ module Jekyll
|
||||
# Returns nothing.
|
||||
def read_yaml(base, name, opts = {})
|
||||
begin
|
||||
self.content = File.read(File.join(base, name),
|
||||
self.content = File.read(site.in_source_dir(base, name),
|
||||
merged_file_read_opts(opts))
|
||||
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
|
||||
self.content = $POSTMATCH
|
||||
@@ -60,13 +60,17 @@ module Jekyll
|
||||
|
||||
# Transform the contents based on the content type.
|
||||
#
|
||||
# Returns nothing.
|
||||
# Returns the transformed contents.
|
||||
def transform
|
||||
self.content = converter.convert(content)
|
||||
rescue => e
|
||||
Jekyll.logger.error "Conversion error:", "There was an error converting" +
|
||||
" '#{path}'."
|
||||
raise e
|
||||
converters.reduce(content) do |output, converter|
|
||||
begin
|
||||
converter.convert output
|
||||
rescue => e
|
||||
Jekyll.logger.error "Conversion error:", "#{converter.class} encountered an error while converting '#{path}':"
|
||||
Jekyll.logger.error("", e.to_s)
|
||||
raise e
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Determine the extension depending on content_type.
|
||||
@@ -74,15 +78,21 @@ module Jekyll
|
||||
# Returns the String extension for the output file.
|
||||
# e.g. ".html" for an HTML output file.
|
||||
def output_ext
|
||||
converter.output_ext(ext)
|
||||
if converters.all? { |c| c.is_a?(Jekyll::Converters::Identity) }
|
||||
ext
|
||||
else
|
||||
converters.map { |c|
|
||||
c.output_ext(ext) unless c.is_a?(Jekyll::Converters::Identity)
|
||||
}.compact.last
|
||||
end
|
||||
end
|
||||
|
||||
# Determine which converter to use based on this convertible's
|
||||
# extension.
|
||||
#
|
||||
# Returns the Converter instance.
|
||||
def converter
|
||||
@converter ||= site.converters.find { |c| c.matches(ext) }
|
||||
def converters
|
||||
@converters ||= site.converters.select { |c| c.matches(ext) }.sort
|
||||
end
|
||||
|
||||
# Render Liquid in the content
|
||||
@@ -114,16 +124,75 @@ module Jekyll
|
||||
Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data)
|
||||
end
|
||||
|
||||
# The type of a document,
|
||||
# i.e., its classname downcase'd and to_sym'd.
|
||||
#
|
||||
# Returns the type of self.
|
||||
def type
|
||||
if is_a?(Post)
|
||||
:post
|
||||
if is_a?(Draft)
|
||||
:drafts
|
||||
elsif is_a?(Post)
|
||||
:posts
|
||||
elsif is_a?(Page)
|
||||
:page
|
||||
elsif is_a?(Draft)
|
||||
:draft
|
||||
:pages
|
||||
end
|
||||
end
|
||||
|
||||
# Determine whether the document is an asset file.
|
||||
# Asset files include CoffeeScript files and Sass/SCSS files.
|
||||
#
|
||||
# Returns true if the extname belongs to the set of extensions
|
||||
# that asset files use.
|
||||
def asset_file?
|
||||
sass_file? || coffeescript_file?
|
||||
end
|
||||
|
||||
# Determine whether the document is a Sass file.
|
||||
#
|
||||
# Returns true if extname == .sass or .scss, false otherwise.
|
||||
def sass_file?
|
||||
%w[.sass .scss].include?(ext)
|
||||
end
|
||||
|
||||
# Determine whether the document is a CoffeeScript file.
|
||||
#
|
||||
# Returns true if extname == .coffee, false otherwise.
|
||||
def coffeescript_file?
|
||||
'.coffee'.eql?(ext)
|
||||
end
|
||||
|
||||
# Determine whether the file should be rendered with Liquid.
|
||||
#
|
||||
# Always returns true.
|
||||
def render_with_liquid?
|
||||
true
|
||||
end
|
||||
|
||||
# Determine whether to regenerate the file based on metadata.
|
||||
#
|
||||
# Returns true if file needs to be regenerated
|
||||
def regenerate?
|
||||
asset_file? ||
|
||||
data['regenerate'] ||
|
||||
site.metadata.regenerate?(site.in_source_dir(relative_path))
|
||||
end
|
||||
|
||||
# Determine whether the file should be placed into layouts.
|
||||
#
|
||||
# Returns false if the document is an asset file.
|
||||
def place_in_layout?
|
||||
!asset_file?
|
||||
end
|
||||
|
||||
# Checks if the layout specified in the document actually exists
|
||||
#
|
||||
# layout - the layout to check
|
||||
#
|
||||
# Returns true if the layout is invalid, false if otherwise
|
||||
def invalid_layout?(layout)
|
||||
!data["layout"].nil? && layout.nil? && !(self.is_a? Jekyll::Excerpt)
|
||||
end
|
||||
|
||||
# Recursively render layouts
|
||||
#
|
||||
# layouts - a list of the layouts
|
||||
@@ -134,6 +203,9 @@ module Jekyll
|
||||
def render_all_layouts(layouts, payload, info)
|
||||
# recursively render layouts
|
||||
layout = layouts[data["layout"]]
|
||||
|
||||
Jekyll.logger.warn("Build Warning:", "Layout '#{data["layout"]}' requested in #{path} does not exist.") if invalid_layout? layout
|
||||
|
||||
used = Set.new([layout])
|
||||
|
||||
while layout
|
||||
@@ -144,6 +216,12 @@ module Jekyll
|
||||
info,
|
||||
File.join(site.config['layouts'], layout.name))
|
||||
|
||||
# Add layout to dependency tree
|
||||
site.metadata.add_dependency(
|
||||
site.in_source_dir(path),
|
||||
site.in_source_dir(layout.path)
|
||||
)
|
||||
|
||||
if layout = layouts[layout.data["layout"]]
|
||||
if used.include?(layout)
|
||||
layout = nil # avoid recursive chain
|
||||
@@ -164,16 +242,16 @@ module Jekyll
|
||||
info = { :filters => [Jekyll::Filters], :registers => { :site => site, :page => payload['page'] } }
|
||||
|
||||
# render and transform content (this becomes the final content of the object)
|
||||
payload["highlighter_prefix"] = converter.highlighter_prefix
|
||||
payload["highlighter_suffix"] = converter.highlighter_suffix
|
||||
payload["highlighter_prefix"] = converters.first.highlighter_prefix
|
||||
payload["highlighter_suffix"] = converters.first.highlighter_suffix
|
||||
|
||||
self.content = render_liquid(content, payload, info)
|
||||
transform
|
||||
self.content = render_liquid(content, payload, info) if render_with_liquid?
|
||||
self.content = transform
|
||||
|
||||
# output keeps track of what will finally be written
|
||||
self.output = content
|
||||
|
||||
render_all_layouts(layouts, payload, info)
|
||||
render_all_layouts(layouts, payload, info) if place_in_layout?
|
||||
end
|
||||
|
||||
# Write the generated page file to the destination directory.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module Jekyll
|
||||
class Deprecator
|
||||
def self.process(args)
|
||||
module Deprecator
|
||||
extend self
|
||||
|
||||
def process(args)
|
||||
no_subcommand(args)
|
||||
arg_is_present? args, "--server", "The --server command has been replaced by the \
|
||||
'serve' subcommand."
|
||||
@@ -16,21 +18,27 @@ module Jekyll
|
||||
arg_is_present? args, "--url", "The 'url' setting can only be set in your config files."
|
||||
end
|
||||
|
||||
def self.no_subcommand(args)
|
||||
def no_subcommand(args)
|
||||
if args.size > 0 && args.first =~ /^--/ && !%w[--help --version].include?(args.first)
|
||||
Jekyll.logger.error "Deprecation:", "Jekyll now uses subcommands instead of just \
|
||||
switches. Run `jekyll help' to find out more."
|
||||
deprecation_message "Jekyll now uses subcommands instead of just \
|
||||
switches. Run `jekyll --help' to find out more."
|
||||
end
|
||||
end
|
||||
|
||||
def self.arg_is_present?(args, deprecated_argument, message)
|
||||
def arg_is_present?(args, deprecated_argument, message)
|
||||
if args.include?(deprecated_argument)
|
||||
deprecation_message(message)
|
||||
end
|
||||
end
|
||||
|
||||
def self.deprecation_message(message)
|
||||
def deprecation_message(message)
|
||||
Jekyll.logger.error "Deprecation:", message
|
||||
end
|
||||
|
||||
def defaults_deprecate_type(old, current)
|
||||
Jekyll.logger.warn "Defaults:", "The '#{old}' type has become '#{current}'."
|
||||
Jekyll.logger.warn "Defaults:", "Please update your front-matter defaults to use 'type: #{current}'."
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
class Document
|
||||
include Comparable
|
||||
|
||||
attr_reader :path, :site
|
||||
attr_reader :path, :site, :extname
|
||||
attr_accessor :content, :collection, :output
|
||||
|
||||
# Create a new Document.
|
||||
@@ -14,7 +16,9 @@ module Jekyll
|
||||
def initialize(path, relations)
|
||||
@site = relations[:site]
|
||||
@path = path
|
||||
@extname = File.extname(path)
|
||||
@collection = relations[:collection]
|
||||
@has_yaml_header = nil
|
||||
end
|
||||
|
||||
# Fetch the Document's data.
|
||||
@@ -30,23 +34,21 @@ module Jekyll
|
||||
# Returns a String path which represents the relative path
|
||||
# from the site source to this document
|
||||
def relative_path
|
||||
Pathname.new(path).relative_path_from(Pathname.new(site.source)).to_s
|
||||
@relative_path ||= Pathname.new(path).relative_path_from(Pathname.new(site.source)).to_s
|
||||
end
|
||||
|
||||
# The base filename of the document, without the file extname.
|
||||
#
|
||||
# Returns the basename without the file extname.
|
||||
def basename_without_ext
|
||||
@basename_without_ext ||= File.basename(path, '.*')
|
||||
end
|
||||
|
||||
# The base filename of the document.
|
||||
#
|
||||
# suffix - (optional) the suffix to be removed from the end of the filename
|
||||
#
|
||||
# Returns the base filename of the document.
|
||||
def basename(suffix = "")
|
||||
File.basename(path, suffix)
|
||||
end
|
||||
|
||||
# The extension name of the document.
|
||||
#
|
||||
# Returns the extension name of the document.
|
||||
def extname
|
||||
File.extname(path)
|
||||
def basename
|
||||
@basename ||= File.basename(path)
|
||||
end
|
||||
|
||||
# Produces a "cleaned" relative path.
|
||||
@@ -61,7 +63,8 @@ module Jekyll
|
||||
#
|
||||
# Returns the cleaned relative path of the document.
|
||||
def cleaned_relative_path
|
||||
relative_path[0 .. -extname.length - 1].sub(collection.relative_directory, "")
|
||||
@cleaned_relative_path ||=
|
||||
relative_path[0 .. -extname.length - 1].sub(collection.relative_directory, "")
|
||||
end
|
||||
|
||||
# Determine whether the document is a YAML file.
|
||||
@@ -77,7 +80,21 @@ module Jekyll
|
||||
# Returns true if the extname belongs to the set of extensions
|
||||
# that asset files use.
|
||||
def asset_file?
|
||||
%w[.sass .scss .coffee].include?(extname)
|
||||
sass_file? || coffeescript_file?
|
||||
end
|
||||
|
||||
# Determine whether the document is a Sass file.
|
||||
#
|
||||
# Returns true if extname == .sass or .scss, false otherwise.
|
||||
def sass_file?
|
||||
%w[.sass .scss].include?(extname)
|
||||
end
|
||||
|
||||
# Determine whether the document is a CoffeeScript file.
|
||||
#
|
||||
# Returns true if extname == .coffee, false otherwise.
|
||||
def coffeescript_file?
|
||||
'.coffee'.eql?(extname)
|
||||
end
|
||||
|
||||
# Determine whether the file should be rendered with Liquid.
|
||||
@@ -85,6 +102,21 @@ module Jekyll
|
||||
# Returns false if the document is either an asset file or a yaml file,
|
||||
# true otherwise.
|
||||
def render_with_liquid?
|
||||
!(coffeescript_file? || yaml_file?)
|
||||
end
|
||||
|
||||
# Determine whether the document should be regenerated based on metadata.
|
||||
#
|
||||
# Returns true if the document needs to be regenerated.
|
||||
def regenerate?
|
||||
data['regenerate'] || site.metadata.regenerate?(path, write?)
|
||||
end
|
||||
|
||||
# Determine whether the file should be placed into layouts.
|
||||
#
|
||||
# Returns false if the document is either an asset file or a yaml file,
|
||||
# true otherwise.
|
||||
def place_in_layout?
|
||||
!(asset_file? || yaml_file?)
|
||||
end
|
||||
|
||||
@@ -92,7 +124,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the URL template for the document.
|
||||
def url_template
|
||||
"/:collection/:path:output_ext"
|
||||
collection.url_template
|
||||
end
|
||||
|
||||
# Construct a Hash of key-value pairs which contain a mapping between
|
||||
@@ -103,7 +135,9 @@ module Jekyll
|
||||
{
|
||||
collection: collection.label,
|
||||
path: cleaned_relative_path,
|
||||
output_ext: Jekyll::Renderer.new(site, self).output_ext
|
||||
output_ext: Jekyll::Renderer.new(site, self).output_ext,
|
||||
name: Utils.slugify(basename_without_ext),
|
||||
title: Utils.slugify(data['title']) || Utils.slugify(basename_without_ext)
|
||||
}
|
||||
end
|
||||
|
||||
@@ -119,7 +153,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the computed URL for the document.
|
||||
def url
|
||||
@url ||= URL.new({
|
||||
@url = URL.new({
|
||||
template: url_template,
|
||||
placeholders: url_placeholders,
|
||||
permalink: permalink
|
||||
@@ -132,7 +166,8 @@ module Jekyll
|
||||
#
|
||||
# Returns the full path to the output file of this document.
|
||||
def destination(base_directory)
|
||||
path = Jekyll.sanitized_path(base_directory, url)
|
||||
dest = site.in_dest_dir(base_directory)
|
||||
path = site.in_dest_dir(dest, URL.unescape_path(url))
|
||||
path = File.join(path, "index.html") if url =~ /\/$/
|
||||
path
|
||||
end
|
||||
@@ -164,10 +199,12 @@ module Jekyll
|
||||
#
|
||||
# Returns true if the 'published' key is specified in the YAML front-matter and not `false`.
|
||||
def published?
|
||||
!(data.has_key?('published') && data['published'] == false)
|
||||
!(data.key?('published') && data['published'] == false)
|
||||
end
|
||||
|
||||
# Read in the file and assign the content and data based on the file contents.
|
||||
# Merge the frontmatter of the file with the frontmatter default
|
||||
# values
|
||||
#
|
||||
# Returns nothing.
|
||||
def read(opts = {})
|
||||
@@ -175,10 +212,17 @@ module Jekyll
|
||||
@data = SafeYAML.load_file(path)
|
||||
else
|
||||
begin
|
||||
defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
|
||||
unless defaults.empty?
|
||||
@data = defaults
|
||||
end
|
||||
@content = File.read(path, merged_file_read_opts(opts))
|
||||
if content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
|
||||
@content = $POSTMATCH
|
||||
@data = SafeYAML.load($1)
|
||||
data_file = SafeYAML.load($1)
|
||||
unless data_file.nil?
|
||||
@data = Utils.deep_merge_hashes(defaults, data_file)
|
||||
end
|
||||
end
|
||||
rescue SyntaxError => e
|
||||
puts "YAML Exception reading #{path}: #{e.message}"
|
||||
@@ -196,9 +240,10 @@ module Jekyll
|
||||
Utils.deep_merge_hashes data, {
|
||||
"output" => output,
|
||||
"content" => content,
|
||||
"path" => path,
|
||||
"relative_path" => relative_path,
|
||||
"url" => url
|
||||
"path" => relative_path,
|
||||
"url" => url,
|
||||
"collection" => collection.label
|
||||
}
|
||||
else
|
||||
data
|
||||
@@ -217,7 +262,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the content of the document
|
||||
def to_s
|
||||
output || content
|
||||
content || ''
|
||||
end
|
||||
|
||||
# Compare this document against another document.
|
||||
|
||||
@@ -14,8 +14,8 @@ module Jekyll
|
||||
end
|
||||
|
||||
# Get the full path to the directory containing the draft files
|
||||
def containing_dir(source, dir)
|
||||
File.join(source, dir, '_drafts')
|
||||
def containing_dir(dir)
|
||||
site.in_source_dir(dir, '_drafts')
|
||||
end
|
||||
|
||||
# The path to the draft source file, relative to the site source
|
||||
|
||||
@@ -47,7 +47,7 @@ module Jekyll
|
||||
|
||||
def excluded?(entry)
|
||||
excluded = glob_include?(site.exclude, relative_to_source(entry))
|
||||
Jekyll.logger.debug "excluded?(#{relative_to_source(entry)}) ==> #{excluded}"
|
||||
Jekyll.logger.debug "EntryFilter:", "excluded?(#{relative_to_source(entry)}) ==> #{excluded}"
|
||||
excluded
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
module Jekyll
|
||||
class FatalException < StandardError
|
||||
module Errors
|
||||
class FatalException < RuntimeError
|
||||
end
|
||||
|
||||
class MissingDependencyException < FatalException
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
require 'jekyll/convertible'
|
||||
require 'forwardable'
|
||||
|
||||
module Jekyll
|
||||
@@ -26,7 +25,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
def to_liquid
|
||||
post.to_liquid(Post::EXCERPT_ATTRIBUTES_FOR_LIQUID)
|
||||
post.to_liquid(post.class::EXCERPT_ATTRIBUTES_FOR_LIQUID)
|
||||
end
|
||||
|
||||
# Fetch YAML front-matter data from related post, without layout key
|
||||
@@ -107,7 +106,7 @@ module Jekyll
|
||||
# Returns excerpt String
|
||||
def extract_excerpt(post_content)
|
||||
separator = site.config['excerpt_separator']
|
||||
head, _, tail = post_content.partition(separator)
|
||||
head, _, tail = post_content.to_s.partition(separator)
|
||||
|
||||
"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
|
||||
end
|
||||
|
||||
59
lib/jekyll/external.rb
Normal file
59
lib/jekyll/external.rb
Normal file
@@ -0,0 +1,59 @@
|
||||
module Jekyll
|
||||
module External
|
||||
class << self
|
||||
|
||||
#
|
||||
# Gems that, if installed, should be loaded.
|
||||
# Usually contain subcommands.
|
||||
#
|
||||
def blessed_gems
|
||||
%w{
|
||||
jekyll-docs
|
||||
jekyll-import
|
||||
}
|
||||
end
|
||||
|
||||
#
|
||||
# Require a gem or file if it's present, otherwise silently fail.
|
||||
#
|
||||
# names - a string gem name or array of gem names
|
||||
#
|
||||
def require_if_present(names)
|
||||
Array(names).each do |name|
|
||||
begin
|
||||
require name
|
||||
rescue LoadError
|
||||
Jekyll.logger.debug "Couldn't load #{name}. Skipping."
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Require a gem or gems. If it's not present, show a very nice error
|
||||
# message that explains everything and is much more helpful than the
|
||||
# normal LoadError.
|
||||
#
|
||||
# names - a string gem name or array of gem names
|
||||
#
|
||||
def require_with_graceful_fail(names)
|
||||
Array(names).each do |name|
|
||||
begin
|
||||
require name
|
||||
rescue LoadError => e
|
||||
Jekyll.logger.error "Dependency Error:", <<-MSG
|
||||
Yikes! It looks like you don't have #{name} or one of its dependencies installed.
|
||||
In order to use Jekyll as currently configured, you'll need to install this gem.
|
||||
|
||||
The full error message from Ruby is: '#{e.message}'
|
||||
|
||||
If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
|
||||
MSG
|
||||
raise Jekyll::Errors::MissingDependencyException.new(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@ module Jekyll
|
||||
# Returns the HTML formatted String.
|
||||
def textilize(input)
|
||||
site = @context.registers[:site]
|
||||
converter = site.getConverterImpl(Jekyll::Converters::Textile)
|
||||
converter = site.find_converter_instance(Jekyll::Converters::Textile)
|
||||
converter.convert(input)
|
||||
end
|
||||
|
||||
@@ -21,10 +21,43 @@ module Jekyll
|
||||
# Returns the HTML formatted String.
|
||||
def markdownify(input)
|
||||
site = @context.registers[:site]
|
||||
converter = site.getConverterImpl(Jekyll::Converters::Markdown)
|
||||
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
|
||||
converter.convert(input)
|
||||
end
|
||||
|
||||
# Convert a Sass string into CSS output.
|
||||
#
|
||||
# input - The Sass String to convert.
|
||||
#
|
||||
# Returns the CSS formatted String.
|
||||
def sassify(input)
|
||||
site = @context.registers[:site]
|
||||
converter = site.find_converter_instance(Jekyll::Converters::Sass)
|
||||
converter.convert(input)
|
||||
end
|
||||
|
||||
# Convert a Scss string into CSS output.
|
||||
#
|
||||
# input - The Scss String to convert.
|
||||
#
|
||||
# Returns the CSS formatted String.
|
||||
def scssify(input)
|
||||
site = @context.registers[:site]
|
||||
converter = site.find_converter_instance(Jekyll::Converters::Scss)
|
||||
converter.convert(input)
|
||||
end
|
||||
|
||||
# Slugify a filename or title.
|
||||
#
|
||||
# input - The filename or title to slugify.
|
||||
#
|
||||
# Returns the given filename or title as a lowercase String, with every
|
||||
# sequence of spaces and non-alphanumeric characters replaced with a
|
||||
# hyphen.
|
||||
def slugify(input)
|
||||
Utils.slugify(input)
|
||||
end
|
||||
|
||||
# Format a date in short format e.g. "27 Jan 2011".
|
||||
#
|
||||
# date - the Time to format.
|
||||
@@ -155,7 +188,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the converted json string
|
||||
def jsonify(input)
|
||||
input.to_json
|
||||
as_liquid(input).to_json
|
||||
end
|
||||
|
||||
# Group an array of items by a property
|
||||
@@ -181,24 +214,25 @@ module Jekyll
|
||||
# Filter an array of objects
|
||||
#
|
||||
# input - the object array
|
||||
# key - key within each object to filter by
|
||||
# property - property within each object to filter by
|
||||
# value - desired value
|
||||
#
|
||||
# Returns the filtered array of objects
|
||||
def where(input, key, value)
|
||||
return input unless input.is_a?(Array)
|
||||
input.select { |object| object[key] == value }
|
||||
def where(input, property, value)
|
||||
return input unless input.is_a?(Enumerable)
|
||||
input = input.values if input.is_a?(Hash)
|
||||
input.select { |object| item_property(object, property) == value }
|
||||
end
|
||||
|
||||
# Sort an array of objects
|
||||
#
|
||||
# input - the object array
|
||||
# key - key within each object to filter by
|
||||
# property - property within each object to filter by
|
||||
# nils ('first' | 'last') - nils appear before or after non-nil values
|
||||
#
|
||||
# Returns the filtered array of objects
|
||||
def sort(input, key = nil, nils = "first")
|
||||
if key.nil?
|
||||
def sort(input, property = nil, nils = "first")
|
||||
if property.nil?
|
||||
input.sort
|
||||
else
|
||||
case
|
||||
@@ -207,34 +241,75 @@ module Jekyll
|
||||
when nils == "last"
|
||||
order = + 1
|
||||
else
|
||||
Jekyll.logger.error "Invalid nils order:",
|
||||
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'."
|
||||
exit(1)
|
||||
raise ArgumentError.new("Invalid nils order: " +
|
||||
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'.")
|
||||
end
|
||||
|
||||
input.sort { |a, b|
|
||||
if !a[key].nil? && b[key].nil?
|
||||
input.sort { |apple, orange|
|
||||
apple_property = item_property(apple, property)
|
||||
orange_property = item_property(orange, property)
|
||||
|
||||
if !apple_property.nil? && orange_property.nil?
|
||||
- order
|
||||
elsif a[key].nil? && !b[key].nil?
|
||||
elsif apple_property.nil? && !orange_property.nil?
|
||||
+ order
|
||||
else
|
||||
a[key] <=> b[key]
|
||||
apple_property <=> orange_property
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def pop(array, input = 1)
|
||||
return array unless array.is_a?(Array)
|
||||
new_ary = array.dup
|
||||
new_ary.pop(input.to_i || 1)
|
||||
new_ary
|
||||
end
|
||||
|
||||
def push(array, input)
|
||||
return array unless array.is_a?(Array)
|
||||
new_ary = array.dup
|
||||
new_ary.push(input)
|
||||
new_ary
|
||||
end
|
||||
|
||||
def shift(array, input = 1)
|
||||
return array unless array.is_a?(Array)
|
||||
new_ary = array.dup
|
||||
new_ary.shift(input.to_i || 1)
|
||||
new_ary
|
||||
end
|
||||
|
||||
def unshift(array, input)
|
||||
return array unless array.is_a?(Array)
|
||||
new_ary = array.dup
|
||||
new_ary.unshift(input)
|
||||
new_ary
|
||||
end
|
||||
|
||||
# Convert an object into its String representation for debugging
|
||||
#
|
||||
# input - The Object to be converted
|
||||
#
|
||||
# Returns a String representation of the object.
|
||||
def inspect(input)
|
||||
CGI.escapeHTML(input.inspect)
|
||||
end
|
||||
|
||||
private
|
||||
def time(input)
|
||||
case input
|
||||
when Time
|
||||
input
|
||||
when String
|
||||
Time.parse(input)
|
||||
Time.parse(input) rescue Time.at(input.to_i)
|
||||
when Numeric
|
||||
Time.at(input)
|
||||
else
|
||||
Jekyll.logger.error "Invalid Date:", "'#{input}' is not a valid datetime."
|
||||
exit(1)
|
||||
end
|
||||
end.localtime
|
||||
end
|
||||
|
||||
def groupable?(element)
|
||||
@@ -242,11 +317,35 @@ module Jekyll
|
||||
end
|
||||
|
||||
def item_property(item, property)
|
||||
if item.respond_to?(:data)
|
||||
if item.respond_to?(:to_liquid)
|
||||
item.to_liquid[property.to_s]
|
||||
elsif item.respond_to?(:data)
|
||||
item.data[property.to_s]
|
||||
else
|
||||
item[property.to_s]
|
||||
end
|
||||
end
|
||||
|
||||
def as_liquid(item)
|
||||
case item
|
||||
when Hash
|
||||
pairs = item.map { |k, v| as_liquid([k, v]) }
|
||||
Hash[pairs]
|
||||
when Array
|
||||
item.map{ |i| as_liquid(i) }
|
||||
else
|
||||
if item.respond_to?(:to_liquid)
|
||||
liquidated = item.to_liquid
|
||||
# prevent infinite recursion for simple types (which return `self`)
|
||||
if liquidated == item
|
||||
item
|
||||
else
|
||||
as_liquid(liquidated)
|
||||
end
|
||||
else
|
||||
item
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,148 +1,180 @@
|
||||
module Jekyll
|
||||
class Configuration
|
||||
# This class handles custom defaults for YAML frontmatter settings.
|
||||
# These are set in _config.yml and apply both to internal use (e.g. layout)
|
||||
# and the data available to liquid.
|
||||
# This class handles custom defaults for YAML frontmatter settings.
|
||||
# These are set in _config.yml and apply both to internal use (e.g. layout)
|
||||
# and the data available to liquid.
|
||||
#
|
||||
# It is exposed via the frontmatter_defaults method on the site class.
|
||||
class FrontmatterDefaults
|
||||
# Initializes a new instance.
|
||||
def initialize(site)
|
||||
@site = site
|
||||
end
|
||||
|
||||
def update_deprecated_types(set)
|
||||
return set unless set.key?('scope') && set['scope'].key?('type')
|
||||
|
||||
set['scope']['type'] = case set['scope']['type']
|
||||
when 'page'
|
||||
Deprecator.defaults_deprecate_type('page', 'pages')
|
||||
'pages'
|
||||
when 'post'
|
||||
Deprecator.defaults_deprecate_type('post', 'posts')
|
||||
'posts'
|
||||
when 'draft'
|
||||
Deprecator.defaults_deprecate_type('draft', 'drafts')
|
||||
'drafts'
|
||||
else
|
||||
set['scope']['type']
|
||||
end
|
||||
|
||||
set
|
||||
end
|
||||
|
||||
# Finds a default value for a given setting, filtered by path and type
|
||||
#
|
||||
# It is exposed via the frontmatter_defaults method on the site class.
|
||||
class FrontmatterDefaults
|
||||
# Initializes a new instance.
|
||||
def initialize(site)
|
||||
@site = site
|
||||
end
|
||||
# path - the path (relative to the source) of the page, post or :draft the default is used in
|
||||
# type - a symbol indicating whether a :page, a :post or a :draft calls this method
|
||||
#
|
||||
# Returns the default value or nil if none was found
|
||||
def find(path, type, setting)
|
||||
value = nil
|
||||
old_scope = nil
|
||||
|
||||
# Finds a default value for a given setting, filtered by path and type
|
||||
#
|
||||
# path - the path (relative to the source) of the page, post or :draft the default is used in
|
||||
# type - a symbol indicating whether a :page, a :post or a :draft calls this method
|
||||
#
|
||||
# Returns the default value or nil if none was found
|
||||
def find(path, type, setting)
|
||||
value = nil
|
||||
old_scope = nil
|
||||
|
||||
matching_sets(path, type).each do |set|
|
||||
if set['values'].has_key?(setting) && has_precedence?(old_scope, set['scope'])
|
||||
value = set['values'][setting]
|
||||
old_scope = set['scope']
|
||||
end
|
||||
end
|
||||
value
|
||||
end
|
||||
|
||||
# Collects a hash with all default values for a page or post
|
||||
#
|
||||
# path - the relative path of the page or post
|
||||
# type - a symbol indicating the type (:post, :page or :draft)
|
||||
#
|
||||
# Returns a hash with all default values (an empty hash if there are none)
|
||||
def all(path, type)
|
||||
defaults = {}
|
||||
old_scope = nil
|
||||
matching_sets(path, type).each do |set|
|
||||
if has_precedence?(old_scope, set['scope'])
|
||||
defaults.merge! set['values']
|
||||
old_scope = set['scope']
|
||||
else
|
||||
defaults = set['values'].merge(defaults)
|
||||
end
|
||||
end
|
||||
defaults
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Checks if a given default setting scope matches the given path and type
|
||||
#
|
||||
# scope - the hash indicating the scope, as defined in _config.yml
|
||||
# path - the path to check for
|
||||
# type - the type (:post, :page or :draft) to check for
|
||||
#
|
||||
# Returns true if the scope applies to the given path and type
|
||||
def applies?(scope, path, type)
|
||||
applies_path?(scope, path) && applies_type?(scope, type)
|
||||
end
|
||||
|
||||
def applies_path?(scope, path)
|
||||
return true if scope['path'].empty?
|
||||
|
||||
scope_path = Pathname.new(scope['path'])
|
||||
Pathname.new(sanitize_path(path)).ascend do |path|
|
||||
if path == scope_path
|
||||
return true
|
||||
end
|
||||
matching_sets(path, type).each do |set|
|
||||
if set['values'].key?(setting) && has_precedence?(old_scope, set['scope'])
|
||||
value = set['values'][setting]
|
||||
old_scope = set['scope']
|
||||
end
|
||||
end
|
||||
value
|
||||
end
|
||||
|
||||
def applies_type?(scope, type)
|
||||
!scope.has_key?('type') || scope['type'] == type.to_s
|
||||
end
|
||||
|
||||
# Checks if a given set of default values is valid
|
||||
#
|
||||
# set - the default value hash, as defined in _config.yml
|
||||
#
|
||||
# Returns true if the set is valid and can be used in this class
|
||||
def valid?(set)
|
||||
set.is_a?(Hash) && set['scope'].is_a?(Hash) && set['scope']['path'].is_a?(String) && set['values'].is_a?(Hash)
|
||||
end
|
||||
|
||||
# Determines if a new scope has precedence over an old one
|
||||
#
|
||||
# old_scope - the old scope hash, or nil if there's none
|
||||
# new_scope - the new scope hash
|
||||
#
|
||||
# Returns true if the new scope has precedence over the older
|
||||
def has_precedence?(old_scope, new_scope)
|
||||
return true if old_scope.nil?
|
||||
|
||||
new_path = sanitize_path(new_scope['path'])
|
||||
old_path = sanitize_path(old_scope['path'])
|
||||
|
||||
if new_path.length != old_path.length
|
||||
new_path.length >= old_path.length
|
||||
elsif new_scope.has_key? 'type'
|
||||
true
|
||||
# Collects a hash with all default values for a page or post
|
||||
#
|
||||
# path - the relative path of the page or post
|
||||
# type - a symbol indicating the type (:post, :page or :draft)
|
||||
#
|
||||
# Returns a hash with all default values (an empty hash if there are none)
|
||||
def all(path, type)
|
||||
defaults = {}
|
||||
old_scope = nil
|
||||
matching_sets(path, type).each do |set|
|
||||
if has_precedence?(old_scope, set['scope'])
|
||||
defaults = Utils.deep_merge_hashes(defaults, set['values'])
|
||||
old_scope = set['scope']
|
||||
else
|
||||
!old_scope.has_key? 'type'
|
||||
defaults = Utils.deep_merge_hashes(set['values'], defaults)
|
||||
end
|
||||
end
|
||||
defaults
|
||||
end
|
||||
|
||||
# Collects a list of sets that match the given path and type
|
||||
#
|
||||
# Returns an array of hashes
|
||||
def matching_sets(path, type)
|
||||
valid_sets.select do |set|
|
||||
applies?(set['scope'], path, type)
|
||||
end
|
||||
end
|
||||
private
|
||||
|
||||
# Returns a list of valid sets
|
||||
#
|
||||
# This is not cached to allow plugins to modify the configuration
|
||||
# and have their changes take effect
|
||||
#
|
||||
# Returns an array of hashes
|
||||
def valid_sets
|
||||
sets = @site.config['defaults']
|
||||
return [] unless sets.is_a?(Array)
|
||||
# Checks if a given default setting scope matches the given path and type
|
||||
#
|
||||
# scope - the hash indicating the scope, as defined in _config.yml
|
||||
# path - the path to check for
|
||||
# type - the type (:post, :page or :draft) to check for
|
||||
#
|
||||
# Returns true if the scope applies to the given path and type
|
||||
def applies?(scope, path, type)
|
||||
applies_path?(scope, path) && applies_type?(scope, type)
|
||||
end
|
||||
|
||||
sets.select do |set|
|
||||
unless valid?(set)
|
||||
Jekyll.logger.warn "Default:", "An invalid default set was found"
|
||||
end
|
||||
valid?(set)
|
||||
end
|
||||
end
|
||||
def applies_path?(scope, path)
|
||||
return true if !scope.has_key?('path') || scope['path'].empty?
|
||||
|
||||
# Sanitizes the given path by removing a leading and addding a trailing slash
|
||||
def sanitize_path(path)
|
||||
if path.nil? || path.empty?
|
||||
""
|
||||
else
|
||||
path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1/')
|
||||
scope_path = Pathname.new(scope['path'])
|
||||
Pathname.new(sanitize_path(path)).ascend do |path|
|
||||
if path == scope_path
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Determines whether the scope applies to type.
|
||||
# The scope applies to the type if:
|
||||
# 1. no 'type' is specified
|
||||
# 2. the 'type' in the scope is the same as the type asked about
|
||||
#
|
||||
# scope - the Hash defaults set being asked about application
|
||||
# type - the type of the document being processed / asked about
|
||||
# its defaults.
|
||||
#
|
||||
# Returns true if either of the above conditions are satisfied,
|
||||
# otherwise returns false
|
||||
def applies_type?(scope, type)
|
||||
!scope.key?('type') || scope['type'].eql?(type.to_s)
|
||||
end
|
||||
|
||||
# Checks if a given set of default values is valid
|
||||
#
|
||||
# set - the default value hash, as defined in _config.yml
|
||||
#
|
||||
# Returns true if the set is valid and can be used in this class
|
||||
def valid?(set)
|
||||
set.is_a?(Hash) && set['values'].is_a?(Hash)
|
||||
end
|
||||
|
||||
# Determines if a new scope has precedence over an old one
|
||||
#
|
||||
# old_scope - the old scope hash, or nil if there's none
|
||||
# new_scope - the new scope hash
|
||||
#
|
||||
# Returns true if the new scope has precedence over the older
|
||||
def has_precedence?(old_scope, new_scope)
|
||||
return true if old_scope.nil?
|
||||
|
||||
new_path = sanitize_path(new_scope['path'])
|
||||
old_path = sanitize_path(old_scope['path'])
|
||||
|
||||
if new_path.length != old_path.length
|
||||
new_path.length >= old_path.length
|
||||
elsif new_scope.key? 'type'
|
||||
true
|
||||
else
|
||||
!old_scope.key? 'type'
|
||||
end
|
||||
end
|
||||
|
||||
# Collects a list of sets that match the given path and type
|
||||
#
|
||||
# Returns an array of hashes
|
||||
def matching_sets(path, type)
|
||||
valid_sets.select do |set|
|
||||
!set.has_key?('scope') || applies?(set['scope'], path, type)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns a list of valid sets
|
||||
#
|
||||
# This is not cached to allow plugins to modify the configuration
|
||||
# and have their changes take effect
|
||||
#
|
||||
# Returns an array of hashes
|
||||
def valid_sets
|
||||
sets = @site.config['defaults']
|
||||
return [] unless sets.is_a?(Array)
|
||||
|
||||
sets.map do |set|
|
||||
if valid?(set)
|
||||
update_deprecated_types(set)
|
||||
else
|
||||
Jekyll.logger.warn "Defaults:", "An invalid front-matter default set was found:"
|
||||
Jekyll.logger.warn "#{set}"
|
||||
nil
|
||||
end
|
||||
end.compact
|
||||
end
|
||||
|
||||
# Sanitizes the given path by removing a leading and addding a trailing slash
|
||||
def sanitize_path(path)
|
||||
if path.nil? || path.empty?
|
||||
""
|
||||
else
|
||||
path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1/')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
module Jekyll
|
||||
module Generators
|
||||
class Pagination < Generator
|
||||
# This generator is safe from arbitrary code execution.
|
||||
safe true
|
||||
|
||||
# This generator should be passive with regard to its execution
|
||||
priority :lowest
|
||||
|
||||
# Generate paginated pages if necessary.
|
||||
#
|
||||
# site - The Site.
|
||||
#
|
||||
# Returns nothing.
|
||||
def generate(site)
|
||||
if Pager.pagination_enabled?(site)
|
||||
if template = template_page(site)
|
||||
paginate(site, template)
|
||||
else
|
||||
Jekyll.logger.warn "Pagination:", "Pagination is enabled, but I couldn't find " +
|
||||
"an index.html page to use as the pagination template. Skipping pagination."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Paginates the blog's posts. Renders the index.html file into paginated
|
||||
# directories, e.g.: page2/index.html, page3/index.html, etc and adds more
|
||||
# site-wide data.
|
||||
#
|
||||
# site - The Site.
|
||||
# page - The index.html Page that requires pagination.
|
||||
#
|
||||
# {"paginator" => { "page" => <Number>,
|
||||
# "per_page" => <Number>,
|
||||
# "posts" => [<Post>],
|
||||
# "total_posts" => <Number>,
|
||||
# "total_pages" => <Number>,
|
||||
# "previous_page" => <Number>,
|
||||
# "next_page" => <Number> }}
|
||||
def paginate(site, page)
|
||||
all_posts = site.site_payload['site']['posts']
|
||||
pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i)
|
||||
(1..pages).each do |num_page|
|
||||
pager = Pager.new(site, num_page, all_posts, pages)
|
||||
if num_page > 1
|
||||
newpage = Page.new(site, site.source, page.dir, page.name)
|
||||
newpage.pager = pager
|
||||
newpage.dir = Pager.paginate_path(site, num_page)
|
||||
site.pages << newpage
|
||||
else
|
||||
page.pager = pager
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Static: Fetch the URL of the template page. Used to determine the
|
||||
# path to the first pager in the series.
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
#
|
||||
# Returns the url of the template page
|
||||
def self.first_page_url(site)
|
||||
if page = Pagination.new.template_page(site)
|
||||
page.url
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Find the Jekyll::Page which will act as the pager template
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
#
|
||||
# Returns the Jekyll::Page which will act as the pager template
|
||||
def template_page(site)
|
||||
site.pages.dup.select do |page|
|
||||
Pager.pagination_candidate?(site.config, page)
|
||||
end.sort do |one, two|
|
||||
two.path.size <=> one.path.size
|
||||
end.first
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Pager
|
||||
attr_reader :page, :per_page, :posts, :total_posts, :total_pages,
|
||||
:previous_page, :previous_page_path, :next_page, :next_page_path
|
||||
|
||||
# Calculate the number of pages.
|
||||
#
|
||||
# all_posts - The Array of all Posts.
|
||||
# per_page - The Integer of entries per page.
|
||||
#
|
||||
# Returns the Integer number of pages.
|
||||
def self.calculate_pages(all_posts, per_page)
|
||||
(all_posts.size.to_f / per_page.to_i).ceil
|
||||
end
|
||||
|
||||
# Determine if pagination is enabled the site.
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
#
|
||||
# Returns true if pagination is enabled, false otherwise.
|
||||
def self.pagination_enabled?(site)
|
||||
!site.config['paginate'].nil? &&
|
||||
site.pages.size > 0
|
||||
end
|
||||
|
||||
# Static: Determine if a page is a possible candidate to be a template page.
|
||||
# Page's name must be `index.html` and exist in any of the directories
|
||||
# between the site source and `paginate_path`.
|
||||
#
|
||||
# config - the site configuration hash
|
||||
# page - the Jekyll::Page about which we're inquiring
|
||||
#
|
||||
# Returns true if the
|
||||
def self.pagination_candidate?(config, page)
|
||||
page_dir = File.dirname(File.expand_path(remove_leading_slash(page.path), config['source']))
|
||||
paginate_path = remove_leading_slash(config['paginate_path'])
|
||||
paginate_path = File.expand_path(paginate_path, config['source'])
|
||||
page.name == 'index.html' &&
|
||||
in_hierarchy(config['source'], page_dir, File.dirname(paginate_path))
|
||||
end
|
||||
|
||||
# Determine if the subdirectories of the two paths are the same relative to source
|
||||
#
|
||||
# source - the site source
|
||||
# page_dir - the directory of the Jekyll::Page
|
||||
# paginate_path - the absolute paginate path (from root of FS)
|
||||
#
|
||||
# Returns whether the subdirectories are the same relative to source
|
||||
def self.in_hierarchy(source, page_dir, paginate_path)
|
||||
return false if paginate_path == File.dirname(paginate_path)
|
||||
return false if paginate_path == Pathname.new(source).parent
|
||||
page_dir == paginate_path ||
|
||||
in_hierarchy(source, page_dir, File.dirname(paginate_path))
|
||||
end
|
||||
|
||||
# Static: Return the pagination path of the page
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
# num_page - the pagination page number
|
||||
#
|
||||
# Returns the pagination path as a string
|
||||
def self.paginate_path(site, num_page)
|
||||
return nil if num_page.nil?
|
||||
return Generators::Pagination.first_page_url(site) if num_page <= 1
|
||||
format = site.config['paginate_path']
|
||||
format = format.sub(':num', num_page.to_s)
|
||||
ensure_leading_slash(format)
|
||||
end
|
||||
|
||||
# Static: Return a String version of the input which has a leading slash.
|
||||
# If the input already has a forward slash in position zero, it will be
|
||||
# returned unchanged.
|
||||
#
|
||||
# path - a String path
|
||||
#
|
||||
# Returns the path with a leading slash
|
||||
def self.ensure_leading_slash(path)
|
||||
path[0..0] == "/" ? path : "/#{path}"
|
||||
end
|
||||
|
||||
# Static: Return a String version of the input without a leading slash.
|
||||
#
|
||||
# path - a String path
|
||||
#
|
||||
# Returns the input without the leading slash
|
||||
def self.remove_leading_slash(path)
|
||||
ensure_leading_slash(path)[1..-1]
|
||||
end
|
||||
|
||||
# Initialize a new Pager.
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
# page - The Integer page number.
|
||||
# all_posts - The Array of all the site's Posts.
|
||||
# num_pages - The Integer number of pages or nil if you'd like the number
|
||||
# of pages calculated.
|
||||
def initialize(site, page, all_posts, num_pages = nil)
|
||||
@page = page
|
||||
@per_page = site.config['paginate'].to_i
|
||||
@total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page)
|
||||
|
||||
if @page > @total_pages
|
||||
raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}"
|
||||
end
|
||||
|
||||
init = (@page - 1) * @per_page
|
||||
offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1)
|
||||
|
||||
@total_posts = all_posts.size
|
||||
@posts = all_posts[init..offset]
|
||||
@previous_page = @page != 1 ? @page - 1 : nil
|
||||
@previous_page_path = Pager.paginate_path(site, @previous_page)
|
||||
@next_page = @page != @total_pages ? @page + 1 : nil
|
||||
@next_page_path = Pager.paginate_path(site, @next_page)
|
||||
end
|
||||
|
||||
# Convert this Pager's data to a Hash suitable for use by Liquid.
|
||||
#
|
||||
# Returns the Hash representation of this Pager.
|
||||
def to_liquid
|
||||
{
|
||||
'page' => page,
|
||||
'per_page' => per_page,
|
||||
'posts' => posts,
|
||||
'total_posts' => total_posts,
|
||||
'total_pages' => total_pages,
|
||||
'previous_page' => previous_page,
|
||||
'previous_page_path' => previous_page_path,
|
||||
'next_page' => next_page,
|
||||
'next_page_path' => next_page_path
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -8,6 +8,9 @@ module Jekyll
|
||||
# Gets the name of this layout.
|
||||
attr_reader :name
|
||||
|
||||
# Gets the path to this layout.
|
||||
attr_reader :path
|
||||
|
||||
# Gets/Sets the extension of this layout.
|
||||
attr_accessor :ext
|
||||
|
||||
@@ -26,6 +29,7 @@ module Jekyll
|
||||
@site = site
|
||||
@base = base
|
||||
@name = name
|
||||
@path = site.in_source_dir(base, name)
|
||||
|
||||
self.data = {}
|
||||
|
||||
|
||||
@@ -38,12 +38,12 @@ module Jekyll
|
||||
end
|
||||
|
||||
def layout_directory_inside_source
|
||||
Jekyll.sanitized_path(site.source, site.config['layouts'])
|
||||
site.in_source_dir(site.config['layouts'])
|
||||
end
|
||||
|
||||
def layout_directory_in_cwd
|
||||
dir = Jekyll.sanitized_path(Dir.pwd, site.config['layouts'])
|
||||
if File.directory?(dir)
|
||||
if File.directory?(dir) && !site.safe
|
||||
dir
|
||||
else
|
||||
nil
|
||||
|
||||
105
lib/jekyll/log_adapter.rb
Normal file
105
lib/jekyll/log_adapter.rb
Normal file
@@ -0,0 +1,105 @@
|
||||
module Jekyll
|
||||
class LogAdapter
|
||||
attr_reader :writer, :messages
|
||||
|
||||
LOG_LEVELS = {
|
||||
:debug => ::Logger::DEBUG,
|
||||
:info => ::Logger::INFO,
|
||||
:warn => ::Logger::WARN,
|
||||
:error => ::Logger::ERROR
|
||||
}
|
||||
|
||||
# Public: Create a new instance of Jekyll's log writer
|
||||
#
|
||||
# writer - Logger compatible instance
|
||||
# log_level - (optional, symbol) the log level
|
||||
#
|
||||
# Returns nothing
|
||||
def initialize(writer, level = :info)
|
||||
@messages = []
|
||||
@writer = writer
|
||||
self.log_level = level
|
||||
end
|
||||
|
||||
# Public: Set the log level on the writer
|
||||
#
|
||||
# level - (symbol) the log level
|
||||
#
|
||||
# Returns nothing
|
||||
def log_level=(level)
|
||||
writer.level = LOG_LEVELS.fetch(level)
|
||||
end
|
||||
|
||||
# Public: Print a jekyll debug message
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def debug(topic, message = nil)
|
||||
writer.debug(message(topic, message))
|
||||
end
|
||||
|
||||
# Public: Print a jekyll message
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def info(topic, message = nil)
|
||||
writer.info(message(topic, message))
|
||||
end
|
||||
|
||||
# Public: Print a jekyll message
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def warn(topic, message = nil)
|
||||
writer.warn(message(topic, message))
|
||||
end
|
||||
|
||||
# Public: Print a jekyll error message
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def error(topic, message = nil)
|
||||
writer.error(message(topic, message))
|
||||
end
|
||||
|
||||
# Public: Print a Jekyll error message and immediately abort the process
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail (can be omitted)
|
||||
#
|
||||
# Returns nothing
|
||||
def abort_with(topic, message = nil)
|
||||
error(topic, message)
|
||||
abort
|
||||
end
|
||||
|
||||
# Internal: Build a Jekyll topic method
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns the formatted message
|
||||
def message(topic, message)
|
||||
msg = formatted_topic(topic) + message.to_s.gsub(/\s+/, ' ')
|
||||
messages << msg
|
||||
msg
|
||||
end
|
||||
|
||||
# Internal: Format the topic
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
#
|
||||
# Returns the formatted topic statement
|
||||
def formatted_topic(topic)
|
||||
"#{topic} ".rjust(20)
|
||||
end
|
||||
end
|
||||
end
|
||||
121
lib/jekyll/metadata.rb
Normal file
121
lib/jekyll/metadata.rb
Normal file
@@ -0,0 +1,121 @@
|
||||
module Jekyll
|
||||
class Metadata
|
||||
attr_reader :site, :metadata, :cache
|
||||
|
||||
def initialize(site)
|
||||
@site = site
|
||||
|
||||
# Read metadata from file
|
||||
read_metadata
|
||||
|
||||
# Initialize cache to an empty hash
|
||||
@cache = {}
|
||||
end
|
||||
|
||||
# Add a path to the metadata
|
||||
#
|
||||
# Returns true, also on failure.
|
||||
def add(path)
|
||||
return true unless File.exist?(path)
|
||||
|
||||
metadata[path] = {
|
||||
"mtime" => File.mtime(path),
|
||||
"deps" => []
|
||||
}
|
||||
cache[path] = true
|
||||
end
|
||||
|
||||
# Force a path to regenerate
|
||||
#
|
||||
# Returns true.
|
||||
def force(path)
|
||||
cache[path] = true
|
||||
end
|
||||
|
||||
# Clear the metadata and cache
|
||||
#
|
||||
# Returns nothing
|
||||
def clear
|
||||
@metadata = {}
|
||||
@cache = {}
|
||||
end
|
||||
|
||||
# Checks if a path should be regenerated
|
||||
#
|
||||
# Returns a boolean.
|
||||
def regenerate?(path, add = true)
|
||||
return true if disabled?
|
||||
|
||||
# Check for path in cache
|
||||
if cache.has_key? path
|
||||
return cache[path]
|
||||
end
|
||||
|
||||
# Check path that exists in metadata
|
||||
data = metadata[path]
|
||||
if data
|
||||
data["deps"].each do |dependency|
|
||||
if regenerate?(dependency)
|
||||
return cache[dependency] = cache[path] = true
|
||||
end
|
||||
end
|
||||
if data["mtime"].eql? File.mtime(path)
|
||||
return cache[path] = false
|
||||
else
|
||||
return !add || add(path)
|
||||
end
|
||||
end
|
||||
|
||||
# Path does not exist in metadata, add it
|
||||
return !add || add(path)
|
||||
end
|
||||
|
||||
# Add a dependency of a path
|
||||
#
|
||||
# Returns nothing.
|
||||
def add_dependency(path, dependency)
|
||||
return if (metadata[path].nil? || @disabled)
|
||||
|
||||
metadata[path]["deps"] << dependency unless metadata[path]["deps"].include? dependency
|
||||
regenerate? dependency
|
||||
end
|
||||
|
||||
# Write the metadata to disk
|
||||
#
|
||||
# Returns nothing.
|
||||
def write
|
||||
File.open(metadata_file, 'w') do |f|
|
||||
f.write(metadata.to_yaml)
|
||||
end
|
||||
end
|
||||
|
||||
# Produce the absolute path of the metadata file
|
||||
#
|
||||
# Returns the String path of the file.
|
||||
def metadata_file
|
||||
site.in_source_dir('.jekyll-metadata')
|
||||
end
|
||||
|
||||
# Check if metadata has been disabled
|
||||
#
|
||||
# Returns a Boolean (true for disabled, false for enabled).
|
||||
def disabled?
|
||||
@disabled = site.full_rebuild? if @disabled.nil?
|
||||
@disabled
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Read metadata from the metadata file, if no file is found,
|
||||
# initialize with an empty hash
|
||||
#
|
||||
# Returns the read metadata.
|
||||
def read_metadata
|
||||
@metadata = if !disabled? && File.file?(metadata_file)
|
||||
SafeYAML.load(File.read(metadata_file))
|
||||
else
|
||||
{}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -126,7 +126,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the path to the source file
|
||||
def path
|
||||
data.fetch('path', relative_path.sub(/\A\//, ''))
|
||||
data.fetch('path') { relative_path.sub(/\A\//, '') }
|
||||
end
|
||||
|
||||
# The path to the page source file, relative to the site source
|
||||
@@ -140,7 +140,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the destination file path String.
|
||||
def destination(dest)
|
||||
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
|
||||
path = site.in_dest_dir(dest, URL.unescape_path(url))
|
||||
path = File.join(path, "index.html") if url =~ /\/$/
|
||||
path
|
||||
end
|
||||
|
||||
@@ -6,22 +6,15 @@ module Jekyll
|
||||
:high => 10,
|
||||
:highest => 100 }
|
||||
|
||||
# Install a hook so that subclasses are recorded. This method is only
|
||||
# ever called by Ruby itself.
|
||||
# Fetch all the subclasses of this class and its subclasses' subclasses.
|
||||
#
|
||||
# base - The Class subclass.
|
||||
#
|
||||
# Returns nothing.
|
||||
def self.inherited(base)
|
||||
subclasses << base
|
||||
subclasses.sort!
|
||||
end
|
||||
|
||||
# The list of Classes that have been subclassed.
|
||||
#
|
||||
# Returns an Array of Class objects.
|
||||
def self.subclasses
|
||||
@subclasses ||= []
|
||||
# Returns an array of descendant classes.
|
||||
def self.descendants
|
||||
descendants = []
|
||||
ObjectSpace.each_object(singleton_class) do |k|
|
||||
descendants.unshift k unless k == self
|
||||
end
|
||||
descendants
|
||||
end
|
||||
|
||||
# Get or set the priority of this plugin. When called without an
|
||||
@@ -34,7 +27,7 @@ module Jekyll
|
||||
# Returns the Symbol priority.
|
||||
def self.priority(priority = nil)
|
||||
@priority ||= nil
|
||||
if priority && PRIORITIES.has_key?(priority)
|
||||
if priority && PRIORITIES.key?(priority)
|
||||
@priority = priority
|
||||
end
|
||||
@priority || :normal
|
||||
@@ -63,6 +56,15 @@ module Jekyll
|
||||
PRIORITIES[other.priority] <=> PRIORITIES[self.priority]
|
||||
end
|
||||
|
||||
# Spaceship is priority [higher -> lower]
|
||||
#
|
||||
# other - The class to be compared.
|
||||
#
|
||||
# Returns -1, 0, 1.
|
||||
def <=>(other)
|
||||
self.class <=> other.class
|
||||
end
|
||||
|
||||
# Initialize a new plugin. This should be overridden by the subclass.
|
||||
#
|
||||
# config - The Hash of configuration options.
|
||||
|
||||
@@ -25,11 +25,27 @@ module Jekyll
|
||||
def require_gems
|
||||
site.gems.each do |gem|
|
||||
if plugin_allowed?(gem)
|
||||
Jekyll.logger.debug("PluginManager:", "Requiring #{gem}")
|
||||
require gem
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.require_from_bundler
|
||||
if !ENV["JEKYLL_NO_BUNDLER_REQUIRE"] && File.file?("Gemfile")
|
||||
require "bundler"
|
||||
Bundler.setup # puts all groups on the load path
|
||||
required_gems = Bundler.require(:jekyll_plugins) # requires the gems in this group only
|
||||
Jekyll.logger.debug("PluginManager:", "Required #{required_gems.map(&:name).join(', ')}")
|
||||
ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = "true"
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
rescue LoadError, Bundler::GemfileNotFound
|
||||
false
|
||||
end
|
||||
|
||||
# Check whether a gem plugin is allowed to be used during this build.
|
||||
#
|
||||
# gem_name - the name of the gem
|
||||
@@ -66,7 +82,7 @@ module Jekyll
|
||||
# Returns an Array of plugin search paths
|
||||
def plugins_path
|
||||
if (site.config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
|
||||
[Jekyll.sanitized_path(site.source, site.config['plugins'])]
|
||||
[site.in_source_dir(site.config['plugins'])]
|
||||
else
|
||||
Array(site.config['plugins']).map { |d| File.expand_path(d) }
|
||||
end
|
||||
|
||||
@@ -49,7 +49,7 @@ module Jekyll
|
||||
def initialize(site, source, dir, name)
|
||||
@site = site
|
||||
@dir = dir
|
||||
@base = containing_dir(source, dir)
|
||||
@base = containing_dir(dir)
|
||||
@name = name
|
||||
|
||||
self.categories = dir.downcase.split('/').reject { |x| x.empty? }
|
||||
@@ -60,8 +60,8 @@ module Jekyll
|
||||
site.frontmatter_defaults.find(File.join(dir, name), type, key)
|
||||
end
|
||||
|
||||
if data.has_key?('date')
|
||||
self.date = Time.parse(data["date"].to_s)
|
||||
if data.key?('date')
|
||||
self.date = Utils.parse_date(data["date"].to_s, "Post '#{relative_path}' does not have a valid date in the YAML front matter.")
|
||||
end
|
||||
|
||||
populate_categories
|
||||
@@ -69,7 +69,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
def published?
|
||||
if data.has_key?('published') && data['published'] == false
|
||||
if data.key?('published') && data['published'] == false
|
||||
false
|
||||
else
|
||||
true
|
||||
@@ -77,10 +77,10 @@ module Jekyll
|
||||
end
|
||||
|
||||
def populate_categories
|
||||
if categories.empty?
|
||||
self.categories = Utils.pluralized_array_from_hash(data, 'category', 'categories').map {|c| c.to_s.downcase}
|
||||
end
|
||||
categories.flatten!
|
||||
categories_from_data = Utils.pluralized_array_from_hash(data, 'category', 'categories')
|
||||
self.categories = (
|
||||
Array(categories) + categories_from_data
|
||||
).map {|c| c.to_s.downcase}.flatten.uniq
|
||||
end
|
||||
|
||||
def populate_tags
|
||||
@@ -88,8 +88,8 @@ module Jekyll
|
||||
end
|
||||
|
||||
# Get the full path to the directory containing the post files
|
||||
def containing_dir(source, dir)
|
||||
return File.join(source, dir, '_posts')
|
||||
def containing_dir(dir)
|
||||
site.in_source_dir(dir, '_posts')
|
||||
end
|
||||
|
||||
# Read the YAML frontmatter.
|
||||
@@ -108,14 +108,14 @@ module Jekyll
|
||||
#
|
||||
# Returns excerpt string.
|
||||
def excerpt
|
||||
data.fetch('excerpt', extracted_excerpt.to_s)
|
||||
data.fetch('excerpt') { extracted_excerpt.to_s }
|
||||
end
|
||||
|
||||
# Public: the Post title, from the YAML Front-Matter or from the slug
|
||||
#
|
||||
# Returns the post title
|
||||
def title
|
||||
data.fetch("title", titleized_slug)
|
||||
data.fetch('title') { titleized_slug }
|
||||
end
|
||||
|
||||
# Turns the post slug into a suitable title
|
||||
@@ -130,7 +130,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the path to the file relative to the site source
|
||||
def path
|
||||
data.fetch('path', relative_path.sub(/\A\//, ''))
|
||||
data.fetch('path') { relative_path.sub(/\A\//, '') }
|
||||
end
|
||||
|
||||
# The path to the post source file, relative to the site source
|
||||
@@ -159,14 +159,9 @@ module Jekyll
|
||||
# Returns nothing.
|
||||
def process(name)
|
||||
m, cats, date, slug, ext = *name.match(MATCHER)
|
||||
self.date = Time.parse(date)
|
||||
self.date = Utils.parse_date(date, "Post '#{relative_path}' does not have a valid date in the filename.")
|
||||
self.slug = slug
|
||||
self.ext = ext
|
||||
rescue ArgumentError
|
||||
path = File.join(@dir || "", name)
|
||||
msg = "Post '#{path}' does not have a valid date.\n"
|
||||
msg << "Fix the date, or exclude the file or directory from being processed"
|
||||
raise FatalException.new(msg)
|
||||
end
|
||||
|
||||
# The generated directory into which the post will be placed
|
||||
@@ -221,8 +216,8 @@ module Jekyll
|
||||
:month => date.strftime("%m"),
|
||||
:day => date.strftime("%d"),
|
||||
:title => slug,
|
||||
:i_day => date.strftime("%d").to_i.to_s,
|
||||
:i_month => date.strftime("%m").to_i.to_s,
|
||||
:i_day => date.strftime("%-d"),
|
||||
:i_month => date.strftime("%-m"),
|
||||
:categories => (categories || []).map { |c| c.to_s }.join('/'),
|
||||
:short_month => date.strftime("%b"),
|
||||
:short_year => date.strftime("%y"),
|
||||
@@ -256,7 +251,7 @@ module Jekyll
|
||||
# construct payload
|
||||
payload = Utils.deep_merge_hashes({
|
||||
"site" => { "related_posts" => related_posts(site_payload["site"]["posts"]) },
|
||||
"page" => to_liquid(EXCERPT_ATTRIBUTES_FOR_LIQUID)
|
||||
"page" => to_liquid(self.class::EXCERPT_ATTRIBUTES_FOR_LIQUID)
|
||||
}, site_payload)
|
||||
|
||||
if generate_excerpt?
|
||||
@@ -273,8 +268,8 @@ module Jekyll
|
||||
# Returns destination file path String.
|
||||
def destination(dest)
|
||||
# The url needs to be unescaped in order to preserve the correct filename
|
||||
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
|
||||
path = File.join(path, "index.html") if path[/\.html$/].nil?
|
||||
path = site.in_dest_dir(dest, URL.unescape_path(url))
|
||||
path = File.join(path, "index.html") if path[/\.html?$/].nil?
|
||||
path
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ module Jekyll
|
||||
def initialize(post)
|
||||
@post = post
|
||||
@site = post.site
|
||||
require 'classifier' if site.lsi
|
||||
require 'classifier-reborn' if site.lsi
|
||||
end
|
||||
|
||||
def build
|
||||
@@ -27,7 +27,7 @@ module Jekyll
|
||||
|
||||
def build_index
|
||||
self.class.lsi ||= begin
|
||||
lsi = Classifier::LSI.new(:auto_rebuild => false)
|
||||
lsi = ClassifierReborn::LSI.new(:auto_rebuild => false)
|
||||
display("Populating LSI...")
|
||||
|
||||
site.posts.each do |x|
|
||||
@@ -46,8 +46,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
def most_recent_posts
|
||||
recent_posts = site.posts.reverse - [post]
|
||||
recent_posts.first(10)
|
||||
@most_recent_posts ||= (site.posts.reverse - [post]).first(10)
|
||||
end
|
||||
|
||||
def display(output)
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
class Renderer
|
||||
|
||||
attr_reader :document, :site
|
||||
attr_reader :document, :site, :site_payload
|
||||
|
||||
def initialize(site, document)
|
||||
@site = site
|
||||
@document = document
|
||||
def initialize(site, document, site_payload = nil)
|
||||
@site = site
|
||||
@document = document
|
||||
@site_payload = site_payload
|
||||
end
|
||||
|
||||
# Determine which converters to use based on this document's
|
||||
@@ -30,7 +33,7 @@ module Jekyll
|
||||
def run
|
||||
payload = Utils.deep_merge_hashes({
|
||||
"page" => document.to_liquid
|
||||
}, site.site_payload)
|
||||
}, site_payload || site.site_payload)
|
||||
|
||||
info = {
|
||||
filters: [Jekyll::Filters],
|
||||
@@ -47,11 +50,18 @@ module Jekyll
|
||||
output = render_liquid(output, payload, info)
|
||||
end
|
||||
|
||||
place_in_layouts(
|
||||
convert(output),
|
||||
payload,
|
||||
info
|
||||
)
|
||||
output = convert(output)
|
||||
document.content = output
|
||||
|
||||
if document.place_in_layout?
|
||||
place_in_layouts(
|
||||
output,
|
||||
payload,
|
||||
info
|
||||
)
|
||||
else
|
||||
output
|
||||
end
|
||||
end
|
||||
|
||||
# Convert the given content using the converters which match this renderer's document.
|
||||
@@ -64,7 +74,8 @@ module Jekyll
|
||||
begin
|
||||
converter.convert output
|
||||
rescue => e
|
||||
Jekyll.logger.error "Conversion error:", "#{converter.class} encountered an error converting '#{document.relative_path}'."
|
||||
Jekyll.logger.error "Conversion error:", "#{converter.class} encountered an error while converting '#{document.relative_path}':"
|
||||
Jekyll.logger.error("", e.to_s)
|
||||
raise e
|
||||
end
|
||||
end
|
||||
@@ -88,6 +99,15 @@ module Jekyll
|
||||
raise e
|
||||
end
|
||||
|
||||
# Checks if the layout specified in the document actually exists
|
||||
#
|
||||
# layout - the layout to check
|
||||
#
|
||||
# Returns true if the layout is invalid, false if otherwise
|
||||
def invalid_layout?(layout)
|
||||
!document.data["layout"].nil? && layout.nil?
|
||||
end
|
||||
|
||||
# Render layouts and place given content inside.
|
||||
#
|
||||
# content - the content to be placed in the layout
|
||||
@@ -97,6 +117,9 @@ module Jekyll
|
||||
def place_in_layouts(content, payload, info)
|
||||
output = content.dup
|
||||
layout = site.layouts[document.data["layout"]]
|
||||
|
||||
Jekyll.logger.warn("Build Warning:", "Layout '#{document.data["layout"]}' requested in #{document.relative_path} does not exist.") if invalid_layout? layout
|
||||
|
||||
used = Set.new([layout])
|
||||
|
||||
while layout
|
||||
@@ -116,6 +139,12 @@ module Jekyll
|
||||
File.join(site.config['layouts'], layout.name)
|
||||
)
|
||||
|
||||
# Add layout to dependency tree
|
||||
site.metadata.add_dependency(
|
||||
site.in_source_dir(document.path),
|
||||
site.in_source_dir(layout.path)
|
||||
) if document.write?
|
||||
|
||||
if layout = site.layouts[layout.data["layout"]]
|
||||
if used.include?(layout)
|
||||
layout = nil # avoid recursive chain
|
||||
|
||||
@@ -1,27 +1,35 @@
|
||||
# encoding: UTF-8
|
||||
require 'csv'
|
||||
|
||||
module Jekyll
|
||||
class Site
|
||||
attr_accessor :config, :layouts, :posts, :pages, :static_files,
|
||||
:exclude, :include, :source, :dest, :lsi, :highlighter,
|
||||
:permalink_style, :time, :future, :unpublished, :safe, :plugins, :limit_posts,
|
||||
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems,
|
||||
:plugin_manager
|
||||
attr_reader :source, :dest, :config
|
||||
attr_accessor :layouts, :posts, :pages, :static_files,
|
||||
:exclude, :include, :lsi, :highlighter, :permalink_style,
|
||||
:time, :future, :unpublished, :safe, :plugins, :limit_posts,
|
||||
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts,
|
||||
:gems, :plugin_manager
|
||||
|
||||
attr_accessor :converters, :generators
|
||||
attr_reader :metadata
|
||||
|
||||
# Public: Initialize a new Site.
|
||||
#
|
||||
# config - A Hash containing site configuration details.
|
||||
def initialize(config)
|
||||
self.config = config.clone
|
||||
@config = config.clone
|
||||
|
||||
%w[safe lsi highlighter baseurl exclude include future unpublished
|
||||
show_drafts limit_posts keep_files gems].each do |opt|
|
||||
self.send("#{opt}=", config[opt])
|
||||
end
|
||||
|
||||
self.source = File.expand_path(config['source'])
|
||||
self.dest = File.expand_path(config['destination'])
|
||||
self.permalink_style = config['permalink'].to_sym
|
||||
# Source and destination may not be changed after the site has been created.
|
||||
@source = File.expand_path(config['source']).freeze
|
||||
@dest = File.expand_path(config['destination']).freeze
|
||||
|
||||
# Build metadata
|
||||
@metadata = Metadata.new(self)
|
||||
|
||||
self.plugin_manager = Jekyll::PluginManager.new(self)
|
||||
self.plugins = plugin_manager.plugins_path
|
||||
@@ -29,6 +37,10 @@ module Jekyll
|
||||
self.file_read_opts = {}
|
||||
self.file_read_opts[:encoding] = config['encoding'] if config['encoding']
|
||||
|
||||
self.permalink_style = config['permalink'].to_sym
|
||||
|
||||
Jekyll.sites << self
|
||||
|
||||
reset
|
||||
setup
|
||||
end
|
||||
@@ -49,7 +61,7 @@ module Jekyll
|
||||
#
|
||||
# Returns nothing
|
||||
def reset
|
||||
self.time = (config['time'] ? Time.parse(config['time'].to_s) : Time.now)
|
||||
self.time = (config['time'] ? Utils.parse_date(config['time'].to_s, "Invalid time in _config.yml.") : Time.now)
|
||||
self.layouts = {}
|
||||
self.posts = []
|
||||
self.pages = []
|
||||
@@ -80,11 +92,35 @@ module Jekyll
|
||||
dest_pathname = Pathname.new(dest)
|
||||
Pathname.new(source).ascend do |path|
|
||||
if path == dest_pathname
|
||||
raise FatalException.new "Destination directory cannot be or contain the Source directory."
|
||||
raise Errors::FatalException.new "Destination directory cannot be or contain the Source directory."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Prefix a given path with the source directory.
|
||||
#
|
||||
# paths - (optional) path elements to a file or directory within the
|
||||
# source directory
|
||||
#
|
||||
# Returns a path which is prefixed with the source directory.
|
||||
def in_source_dir(*paths)
|
||||
paths.reduce(source) do |base, path|
|
||||
Jekyll.sanitized_path(base, path)
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Prefix a given path with the destination directory.
|
||||
#
|
||||
# paths - (optional) path elements to a file or directory within the
|
||||
# destination directory
|
||||
#
|
||||
# Returns a path which is prefixed with the destination directory.
|
||||
def in_dest_dir(*paths)
|
||||
paths.reduce(dest) do |base, path|
|
||||
Jekyll.sanitized_path(base, path)
|
||||
end
|
||||
end
|
||||
|
||||
# The list of collections and their corresponding Jekyll::Collection instances.
|
||||
# If config['collections'] is set, a new instance is created for each item in the collection.
|
||||
# If config['collections'] is not set, a new hash is returned.
|
||||
@@ -129,7 +165,7 @@ module Jekyll
|
||||
#
|
||||
# Returns nothing.
|
||||
def read_directories(dir = '')
|
||||
base = File.join(source, dir)
|
||||
base = in_source_dir(dir)
|
||||
entries = Dir.chdir(base) { filter_entries(Dir.entries('.'), base) }
|
||||
|
||||
read_posts(dir)
|
||||
@@ -138,11 +174,11 @@ module Jekyll
|
||||
limit_posts! if limit_posts > 0 # limit the posts if :limit_posts option is set
|
||||
|
||||
entries.each do |f|
|
||||
f_abs = File.join(base, f)
|
||||
f_abs = in_source_dir(base, f)
|
||||
if File.directory?(f_abs)
|
||||
f_rel = File.join(dir, f)
|
||||
read_directories(f_rel) unless dest.sub(/\/$/, '') == f_abs
|
||||
elsif has_yaml_header?(f_abs)
|
||||
elsif Utils.has_yaml_header?(f_abs)
|
||||
page = Page.new(self, source, dir, f)
|
||||
pages << page if publisher.publish?(page)
|
||||
else
|
||||
@@ -151,6 +187,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
pages.sort_by!(&:name)
|
||||
static_files.sort_by!(&:relative_path)
|
||||
end
|
||||
|
||||
# Read all the files in <source>/<dir>/_posts and create a new Post
|
||||
@@ -195,18 +232,39 @@ module Jekyll
|
||||
#
|
||||
# Returns nothing
|
||||
def read_data(dir)
|
||||
base = File.join(source, dir)
|
||||
return unless File.directory?(base) && (!safe || !File.symlink?(base))
|
||||
base = in_source_dir(dir)
|
||||
read_data_to(base, self.data)
|
||||
end
|
||||
|
||||
entries = Dir.chdir(base) { Dir['*.{yaml,yml}'] }
|
||||
entries.delete_if { |e| File.directory?(File.join(base, e)) }
|
||||
# Read and parse all yaml files under <dir> and add them to the
|
||||
# <data> variable.
|
||||
#
|
||||
# dir - The string absolute path of the directory to read.
|
||||
# data - The variable to which data will be added.
|
||||
#
|
||||
# Returns nothing
|
||||
def read_data_to(dir, data)
|
||||
return unless File.directory?(dir) && (!safe || !File.symlink?(dir))
|
||||
|
||||
entries = Dir.chdir(dir) do
|
||||
Dir['*.{yaml,yml,json,csv}'] + Dir['*'].select { |fn| File.directory?(fn) }
|
||||
end
|
||||
|
||||
entries.each do |entry|
|
||||
path = File.join(source, dir, entry)
|
||||
path = in_source_dir(dir, entry)
|
||||
next if File.symlink?(path) && safe
|
||||
|
||||
key = sanitize_filename(File.basename(entry, '.*'))
|
||||
self.data[key] = SafeYAML.load_file(path)
|
||||
if File.directory?(path)
|
||||
read_data_to(path, data[key] = {})
|
||||
else
|
||||
case File.extname(path).downcase
|
||||
when '.csv'
|
||||
data[key] = CSV.read(path, :headers => true).map(&:to_hash)
|
||||
else
|
||||
data[key] = SafeYAML.load_file(path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -234,15 +292,16 @@ module Jekyll
|
||||
def render
|
||||
relative_permalinks_deprecation_method
|
||||
|
||||
payload = site_payload
|
||||
collections.each do |label, collection|
|
||||
collection.docs.each do |document|
|
||||
document.output = Jekyll::Renderer.new(self, document).run
|
||||
document.output = Jekyll::Renderer.new(self, document, payload).run if document.regenerate?
|
||||
end
|
||||
end
|
||||
|
||||
payload = site_payload
|
||||
[posts, pages].flatten.each do |page_or_post|
|
||||
page_or_post.render(layouts, payload)
|
||||
page_or_post.render(layouts, payload) if page_or_post.regenerate?
|
||||
end
|
||||
rescue Errno::ENOENT => e
|
||||
# ignore missing layout dir
|
||||
@@ -259,7 +318,10 @@ module Jekyll
|
||||
#
|
||||
# Returns nothing.
|
||||
def write
|
||||
each_site_file { |item| item.write(dest) }
|
||||
each_site_file { |item|
|
||||
item.write(dest) if item.regenerate?
|
||||
}
|
||||
metadata.write unless full_rebuild?
|
||||
end
|
||||
|
||||
# Construct a Hash of Posts indexed by the specified Post attribute.
|
||||
@@ -314,19 +376,23 @@ module Jekyll
|
||||
# "tags" - The Hash of tag values and Posts.
|
||||
# See Site#post_attr_hash for type info.
|
||||
def site_payload
|
||||
{"jekyll" => { "version" => Jekyll::VERSION },
|
||||
"site" => Utils.deep_merge_hashes(config,
|
||||
Utils.deep_merge_hashes(Hash[collections.map{|label, coll| [label, coll.docs]}], {
|
||||
"time" => time,
|
||||
"posts" => posts.sort { |a, b| b <=> a },
|
||||
"pages" => pages,
|
||||
"static_files" => static_files.sort { |a, b| a.relative_path <=> b.relative_path },
|
||||
"html_pages" => pages.reject { |page| !page.html? },
|
||||
"categories" => post_attr_hash('categories'),
|
||||
"tags" => post_attr_hash('tags'),
|
||||
"collections" => collections,
|
||||
"documents" => documents,
|
||||
"data" => site_data
|
||||
{
|
||||
"jekyll" => {
|
||||
"version" => Jekyll::VERSION,
|
||||
"environment" => Jekyll.env
|
||||
},
|
||||
"site" => Utils.deep_merge_hashes(config,
|
||||
Utils.deep_merge_hashes(Hash[collections.map{|label, coll| [label, coll.docs]}], {
|
||||
"time" => time,
|
||||
"posts" => posts.sort { |a, b| b <=> a },
|
||||
"pages" => pages,
|
||||
"static_files" => static_files,
|
||||
"html_pages" => pages.select { |page| page.html? || page.url.end_with?("/") },
|
||||
"categories" => post_attr_hash('categories'),
|
||||
"tags" => post_attr_hash('tags'),
|
||||
"collections" => collections,
|
||||
"documents" => documents,
|
||||
"data" => site_data
|
||||
}))
|
||||
}
|
||||
end
|
||||
@@ -348,13 +414,8 @@ module Jekyll
|
||||
# klass - The Class of the Converter to fetch.
|
||||
#
|
||||
# Returns the Converter instance implementing the given Converter.
|
||||
def getConverterImpl(klass)
|
||||
matches = converters.select { |c| c.class == klass }
|
||||
if impl = matches.first
|
||||
impl
|
||||
else
|
||||
raise "Converter implementation not found for #{klass}"
|
||||
end
|
||||
def find_converter_instance(klass)
|
||||
converters.find { |c| c.class == klass } || proc { raise "No converter for #{klass}" }.call
|
||||
end
|
||||
|
||||
# Create array of instances of the subclasses of the class or module
|
||||
@@ -365,7 +426,7 @@ module Jekyll
|
||||
#
|
||||
# Returns array of instances of subclasses of parameter
|
||||
def instantiate_subclasses(klass)
|
||||
klass.subclasses.select do |c|
|
||||
klass.descendants.select do |c|
|
||||
!safe || c.safe
|
||||
end.sort.map do |c|
|
||||
c.new(config)
|
||||
@@ -379,10 +440,10 @@ module Jekyll
|
||||
#
|
||||
# Returns the list of entries to process
|
||||
def get_entries(dir, subfolder)
|
||||
base = File.join(source, dir, subfolder)
|
||||
base = in_source_dir(dir, subfolder)
|
||||
return [] unless File.exist?(base)
|
||||
entries = Dir.chdir(base) { filter_entries(Dir['**/*'], base) }
|
||||
entries.delete_if { |e| File.directory?(File.join(base, e)) }
|
||||
entries.delete_if { |e| File.directory?(in_source_dir(base, e)) }
|
||||
end
|
||||
|
||||
# Aggregate post information
|
||||
@@ -396,7 +457,7 @@ module Jekyll
|
||||
|
||||
def relative_permalinks_deprecation_method
|
||||
if config['relative_permalinks'] && has_relative_page?
|
||||
Jekyll.logger.warn "Deprecation:", "Starting in 2.0, permalinks for pages" +
|
||||
Jekyll.logger.warn "Deprecation:", "Since v2.0, permalinks for pages" +
|
||||
" in subfolders must be relative to the" +
|
||||
" site source directory, not the parent" +
|
||||
" directory. Check http://jekyllrb.com/docs/upgrading/"+
|
||||
@@ -410,7 +471,7 @@ module Jekyll
|
||||
|
||||
def documents
|
||||
collections.reduce(Set.new) do |docs, (_, collection)|
|
||||
docs.merge(collection.docs)
|
||||
docs + collection.docs + collection.files
|
||||
end.to_a
|
||||
end
|
||||
|
||||
@@ -423,7 +484,18 @@ module Jekyll
|
||||
end
|
||||
|
||||
def frontmatter_defaults
|
||||
@frontmatter_defaults ||= Configuration::FrontmatterDefaults.new(self)
|
||||
@frontmatter_defaults ||= FrontmatterDefaults.new(self)
|
||||
end
|
||||
|
||||
# Whether to perform a full rebuild without metadata
|
||||
#
|
||||
# Returns a Boolean: true for a full rebuild, false for normal build
|
||||
def full_rebuild?(override = {})
|
||||
override['full_rebuild'] || config['full_rebuild']
|
||||
end
|
||||
|
||||
def publisher
|
||||
@publisher ||= Publisher.new(self)
|
||||
end
|
||||
|
||||
private
|
||||
@@ -432,10 +504,6 @@ module Jekyll
|
||||
pages.any? { |page| page.uses_relative_permalinks }
|
||||
end
|
||||
|
||||
def has_yaml_header?(file)
|
||||
!!(File.open(file, 'rb') { |f| f.read(5) } =~ /\A---\r?\n/)
|
||||
end
|
||||
|
||||
def limit_posts!
|
||||
limit = posts.length < limit_posts ? posts.length : limit_posts
|
||||
self.posts = posts[-limit, limit]
|
||||
@@ -450,9 +518,5 @@ module Jekyll
|
||||
name.gsub!(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2')
|
||||
name.gsub(/\s+/, '_')
|
||||
end
|
||||
|
||||
def publisher
|
||||
@publisher ||= Publisher.new(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,27 +3,30 @@ module Jekyll
|
||||
# The cache of last modification times [path] -> mtime.
|
||||
@@mtimes = Hash.new
|
||||
|
||||
attr_reader :relative_path
|
||||
|
||||
# Initialize a new StaticFile.
|
||||
#
|
||||
# site - The Site.
|
||||
# base - The String path to the <source>.
|
||||
# dir - The String path between <source> and the file.
|
||||
# name - The String filename of the file.
|
||||
def initialize(site, base, dir, name)
|
||||
def initialize(site, base, dir, name, collection = nil)
|
||||
@site = site
|
||||
@base = base
|
||||
@dir = dir
|
||||
@name = name
|
||||
@collection = collection
|
||||
@relative_path = File.join(*[@dir, @name].compact)
|
||||
end
|
||||
|
||||
# Returns source file path.
|
||||
def path
|
||||
File.join(@base, @dir, @name)
|
||||
File.join(*[@base, @dir, @name].compact)
|
||||
end
|
||||
|
||||
# Returns the source file path relative to the site source
|
||||
def relative_path
|
||||
@relative_path ||= path.sub(/\A#{@site.source}/, '')
|
||||
def extname
|
||||
File.extname(path)
|
||||
end
|
||||
|
||||
# Obtain destination path.
|
||||
@@ -32,7 +35,15 @@ module Jekyll
|
||||
#
|
||||
# Returns destination file path.
|
||||
def destination(dest)
|
||||
File.join(dest, @dir, @name)
|
||||
@site.in_dest_dir(*[dest, destination_rel_dir, @name].compact)
|
||||
end
|
||||
|
||||
def destination_rel_dir
|
||||
if @collection
|
||||
@dir.gsub(/\A_/, '')
|
||||
else
|
||||
@dir
|
||||
end
|
||||
end
|
||||
|
||||
# Returns last modification time for this file.
|
||||
@@ -47,6 +58,15 @@ module Jekyll
|
||||
@@mtimes[path] != mtime
|
||||
end
|
||||
|
||||
# Whether to write the file to the filesystem
|
||||
#
|
||||
# Returns true.
|
||||
def write?
|
||||
true
|
||||
end
|
||||
|
||||
alias_method :regenerate?, :write?
|
||||
|
||||
# Write the static file to the destination directory (if modified).
|
||||
#
|
||||
# dest - The String path to the destination dir.
|
||||
@@ -59,6 +79,7 @@ module Jekyll
|
||||
@@mtimes[path] = mtime
|
||||
|
||||
FileUtils.mkdir_p(File.dirname(dest_path))
|
||||
FileUtils.rm(dest_path) if File.exist?(dest_path)
|
||||
FileUtils.cp(path, dest_path)
|
||||
|
||||
true
|
||||
@@ -74,7 +95,7 @@ module Jekyll
|
||||
|
||||
def to_liquid
|
||||
{
|
||||
"path" => relative_path,
|
||||
"path" => File.join("", relative_path),
|
||||
"modified_time" => mtime.to_s,
|
||||
"extname" => File.extname(relative_path)
|
||||
}
|
||||
|
||||
@@ -1,102 +1,58 @@
|
||||
module Jekyll
|
||||
class Stevenson
|
||||
attr_accessor :log_level
|
||||
|
||||
LOG_LEVELS = {
|
||||
debug: 0,
|
||||
info: 1,
|
||||
warn: 2,
|
||||
error: 3
|
||||
}
|
||||
|
||||
# Public: Create a new instance of Stevenson, Jekyll's logger
|
||||
#
|
||||
# level - (optional, symbol) the log level
|
||||
#
|
||||
# Returns nothing
|
||||
def initialize(level = :info)
|
||||
@log_level = level
|
||||
class Stevenson < ::Logger
|
||||
def initialize
|
||||
@progname = nil
|
||||
@level = DEBUG
|
||||
@default_formatter = Formatter.new
|
||||
@logdev = $stdout
|
||||
@formatter = proc do |severity, datetime, progname, msg|
|
||||
"#{msg}"
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Print a jekyll debug message to stdout
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def debug(topic, message = nil)
|
||||
$stdout.puts(message(topic, message)) if should_log(:debug)
|
||||
def add(severity, message = nil, progname = nil, &block)
|
||||
severity ||= UNKNOWN
|
||||
@logdev = set_logdevice(severity)
|
||||
|
||||
if @logdev.nil? or severity < @level
|
||||
return true
|
||||
end
|
||||
progname ||= @progname
|
||||
if message.nil?
|
||||
if block_given?
|
||||
message = yield
|
||||
else
|
||||
message = progname
|
||||
progname = @progname
|
||||
end
|
||||
end
|
||||
@logdev.puts(
|
||||
format_message(format_severity(severity), Time.now, progname, message))
|
||||
true
|
||||
end
|
||||
|
||||
# Public: Print a jekyll message to stdout
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def info(topic, message = nil)
|
||||
$stdout.puts(message(topic, message)) if should_log(:info)
|
||||
# Log a +WARN+ message
|
||||
def warn(progname = nil, &block)
|
||||
add(WARN, nil, progname.yellow, &block)
|
||||
end
|
||||
|
||||
# Public: Print a jekyll message to stderr
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def warn(topic, message = nil)
|
||||
$stderr.puts(message(topic, message).yellow) if should_log(:warn)
|
||||
# Log an +ERROR+ message
|
||||
def error(progname = nil, &block)
|
||||
add(ERROR, nil, progname.red, &block)
|
||||
end
|
||||
|
||||
# Public: Print a jekyll error message to stderr
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns nothing
|
||||
def error(topic, message = nil)
|
||||
$stderr.puts(message(topic, message).red) if should_log(:error)
|
||||
def close
|
||||
# No LogDevice in use
|
||||
end
|
||||
|
||||
# Public: Print a Jekyll error message to stderr and immediately abort the process
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail (can be omitted)
|
||||
#
|
||||
# Returns nothing
|
||||
def abort_with(topic, message = nil)
|
||||
error(topic, message)
|
||||
abort
|
||||
end
|
||||
private
|
||||
|
||||
# Public: Build a Jekyll topic method
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
# message - the message detail
|
||||
#
|
||||
# Returns the formatted message
|
||||
def message(topic, message)
|
||||
formatted_topic(topic) + message.to_s.gsub(/\s+/, ' ')
|
||||
end
|
||||
|
||||
# Public: Format the topic
|
||||
#
|
||||
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
|
||||
#
|
||||
# Returns the formatted topic statement
|
||||
def formatted_topic(topic)
|
||||
"#{topic} ".rjust(20)
|
||||
end
|
||||
|
||||
# Public: Determine whether the current log level warrants logging at the
|
||||
# proposed level.
|
||||
#
|
||||
# level_of_message - the log level of the message (symbol)
|
||||
#
|
||||
# Returns true if the log level of the message is greater than or equal to
|
||||
# this logger's log level.
|
||||
def should_log(level_of_message)
|
||||
LOG_LEVELS.fetch(log_level) <= LOG_LEVELS.fetch(level_of_message)
|
||||
def set_logdevice(severity)
|
||||
if severity > INFO
|
||||
$stderr
|
||||
else
|
||||
$stdout
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
# Gist Liquid Tag
|
||||
#
|
||||
# Example:
|
||||
# {% gist 1234567 %}
|
||||
# {% gist 1234567 file.rb %}
|
||||
|
||||
module Jekyll
|
||||
class GistTag < Liquid::Tag
|
||||
|
||||
def render(context)
|
||||
if tag_contents = determine_arguments(@markup.strip)
|
||||
gist_id, filename = tag_contents[0], tag_contents[1]
|
||||
gist_script_tag(gist_id, filename)
|
||||
else
|
||||
raise ArgumentError.new <<-eos
|
||||
Syntax error in tag 'gist' while parsing the following markup:
|
||||
|
||||
#{@markup}
|
||||
|
||||
Valid syntax:
|
||||
for public gists: {% gist 1234567 %}
|
||||
for private gists: {% gist user/1234567 %}
|
||||
eos
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def determine_arguments(input)
|
||||
matched = if input.include?("/")
|
||||
input.match(/\A([a-zA-Z0-9\/\-_]+) ?(\S*)\Z/)
|
||||
else
|
||||
input.match(/\A(\d+) ?(\S*)\Z/)
|
||||
end
|
||||
[matched[1].strip, matched[2].strip] if matched && matched.length >= 3
|
||||
end
|
||||
|
||||
def gist_script_tag(gist_id, filename = nil)
|
||||
if filename.empty?
|
||||
"<script src=\"https://gist.github.com/#{gist_id}.js\"> </script>"
|
||||
else
|
||||
"<script src=\"https://gist.github.com/#{gist_id}.js?file=#{filename}\"> </script>"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('gist', Jekyll::GistTag)
|
||||
@@ -4,9 +4,11 @@ module Jekyll
|
||||
include Liquid::StandardFilters
|
||||
|
||||
# The regular expression syntax checker. Start with the language specifier.
|
||||
# Follow that by zero or more space separated options that take one of two
|
||||
# forms: name or name=value
|
||||
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=\w+)?)*)$/
|
||||
# Follow that by zero or more space separated options that take one of three
|
||||
# forms: name, name=value, or name="<quoted list>"
|
||||
#
|
||||
# <quoted list> is a space-separated list of numbers
|
||||
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$/
|
||||
|
||||
def initialize(tag_name, markup, tokens)
|
||||
super
|
||||
@@ -14,8 +16,14 @@ module Jekyll
|
||||
@lang = $1.downcase
|
||||
@options = {}
|
||||
if defined?($2) && $2 != ''
|
||||
$2.split.each do |opt|
|
||||
# Split along 3 possible forms -- key="<quoted list>", key=value, or key
|
||||
$2.scan(/(?:\w="[^"]*"|\w=\w|\w)+/) do |opt|
|
||||
key, value = opt.split('=')
|
||||
# If a quoted list, convert to array
|
||||
if value && value.include?("\"")
|
||||
value.gsub!(/"/, "")
|
||||
value = value.split
|
||||
end
|
||||
@options[key.to_sym] = value || true
|
||||
end
|
||||
end
|
||||
@@ -36,24 +44,46 @@ eos
|
||||
suffix = context["highlighter_suffix"] || ""
|
||||
code = super.to_s.strip
|
||||
|
||||
output = case context.registers[:site].highlighter
|
||||
when 'pygments'
|
||||
render_pygments(code)
|
||||
when 'rouge'
|
||||
render_rouge(code)
|
||||
else
|
||||
render_codehighlighter(code)
|
||||
end
|
||||
is_safe = !!context.registers[:site].safe
|
||||
|
||||
output =
|
||||
case context.registers[:site].highlighter
|
||||
when 'pygments'
|
||||
render_pygments(code, is_safe)
|
||||
when 'rouge'
|
||||
render_rouge(code)
|
||||
else
|
||||
render_codehighlighter(code)
|
||||
end
|
||||
|
||||
rendered_output = add_code_tag(output)
|
||||
prefix + rendered_output + suffix
|
||||
end
|
||||
|
||||
def render_pygments(code)
|
||||
def sanitized_opts(opts, is_safe)
|
||||
if is_safe
|
||||
Hash[[
|
||||
[:startinline, opts.fetch(:startinline, nil)],
|
||||
[:hl_linenos, opts.fetch(:hl_linenos, nil)],
|
||||
[:linenos, opts.fetch(:linenos, nil)],
|
||||
[:encoding, opts.fetch(:encoding, 'utf-8')],
|
||||
[:cssclass, opts.fetch(:cssclass, nil)]
|
||||
].reject {|f| f.last.nil? }]
|
||||
else
|
||||
opts
|
||||
end
|
||||
end
|
||||
|
||||
def render_pygments(code, is_safe)
|
||||
require 'pygments'
|
||||
|
||||
@options[:encoding] = 'utf-8'
|
||||
|
||||
highlighted_code = Pygments.highlight(code, :lexer => @lang, :options => @options)
|
||||
highlighted_code = Pygments.highlight(
|
||||
code,
|
||||
:lexer => @lang,
|
||||
:options => sanitized_opts(@options, is_safe)
|
||||
)
|
||||
|
||||
if highlighted_code.nil?
|
||||
Jekyll.logger.error "There was an error highlighting your code:"
|
||||
@@ -83,7 +113,7 @@ eos
|
||||
|
||||
def add_code_tag(code)
|
||||
# Add nested <code> tags to code blocks
|
||||
code = code.sub(/<pre>\n*/,'<pre><code class="' + @lang.to_s.gsub("+", "-") + '">')
|
||||
code = code.sub(/<pre>\n*/,'<pre><code class="language-' + @lang.to_s.gsub("+", "-") + '" data-lang="' + @lang.to_s + '">')
|
||||
code = code.sub(/\n*<\/pre>/,"</code></pre>")
|
||||
code.strip
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
module Tags
|
||||
class IncludeTagError < StandardError
|
||||
@@ -11,15 +13,20 @@ module Jekyll
|
||||
|
||||
class IncludeTag < Liquid::Tag
|
||||
|
||||
SYNTAX_EXAMPLE = "{% include file.ext param='value' param2='value' %}"
|
||||
attr_reader :includes_dir
|
||||
|
||||
VALID_SYNTAX = /([\w-]+)\s*=\s*(?:"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'|([\w\.-]+))/
|
||||
VARIABLE_SYNTAX = /(?<variable>\{\{\s*(?<name>[\w\-\.]+)\s*(\|.*)?\}\})(?<params>.*)/
|
||||
VARIABLE_SYNTAX = /(?<variable>[^{]*\{\{\s*(?<name>[\w\-\.]+)\s*(\|.*)?\}\}[^\s}]*)(?<params>.*)/
|
||||
|
||||
INCLUDES_DIR = '_includes'
|
||||
class << self
|
||||
def source_cache
|
||||
@@source_cache ||= {}
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(tag_name, markup, tokens)
|
||||
super
|
||||
@includes_dir = tag_includes_dir
|
||||
matched = markup.strip.match(VARIABLE_SYNTAX)
|
||||
if matched
|
||||
@file = matched['variable'].strip
|
||||
@@ -28,6 +35,11 @@ module Jekyll
|
||||
@file, @params = markup.strip.split(' ', 2);
|
||||
end
|
||||
validate_params if @params
|
||||
@tag_name = tag_name
|
||||
end
|
||||
|
||||
def syntax_example
|
||||
"{% #{@tag_name} file.ext param='value' param2='value' %}"
|
||||
end
|
||||
|
||||
def parse_params(context)
|
||||
@@ -59,7 +71,7 @@ Invalid syntax for include tag. File contains invalid characters or sequences:
|
||||
|
||||
Valid syntax:
|
||||
|
||||
#{SYNTAX_EXAMPLE}
|
||||
#{syntax_example}
|
||||
|
||||
eos
|
||||
end
|
||||
@@ -75,7 +87,7 @@ Invalid syntax for include tag:
|
||||
|
||||
Valid syntax:
|
||||
|
||||
#{SYNTAX_EXAMPLE}
|
||||
#{syntax_example}
|
||||
|
||||
eos
|
||||
end
|
||||
@@ -94,14 +106,27 @@ eos
|
||||
end
|
||||
end
|
||||
|
||||
def tag_includes_dir
|
||||
'_includes'
|
||||
end
|
||||
|
||||
def render(context)
|
||||
dir = File.join(File.realpath(context.registers[:site].source), INCLUDES_DIR)
|
||||
site = context.registers[:site]
|
||||
dir = resolved_includes_dir(context)
|
||||
|
||||
file = render_variable(context) || @file
|
||||
validate_file_name(file)
|
||||
|
||||
path = File.join(dir, file)
|
||||
validate_path(path, dir, context.registers[:site].safe)
|
||||
validate_path(path, dir, site.safe)
|
||||
|
||||
# Add include to dependency tree
|
||||
if context.registers[:page] and context.registers[:page].has_key? "path"
|
||||
site.metadata.add_dependency(
|
||||
site.in_source_dir(context.registers[:page]["path"]),
|
||||
path
|
||||
)
|
||||
end
|
||||
|
||||
begin
|
||||
partial = Liquid::Template.parse(source(path, context))
|
||||
@@ -111,10 +136,14 @@ eos
|
||||
partial.render!(context)
|
||||
end
|
||||
rescue => e
|
||||
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
||||
raise IncludeTagError.new e.message, File.join(@includes_dir, @file)
|
||||
end
|
||||
end
|
||||
|
||||
def resolved_includes_dir(context)
|
||||
File.join(File.realpath(context.registers[:site].source), @includes_dir)
|
||||
end
|
||||
|
||||
def validate_path(path, dir, safe)
|
||||
if safe && !realpath_prefixed_with?(path, dir)
|
||||
raise IOError.new "The included file '#{path}' should exist and should not be a symlink"
|
||||
@@ -124,23 +153,34 @@ eos
|
||||
end
|
||||
|
||||
def path_relative_to_source(dir, path)
|
||||
File.join(INCLUDES_DIR, path.sub(Regexp.new("^#{dir}"), ""))
|
||||
File.join(@includes_dir, path.sub(Regexp.new("^#{dir}"), ""))
|
||||
end
|
||||
|
||||
def realpath_prefixed_with?(path, dir)
|
||||
File.exist?(path) && File.realpath(path).start_with?(dir)
|
||||
end
|
||||
|
||||
def blank?
|
||||
false
|
||||
end
|
||||
|
||||
# This method allows to modify the file content by inheriting from the class.
|
||||
def source(file, context)
|
||||
File.read(file, file_read_opts(context))
|
||||
self.class.source_cache[file] ||= File.read(file, file_read_opts(context))
|
||||
end
|
||||
end
|
||||
|
||||
class IncludeRelativeTag < IncludeTag
|
||||
def tag_includes_dir
|
||||
'.'
|
||||
end
|
||||
|
||||
def page_path(context)
|
||||
context.registers[:page].nil? ? includes_dir : File.dirname(context.registers[:page]["path"])
|
||||
end
|
||||
|
||||
def resolved_includes_dir(context)
|
||||
context.registers[:site].in_source_dir(page_path(context))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('include', Jekyll::Tags::IncludeTag)
|
||||
Liquid::Template.register_tag('include_relative', Jekyll::Tags::IncludeRelativeTag)
|
||||
|
||||
@@ -3,16 +3,22 @@ module Jekyll
|
||||
class PostComparer
|
||||
MATCHER = /^(.+\/)*(\d+-\d+-\d+)-(.*)$/
|
||||
|
||||
attr_accessor :date, :slug
|
||||
attr_reader :path, :date, :slug, :name
|
||||
|
||||
def initialize(name)
|
||||
all, path, date, slug = *name.sub(/^\//, "").match(MATCHER)
|
||||
raise ArgumentError.new("'#{name}' does not contain valid date and/or title") unless all
|
||||
@slug = path ? path + slug : slug
|
||||
@date = Time.parse(date)
|
||||
@name = name
|
||||
all, @path, @date, @slug = *name.sub(/^\//, "").match(MATCHER)
|
||||
raise ArgumentError.new("'#{name}' does not contain valid date and/or title.") unless all
|
||||
|
||||
@name_regex = /^#{path}#{date}-#{slug}\.[^.]+/
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
other.name.match(@name_regex)
|
||||
end
|
||||
|
||||
def deprecated_equality(other)
|
||||
date = Utils.parse_date(name, "'#{name}' does not contain valid date and/or title.")
|
||||
slug == post_slug(other) &&
|
||||
date.year == other.date.year &&
|
||||
date.month == other.date.month &&
|
||||
@@ -59,6 +65,19 @@ eos
|
||||
end
|
||||
end
|
||||
|
||||
# New matching method did not match, fall back to old method
|
||||
# with deprecation warning if this matches
|
||||
|
||||
site.posts.each do |p|
|
||||
if @post.deprecated_equality p
|
||||
Jekyll::Deprecator.deprecation_message "A call to '{{ post_url #{name} }}' did not match " +
|
||||
"a post using the new matching method of checking name " +
|
||||
"(path-date-slug) equality. Please make sure that you " +
|
||||
"change this tag to match the post's name exactly."
|
||||
return p.url
|
||||
end
|
||||
end
|
||||
|
||||
raise ArgumentError.new <<-eos
|
||||
Could not find post "#{@orig_post}" in tag 'post_url'.
|
||||
|
||||
|
||||
@@ -37,33 +37,46 @@ module Jekyll
|
||||
#
|
||||
# Returns the String URL
|
||||
def to_s
|
||||
sanitize_url(@permalink || generate_url)
|
||||
sanitize_url(generated_permalink || generated_url)
|
||||
end
|
||||
|
||||
# Generates a URL from the permalink
|
||||
#
|
||||
# Returns the _unsanitized String URL
|
||||
def generated_permalink
|
||||
(@generated_permlink ||= generate_url(@permalink)) if @permalink
|
||||
end
|
||||
|
||||
# Generates a URL from the template
|
||||
#
|
||||
# Returns the _unsanitized String URL
|
||||
def generated_url
|
||||
@generated_url ||= generate_url(@template)
|
||||
end
|
||||
|
||||
# Internal: Generate the URL by replacing all placeholders with their
|
||||
# respective values
|
||||
# respective values in the given template
|
||||
#
|
||||
# Returns the _unsanitizied_ String URL
|
||||
def generate_url
|
||||
@placeholders.inject(@template) do |result, token|
|
||||
def generate_url(template)
|
||||
@placeholders.inject(template) do |result, token|
|
||||
break result if result.index(':').nil?
|
||||
result.gsub(/:#{token.first}/, self.class.escape_path(token.last))
|
||||
end
|
||||
end
|
||||
|
||||
# Returns a sanitized String URL
|
||||
def sanitize_url(in_url)
|
||||
|
||||
# Remove all double slashes
|
||||
url = in_url.gsub(/\/\//, "/")
|
||||
|
||||
# Remove every URL segment that consists solely of dots
|
||||
url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
|
||||
url = in_url \
|
||||
# Remove all double slashes
|
||||
.gsub(/\/\//, '/') \
|
||||
# Remove every URL segment that consists solely of dots
|
||||
.split('/').reject{ |part| part =~ /^\.+$/ }.join('/') \
|
||||
# Always add a leading slash
|
||||
.gsub(/\A([^\/])/, '/\1')
|
||||
|
||||
# Append a trailing slash to the URL if the unsanitized URL had one
|
||||
url += "/" if in_url =~ /\/$/
|
||||
|
||||
# Always add a leading slash
|
||||
url.gsub!(/\A([^\/])/, '/\1')
|
||||
url << "/" if in_url[-1].eql?('/')
|
||||
|
||||
url
|
||||
end
|
||||
@@ -79,7 +92,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the escaped path.
|
||||
def self.escape_path(path)
|
||||
# Because URI.escape doesn't escape '?', '[' and ']' by defaut,
|
||||
# Because URI.escape doesn't escape '?', '[' and ']' by default,
|
||||
# specify unsafe string (except unreserved, sub-delims, ":", "@" and "/").
|
||||
#
|
||||
# URI path segment is defined in RFC 3986 as follows:
|
||||
@@ -89,7 +102,7 @@ module Jekyll
|
||||
# pct-encoded = "%" HEXDIG HEXDIG
|
||||
# sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||||
# / "*" / "+" / "," / ";" / "="
|
||||
URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/)
|
||||
URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/).encode('utf-8')
|
||||
end
|
||||
|
||||
# Unescapes a URL path segment
|
||||
@@ -103,7 +116,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the unescaped path.
|
||||
def self.unescape_path(path)
|
||||
URI.unescape(path)
|
||||
URI.unescape(path.encode('utf-8'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,79 +1,125 @@
|
||||
module Jekyll
|
||||
module Utils
|
||||
class << self
|
||||
extend self
|
||||
|
||||
# Merges a master hash with another hash, recursively.
|
||||
#
|
||||
# master_hash - the "parent" hash whose values will be overridden
|
||||
# other_hash - the other hash whose values will be persisted after the merge
|
||||
#
|
||||
# This code was lovingly stolen from some random gem:
|
||||
# http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
|
||||
#
|
||||
# Thanks to whoever made it.
|
||||
def deep_merge_hashes(master_hash, other_hash)
|
||||
target = master_hash.dup
|
||||
# Merges a master hash with another hash, recursively.
|
||||
#
|
||||
# master_hash - the "parent" hash whose values will be overridden
|
||||
# other_hash - the other hash whose values will be persisted after the merge
|
||||
#
|
||||
# This code was lovingly stolen from some random gem:
|
||||
# http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
|
||||
#
|
||||
# Thanks to whoever made it.
|
||||
def deep_merge_hashes(master_hash, other_hash)
|
||||
target = master_hash.dup
|
||||
|
||||
other_hash.keys.each do |key|
|
||||
if other_hash[key].is_a? Hash and target[key].is_a? Hash
|
||||
target[key] = Utils.deep_merge_hashes(target[key], other_hash[key])
|
||||
next
|
||||
end
|
||||
|
||||
target[key] = other_hash[key]
|
||||
other_hash.each_key do |key|
|
||||
if other_hash[key].is_a? Hash and target[key].is_a? Hash
|
||||
target[key] = Utils.deep_merge_hashes(target[key], other_hash[key])
|
||||
next
|
||||
end
|
||||
|
||||
target
|
||||
end
|
||||
|
||||
# Read array from the supplied hash favouring the singular key
|
||||
# and then the plural key, and handling any nil entries.
|
||||
#
|
||||
# hash - the hash to read from
|
||||
# singular_key - the singular key
|
||||
# plural_key - the plural key
|
||||
#
|
||||
# Returns an array
|
||||
def pluralized_array_from_hash(hash, singular_key, plural_key)
|
||||
if hash.has_key?(singular_key)
|
||||
array = [hash[singular_key]] if hash[singular_key]
|
||||
elsif hash.has_key?(plural_key)
|
||||
case hash[plural_key]
|
||||
when String
|
||||
array = hash[plural_key].split
|
||||
when Array
|
||||
array = hash[plural_key].compact
|
||||
end
|
||||
end
|
||||
array || []
|
||||
end
|
||||
|
||||
def transform_keys(hash)
|
||||
result = {}
|
||||
hash.each_key do |key|
|
||||
result[yield(key)] = hash[key]
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
# Apply #to_sym to all keys in the hash
|
||||
#
|
||||
# hash - the hash to which to apply this transformation
|
||||
#
|
||||
# Returns a new hash with symbolized keys
|
||||
def symbolize_hash_keys(hash)
|
||||
transform_keys(hash) { |key| key.to_sym rescue key }
|
||||
end
|
||||
|
||||
# Apply #to_s to all keys in the Hash
|
||||
#
|
||||
# hash - the hash to which to apply this transformation
|
||||
#
|
||||
# Returns a new hash with stringified keys
|
||||
def stringify_hash_keys(hash)
|
||||
transform_keys(hash) { |key| key.to_s rescue key }
|
||||
target[key] = other_hash[key]
|
||||
end
|
||||
|
||||
target
|
||||
end
|
||||
|
||||
# Read array from the supplied hash favouring the singular key
|
||||
# and then the plural key, and handling any nil entries.
|
||||
#
|
||||
# hash - the hash to read from
|
||||
# singular_key - the singular key
|
||||
# plural_key - the plural key
|
||||
#
|
||||
# Returns an array
|
||||
def pluralized_array_from_hash(hash, singular_key, plural_key)
|
||||
[].tap do |array|
|
||||
array << (value_from_singular_key(hash, singular_key) || value_from_plural_key(hash, plural_key))
|
||||
end.flatten.compact
|
||||
end
|
||||
|
||||
def value_from_singular_key(hash, key)
|
||||
hash[key] if (hash.key?(key) || (hash.default_proc && hash[key]))
|
||||
end
|
||||
|
||||
def value_from_plural_key(hash, key)
|
||||
if hash.key?(key) || (hash.default_proc && hash[key])
|
||||
val = hash[key]
|
||||
case val
|
||||
when String
|
||||
val.split
|
||||
when Array
|
||||
val.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def transform_keys(hash)
|
||||
result = {}
|
||||
hash.each_key do |key|
|
||||
result[yield(key)] = hash[key]
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
# Apply #to_sym to all keys in the hash
|
||||
#
|
||||
# hash - the hash to which to apply this transformation
|
||||
#
|
||||
# Returns a new hash with symbolized keys
|
||||
def symbolize_hash_keys(hash)
|
||||
transform_keys(hash) { |key| key.to_sym rescue key }
|
||||
end
|
||||
|
||||
# Apply #to_s to all keys in the Hash
|
||||
#
|
||||
# hash - the hash to which to apply this transformation
|
||||
#
|
||||
# Returns a new hash with stringified keys
|
||||
def stringify_hash_keys(hash)
|
||||
transform_keys(hash) { |key| key.to_s rescue key }
|
||||
end
|
||||
|
||||
# Parse a date/time and throw an error if invalid
|
||||
#
|
||||
# input - the date/time to parse
|
||||
# msg - (optional) the error message to show the user
|
||||
#
|
||||
# Returns the parsed date if successful, throws a FatalException
|
||||
# if not
|
||||
def parse_date(input, msg = "Input could not be parsed.")
|
||||
Time.parse(input).localtime
|
||||
rescue ArgumentError
|
||||
raise Errors::FatalException.new("Invalid date '#{input}': " + msg)
|
||||
end
|
||||
|
||||
# Determines whether a given file has
|
||||
#
|
||||
# Returns true if the YAML front matter is present.
|
||||
def has_yaml_header?(file)
|
||||
!!(File.open(file, 'rb') { |f| f.read(5) } =~ /\A---\r?\n/)
|
||||
end
|
||||
|
||||
# Slugify a filename or title.
|
||||
#
|
||||
# name - the filename or title to slugify
|
||||
#
|
||||
# Returns the given filename or title in lowercase, with every
|
||||
# sequence of spaces and non-alphanumeric characters replaced with a
|
||||
# hyphen.
|
||||
def slugify(string)
|
||||
unless string.nil?
|
||||
string \
|
||||
# Replace each non-alphanumeric character sequence with a hyphen
|
||||
.gsub(/[^[:alnum:]]+/i, '-') \
|
||||
# Remove leading/trailing hyphen
|
||||
.gsub(/^\-|\-$/i, '') \
|
||||
# Downcase it
|
||||
.downcase
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Jekyll
|
||||
VERSION = '2.0.2'
|
||||
VERSION = '2.5.3'
|
||||
end
|
||||
|
||||
3
lib/site_template/.gitignore
vendored
3
lib/site_template/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
_site
|
||||
_site
|
||||
.sass-cache
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
# Site settings
|
||||
name: Dat site title tho
|
||||
title: Your awesome title
|
||||
email: your-email@domain.com
|
||||
description: "Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description."
|
||||
baseurl: ""
|
||||
url: "http://yourdomain.com"
|
||||
description: > # this means to ignore newlines until "baseurl:"
|
||||
Write an awesome description for your new site here. You can edit this
|
||||
line in _config.yml. It will appear in your document head meta (for
|
||||
Google search results) and in your feed.xml site description.
|
||||
baseurl: "" # the subpath of your site, e.g. /blog/
|
||||
url: "http://yourdomain.com" # the base hostname & protocol for your site
|
||||
twitter_username: jekyllrb
|
||||
github_username: jekyll
|
||||
|
||||
# Build settings
|
||||
markdown: kramdown
|
||||
permalinks: pretty
|
||||
|
||||
@@ -1,59 +1,53 @@
|
||||
<footer class="site-footer">
|
||||
|
||||
<div class="wrap">
|
||||
<div class="wrapper">
|
||||
|
||||
<h2 class="footer-heading">{{ site.name }}</h2>
|
||||
<h2 class="footer-heading">{{ site.title }}</h2>
|
||||
|
||||
<div class="footer-col-1 column">
|
||||
<ul>
|
||||
<li>{{ site.title }}</li>
|
||||
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-col-wrapper">
|
||||
<div class="footer-col footer-col-1">
|
||||
<ul class="contact-list">
|
||||
<li>{{ site.title }}</li>
|
||||
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer-col-2 column">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://github.com/{{ site.username }}">
|
||||
<span class="icon github">
|
||||
<svg version="1.1" class="github-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C2C2C2" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761
|
||||
c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32
|
||||
c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472
|
||||
c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037
|
||||
C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65
|
||||
c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261
|
||||
c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082
|
||||
c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129
|
||||
c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="username">{{ site.username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/{{ site.username }}">
|
||||
<span class="icon twitter">
|
||||
<svg version="1.1" class="twitter-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
|
||||
<path fill="#C2C2C2" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
|
||||
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27
|
||||
c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767
|
||||
c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206
|
||||
C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271
|
||||
c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469
|
||||
c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="username">{{ site.username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-col footer-col-2">
|
||||
<ul class="social-media-list">
|
||||
{% if site.github_username %}
|
||||
<li>
|
||||
<a href="https://github.com/{{ site.github_username }}">
|
||||
<span class="icon icon--github">
|
||||
<svg viewBox="0 0 16 16">
|
||||
<path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
<div class="footer-col-3 column">
|
||||
<p class="text">{{ site.description }}</p>
|
||||
<span class="username">{{ site.github_username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if site.twitter_username %}
|
||||
<li>
|
||||
<a href="https://twitter.com/{{ site.twitter_username }}">
|
||||
<span class="icon icon--twitter">
|
||||
<svg viewBox="0 0 16 16">
|
||||
<path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
|
||||
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
<span class="username">{{ site.twitter_username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer-col footer-col-3">
|
||||
<p class="text">{{ site.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.name }}{% endif %}</title>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="description" content="{{ site.description }}">
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl }}">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
||||
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
|
||||
</head>
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
<header class="site-header">
|
||||
|
||||
<div class="wrap">
|
||||
<div class="wrapper">
|
||||
|
||||
<a class="site-title" href="{{ site.baseurl }}">{{ site.name }}</a>
|
||||
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
||||
|
||||
<nav class="site-nav">
|
||||
<a href="#" class="menu-icon">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 18 15" enable-background="new 0 0 18 15" xml:space="preserve">
|
||||
<path fill="#505050" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0
|
||||
h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
|
||||
<path fill="#505050" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484
|
||||
h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
|
||||
<path fill="#505050" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0
|
||||
c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
|
||||
<svg viewBox="0 0 18 15">
|
||||
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
|
||||
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
|
||||
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<div class="trigger">
|
||||
{% for page in site.pages %}
|
||||
{% if page.title %}
|
||||
<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
<body>
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
<div class="page-content">
|
||||
<div class="wrap">
|
||||
{{ content }}
|
||||
<div class="wrapper">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include footer.html %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
<div class="post">
|
||||
<article class="post">
|
||||
|
||||
<header class="post-header">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<h1 class="post-title">{{ page.title }}</h1>
|
||||
</header>
|
||||
|
||||
<article class="post-content">
|
||||
{{ content }}
|
||||
</article>
|
||||
<div class="post-content">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
<div class="post">
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
|
||||
<header class="post-header">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p class="meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
|
||||
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
|
||||
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
|
||||
</header>
|
||||
|
||||
<article class="post-content">
|
||||
{{ content }}
|
||||
</article>
|
||||
<div class="post-content" itemprop="articleBody">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -4,9 +4,9 @@ title: "Welcome to Jekyll!"
|
||||
date: <%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>
|
||||
categories: jekyll update
|
||||
---
|
||||
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
|
||||
|
||||
You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!
|
||||
To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.
|
||||
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
|
||||
|
||||
Jekyll also offers powerful support for code snippets:
|
||||
|
||||
@@ -18,7 +18,8 @@ print_hi('Tom')
|
||||
#=> prints 'Hi, Tom' to STDOUT.
|
||||
{% endhighlight %}
|
||||
|
||||
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].
|
||||
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll’s dedicated Help repository][jekyll-help].
|
||||
|
||||
[jekyll-gh]: https://github.com/jekyll/jekyll
|
||||
[jekyll]: http://jekyllrb.com
|
||||
[jekyll]: http://jekyllrb.com
|
||||
[jekyll-gh]: https://github.com/jekyll/jekyll
|
||||
[jekyll-help]: https://github.com/jekyll/jekyll-help
|
||||
|
||||
204
lib/site_template/_sass/_base.scss
Normal file
204
lib/site_template/_sass/_base.scss
Normal file
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* Reset some basic elements
|
||||
*/
|
||||
body, h1, h2, h3, h4, h5, h6,
|
||||
p, blockquote, pre, hr,
|
||||
dl, dd, ol, ul, figure {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Basic styling
|
||||
*/
|
||||
body {
|
||||
font-family: $base-font-family;
|
||||
font-size: $base-font-size;
|
||||
line-height: $base-line-height;
|
||||
font-weight: 300;
|
||||
color: $text-color;
|
||||
background-color: $background-color;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set `margin-bottom` to maintain vertical rhythm
|
||||
*/
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
p, blockquote, pre,
|
||||
ul, ol, dl, figure,
|
||||
%vertical-rhythm {
|
||||
margin-bottom: $spacing-unit / 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Images
|
||||
*/
|
||||
img {
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Figures
|
||||
*/
|
||||
figure > img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font-size: $small-font-size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Lists
|
||||
*/
|
||||
ul, ol {
|
||||
margin-left: $spacing-unit;
|
||||
}
|
||||
|
||||
li {
|
||||
> ul,
|
||||
> ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Headings
|
||||
*/
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Links
|
||||
*/
|
||||
a {
|
||||
color: $brand-color;
|
||||
text-decoration: none;
|
||||
|
||||
&:visited {
|
||||
color: darken($brand-color, 15%);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $text-color;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Blockquotes
|
||||
*/
|
||||
blockquote {
|
||||
color: $grey-color;
|
||||
border-left: 4px solid $grey-color-light;
|
||||
padding-left: $spacing-unit / 2;
|
||||
font-size: 18px;
|
||||
letter-spacing: -1px;
|
||||
font-style: italic;
|
||||
|
||||
> :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Code formatting
|
||||
*/
|
||||
pre,
|
||||
code {
|
||||
font-size: 15px;
|
||||
border: 1px solid $grey-color-light;
|
||||
border-radius: 3px;
|
||||
background-color: #eef;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 8px 12px;
|
||||
overflow-x: scroll;
|
||||
|
||||
> code {
|
||||
border: 0;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper
|
||||
*/
|
||||
.wrapper {
|
||||
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
|
||||
max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
padding-right: $spacing-unit;
|
||||
padding-left: $spacing-unit;
|
||||
@extend %clearfix;
|
||||
|
||||
@include media-query($on-laptop) {
|
||||
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
|
||||
max-width: calc(#{$content-width} - (#{$spacing-unit}));
|
||||
padding-right: $spacing-unit / 2;
|
||||
padding-left: $spacing-unit / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Clearfix
|
||||
*/
|
||||
%clearfix {
|
||||
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
.icon {
|
||||
|
||||
> svg {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
|
||||
path {
|
||||
fill: $grey-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
236
lib/site_template/_sass/_layout.scss
Normal file
236
lib/site_template/_sass/_layout.scss
Normal file
@@ -0,0 +1,236 @@
|
||||
/**
|
||||
* Site header
|
||||
*/
|
||||
.site-header {
|
||||
border-top: 5px solid $grey-color-dark;
|
||||
border-bottom: 1px solid $grey-color-light;
|
||||
min-height: 56px;
|
||||
|
||||
// Positioning context for the mobile navigation icon
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 26px;
|
||||
line-height: 56px;
|
||||
letter-spacing: -1px;
|
||||
margin-bottom: 0;
|
||||
float: left;
|
||||
|
||||
&,
|
||||
&:visited {
|
||||
color: $grey-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.site-nav {
|
||||
float: right;
|
||||
line-height: 56px;
|
||||
|
||||
.menu-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
color: $text-color;
|
||||
line-height: $base-line-height;
|
||||
|
||||
// Gaps between nav items, but not on the last one
|
||||
&:not(:last-child) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-query($on-palm) {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 30px;
|
||||
background-color: $background-color;
|
||||
border: 1px solid $grey-color-light;
|
||||
border-radius: 5px;
|
||||
text-align: right;
|
||||
|
||||
.menu-icon {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 36px;
|
||||
height: 26px;
|
||||
line-height: 0;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
|
||||
> svg {
|
||||
width: 18px;
|
||||
height: 15px;
|
||||
|
||||
path {
|
||||
fill: $grey-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.trigger {
|
||||
clear: both;
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover .trigger {
|
||||
display: block;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
display: block;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Site footer
|
||||
*/
|
||||
.site-footer {
|
||||
border-top: 1px solid $grey-color-light;
|
||||
padding: $spacing-unit 0;
|
||||
}
|
||||
|
||||
.footer-heading {
|
||||
font-size: 18px;
|
||||
margin-bottom: $spacing-unit / 2;
|
||||
}
|
||||
|
||||
.contact-list,
|
||||
.social-media-list {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.footer-col-wrapper {
|
||||
font-size: 15px;
|
||||
color: $grey-color;
|
||||
margin-left: -$spacing-unit / 2;
|
||||
@extend %clearfix;
|
||||
}
|
||||
|
||||
.footer-col {
|
||||
float: left;
|
||||
margin-bottom: $spacing-unit / 2;
|
||||
padding-left: $spacing-unit / 2;
|
||||
}
|
||||
|
||||
.footer-col-1 {
|
||||
width: -webkit-calc(35% - (#{$spacing-unit} / 2));
|
||||
width: calc(35% - (#{$spacing-unit} / 2));
|
||||
}
|
||||
|
||||
.footer-col-2 {
|
||||
width: -webkit-calc(20% - (#{$spacing-unit} / 2));
|
||||
width: calc(20% - (#{$spacing-unit} / 2));
|
||||
}
|
||||
|
||||
.footer-col-3 {
|
||||
width: -webkit-calc(45% - (#{$spacing-unit} / 2));
|
||||
width: calc(45% - (#{$spacing-unit} / 2));
|
||||
}
|
||||
|
||||
@include media-query($on-laptop) {
|
||||
.footer-col-1,
|
||||
.footer-col-2 {
|
||||
width: -webkit-calc(50% - (#{$spacing-unit} / 2));
|
||||
width: calc(50% - (#{$spacing-unit} / 2));
|
||||
}
|
||||
|
||||
.footer-col-3 {
|
||||
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
|
||||
width: calc(100% - (#{$spacing-unit} / 2));
|
||||
}
|
||||
}
|
||||
|
||||
@include media-query($on-palm) {
|
||||
.footer-col {
|
||||
float: none;
|
||||
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
|
||||
width: calc(100% - (#{$spacing-unit} / 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Page content
|
||||
*/
|
||||
.page-content {
|
||||
padding: $spacing-unit 0;
|
||||
}
|
||||
|
||||
.page-heading {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.post-list {
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
|
||||
> li {
|
||||
margin-bottom: $spacing-unit;
|
||||
}
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
font-size: $small-font-size;
|
||||
color: $grey-color;
|
||||
}
|
||||
|
||||
.post-link {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Posts
|
||||
*/
|
||||
.post-header {
|
||||
margin-bottom: $spacing-unit;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
font-size: 42px;
|
||||
letter-spacing: -1px;
|
||||
line-height: 1;
|
||||
|
||||
@include media-query($on-laptop) {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.post-content {
|
||||
margin-bottom: $spacing-unit;
|
||||
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
|
||||
@include media-query($on-laptop) {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 26px;
|
||||
|
||||
@include media-query($on-laptop) {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 20px;
|
||||
|
||||
@include media-query($on-laptop) {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
67
lib/site_template/_sass/_syntax-highlighting.scss
Normal file
67
lib/site_template/_sass/_syntax-highlighting.scss
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Syntax highlighting styles
|
||||
*/
|
||||
.highlight {
|
||||
background: #fff;
|
||||
@extend %vertical-rhythm;
|
||||
|
||||
.c { color: #998; font-style: italic } // Comment
|
||||
.err { color: #a61717; background-color: #e3d2d2 } // Error
|
||||
.k { font-weight: bold } // Keyword
|
||||
.o { font-weight: bold } // Operator
|
||||
.cm { color: #998; font-style: italic } // Comment.Multiline
|
||||
.cp { color: #999; font-weight: bold } // Comment.Preproc
|
||||
.c1 { color: #998; font-style: italic } // Comment.Single
|
||||
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
|
||||
.gd { color: #000; background-color: #fdd } // Generic.Deleted
|
||||
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
|
||||
.ge { font-style: italic } // Generic.Emph
|
||||
.gr { color: #a00 } // Generic.Error
|
||||
.gh { color: #999 } // Generic.Heading
|
||||
.gi { color: #000; background-color: #dfd } // Generic.Inserted
|
||||
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
|
||||
.go { color: #888 } // Generic.Output
|
||||
.gp { color: #555 } // Generic.Prompt
|
||||
.gs { font-weight: bold } // Generic.Strong
|
||||
.gu { color: #aaa } // Generic.Subheading
|
||||
.gt { color: #a00 } // Generic.Traceback
|
||||
.kc { font-weight: bold } // Keyword.Constant
|
||||
.kd { font-weight: bold } // Keyword.Declaration
|
||||
.kp { font-weight: bold } // Keyword.Pseudo
|
||||
.kr { font-weight: bold } // Keyword.Reserved
|
||||
.kt { color: #458; font-weight: bold } // Keyword.Type
|
||||
.m { color: #099 } // Literal.Number
|
||||
.s { color: #d14 } // Literal.String
|
||||
.na { color: #008080 } // Name.Attribute
|
||||
.nb { color: #0086B3 } // Name.Builtin
|
||||
.nc { color: #458; font-weight: bold } // Name.Class
|
||||
.no { color: #008080 } // Name.Constant
|
||||
.ni { color: #800080 } // Name.Entity
|
||||
.ne { color: #900; font-weight: bold } // Name.Exception
|
||||
.nf { color: #900; font-weight: bold } // Name.Function
|
||||
.nn { color: #555 } // Name.Namespace
|
||||
.nt { color: #000080 } // Name.Tag
|
||||
.nv { color: #008080 } // Name.Variable
|
||||
.ow { font-weight: bold } // Operator.Word
|
||||
.w { color: #bbb } // Text.Whitespace
|
||||
.mf { color: #099 } // Literal.Number.Float
|
||||
.mh { color: #099 } // Literal.Number.Hex
|
||||
.mi { color: #099 } // Literal.Number.Integer
|
||||
.mo { color: #099 } // Literal.Number.Oct
|
||||
.sb { color: #d14 } // Literal.String.Backtick
|
||||
.sc { color: #d14 } // Literal.String.Char
|
||||
.sd { color: #d14 } // Literal.String.Doc
|
||||
.s2 { color: #d14 } // Literal.String.Double
|
||||
.se { color: #d14 } // Literal.String.Escape
|
||||
.sh { color: #d14 } // Literal.String.Heredoc
|
||||
.si { color: #d14 } // Literal.String.Interpol
|
||||
.sx { color: #d14 } // Literal.String.Other
|
||||
.sr { color: #009926 } // Literal.String.Regex
|
||||
.s1 { color: #d14 } // Literal.String.Single
|
||||
.ss { color: #990073 } // Literal.String.Symbol
|
||||
.bp { color: #999 } // Name.Builtin.Pseudo
|
||||
.vc { color: #008080 } // Name.Variable.Class
|
||||
.vg { color: #008080 } // Name.Variable.Global
|
||||
.vi { color: #008080 } // Name.Variable.Instance
|
||||
.il { color: #099 } // Literal.Number.Integer.Long
|
||||
}
|
||||
@@ -1,405 +0,0 @@
|
||||
/* Base */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body { height: 100%; }
|
||||
|
||||
body {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
font-weight: 300;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 400; }
|
||||
|
||||
a { color: #2a7ae2; text-decoration: none; }
|
||||
a:hover { color: #000; text-decoration: underline; }
|
||||
a:visited { color: #205caa; }
|
||||
|
||||
/* Utility */
|
||||
|
||||
.wrap:before,
|
||||
.wrap:after { content:""; display:table; }
|
||||
.wrap:after { clear: both; }
|
||||
.wrap {
|
||||
max-width: 800px;
|
||||
padding: 0 30px;
|
||||
margin: 0 auto;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
|
||||
/* Layout Styles */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
/* Site header */
|
||||
|
||||
.site-header {
|
||||
border-top: 5px solid #333;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
min-height: 56px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.site-title,
|
||||
.site-title:hover,
|
||||
.site-title:visited {
|
||||
display: block;
|
||||
color: #333;
|
||||
font-size: 26px;
|
||||
letter-spacing: -1px;
|
||||
float: left;
|
||||
line-height: 56px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.site-nav {
|
||||
float: right;
|
||||
line-height: 56px;
|
||||
}
|
||||
|
||||
.site-nav .menu-icon { display: none; }
|
||||
|
||||
.site-nav .page-link {
|
||||
margin-left: 20px;
|
||||
color: #727272;
|
||||
letter-spacing: -.5px;
|
||||
}
|
||||
|
||||
/* Site footer */
|
||||
|
||||
.site-footer {
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.footer-heading {
|
||||
font-size: 18px;
|
||||
font-weight: 300;
|
||||
letter-spacing: -.5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.site-footer .column { float: left; margin-bottom: 15px; }
|
||||
|
||||
.footer-col-1 {
|
||||
width: 270px; /*fallback*/
|
||||
width: -webkit-calc(35% - 10px);
|
||||
width: -moz-calc(35% - 10px);
|
||||
width: -o-calc(35% - 10px);
|
||||
width: calc(35% - 10px);
|
||||
margin-right: 10px
|
||||
}
|
||||
.footer-col-2 {
|
||||
width: 175px; /*fallback*/
|
||||
width: -webkit-calc(23.125% - 10px);
|
||||
width: -moz-calc(23.125% - 10px);
|
||||
width: -o-calc(23.125% - 10px);
|
||||
width: calc(23.125% - 10px);
|
||||
margin-right: 10px
|
||||
}
|
||||
.footer-col-3 {
|
||||
width: 335px; /*fallback*/
|
||||
width: -webkit-calc(41.875%);
|
||||
width: -moz-calc(41.875%);
|
||||
width: -o-calc(41.875%);
|
||||
width: calc(41.875%);
|
||||
}
|
||||
|
||||
.site-footer ul { list-style: none; }
|
||||
|
||||
.site-footer li,
|
||||
.site-footer p {
|
||||
font-size: 15px;
|
||||
letter-spacing: -.3px;
|
||||
color: #828282;
|
||||
}
|
||||
|
||||
.github-icon-svg,
|
||||
.twitter-icon-svg {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* Page Content styles */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
.page-content {
|
||||
padding: 30px 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* Home styles */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
.home h1 { margin-bottom: 25px; }
|
||||
|
||||
.posts { list-style-type: none; }
|
||||
|
||||
.posts li { margin-bottom: 30px; }
|
||||
|
||||
.posts .post-link {
|
||||
font-size: 24px;
|
||||
letter-spacing: -1px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.posts .post-date {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
|
||||
/* Post styles */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
.post-header { margin: 10px 0 30px; }
|
||||
|
||||
.post-header h1 {
|
||||
font-size: 42px;
|
||||
letter-spacing: -1.75px;
|
||||
line-height: 1;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.post-header .meta {
|
||||
font-size: 15px;
|
||||
color: #818181;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.post-content { margin: 0 0 30px; }
|
||||
|
||||
.post-content > * { margin: 20px 0; }
|
||||
|
||||
|
||||
.post-content h1,
|
||||
.post-content h2,
|
||||
.post-content h3,
|
||||
.post-content h4,
|
||||
.post-content h5,
|
||||
.post-content h6 {
|
||||
line-height: 1;
|
||||
font-weight: 300;
|
||||
margin: 40px 0 20px;
|
||||
}
|
||||
|
||||
.post-content h2 {
|
||||
font-size: 32px;
|
||||
letter-spacing: -1.25px;
|
||||
}
|
||||
|
||||
.post-content h3 {
|
||||
font-size: 26px;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
.post-content h4 {
|
||||
font-size: 20px;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
.post-content blockquote {
|
||||
border-left: 4px solid #e8e8e8;
|
||||
padding-left: 20px;
|
||||
font-size: 18px;
|
||||
opacity: .6;
|
||||
letter-spacing: -1px;
|
||||
font-style: italic;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.post-content ul,
|
||||
.post-content ol { padding-left: 20px; }
|
||||
|
||||
.post pre,
|
||||
.post code {
|
||||
border: 1px solid #d5d5e9;
|
||||
background-color: #eef;
|
||||
padding: 8px 12px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.post code { padding: 1px 5px; }
|
||||
|
||||
.post ul,
|
||||
.post ol { margin-left: 1.35em; }
|
||||
|
||||
.post pre code { border: none; }
|
||||
|
||||
/* terminal */
|
||||
.post pre.terminal {
|
||||
border: 1px solid #000;
|
||||
background-color: #333;
|
||||
color: #FFF;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.post pre.terminal code { background-color: #333; }
|
||||
|
||||
/* Syntax highlighting styles */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
.highlight { background: #ffffff; }
|
||||
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||
.highlight .k { font-weight: bold } /* Keyword */
|
||||
.highlight .o { font-weight: bold } /* Operator */
|
||||
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
||||
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #999999 } /* Generic.Heading */
|
||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
||||
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
||||
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .m { color: #009999 } /* Literal.Number */
|
||||
.highlight .s { color: #d14 } /* Literal.String */
|
||||
.highlight .na { color: #008080 } /* Name.Attribute */
|
||||
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
||||
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #008080 } /* Name.Constant */
|
||||
.highlight .ni { color: #800080 } /* Name.Entity */
|
||||
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
||||
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
||||
.highlight .nn { color: #555555 } /* Name.Namespace */
|
||||
.highlight .nt { color: #000080 } /* Name.Tag */
|
||||
.highlight .nv { color: #008080 } /* Name.Variable */
|
||||
.highlight .ow { font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
||||
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
||||
|
||||
|
||||
/* media queries */
|
||||
/* ----------------------------------------------------------*/
|
||||
|
||||
|
||||
@media screen and (max-width: 750px) {
|
||||
|
||||
.footer-col-1 { width: 50%; }
|
||||
|
||||
.footer-col-2 {
|
||||
width: 45%; /*fallback*/
|
||||
width: -webkit-calc(50% - 10px);
|
||||
width: -moz-calc(50% - 10px);
|
||||
width: -o-calc(50% - 10px);
|
||||
width: calc(50% - 10px);
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.site-footer .column.footer-col-3 {
|
||||
width: auto;
|
||||
float: none;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
|
||||
.wrap { padding: 0 12px; }
|
||||
|
||||
.site-nav {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
top: 14px; right: 8px;
|
||||
background-color: white;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.site-nav .menu-icon {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
color: #505050;
|
||||
float: right;
|
||||
width: 36px;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.site-nav .menu-icon svg { width: 18px; height: 16px; }
|
||||
|
||||
.site-nav .trigger {
|
||||
clear: both;
|
||||
margin-bottom: 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-nav:hover .trigger { display: block; }
|
||||
|
||||
.site-nav .page-link {
|
||||
display: block;
|
||||
text-align: right;
|
||||
line-height: 1.25;
|
||||
padding: 5px 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.post-header h1 { font-size: 36px; }
|
||||
.post-content h2 { font-size: 28px; }
|
||||
.post-content h3 { font-size: 22px; }
|
||||
.post-content h4 { font-size: 18px; }
|
||||
.post-content blockquote { padding-left: 10px; }
|
||||
.post-content ul,
|
||||
.post-content ol { padding-left: 10px; }
|
||||
|
||||
.site-footer .column {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: auto;
|
||||
margin: 0 0 15px; }
|
||||
|
||||
}
|
||||
52
lib/site_template/css/main.scss
Executable file
52
lib/site_template/css/main.scss
Executable file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
# Only the main Sass file needs front matter (the dashes are enough)
|
||||
---
|
||||
@charset "utf-8";
|
||||
|
||||
|
||||
|
||||
// Our variables
|
||||
$base-font-family: Helvetica, Arial, sans-serif;
|
||||
$base-font-size: 16px;
|
||||
$small-font-size: $base-font-size * 0.875;
|
||||
$base-line-height: 1.5;
|
||||
|
||||
$spacing-unit: 30px;
|
||||
|
||||
$text-color: #111;
|
||||
$background-color: #fdfdfd;
|
||||
$brand-color: #2a7ae2;
|
||||
|
||||
$grey-color: #828282;
|
||||
$grey-color-light: lighten($grey-color, 40%);
|
||||
$grey-color-dark: darken($grey-color, 25%);
|
||||
|
||||
// Width of the content area
|
||||
$content-width: 800px;
|
||||
|
||||
$on-palm: 600px;
|
||||
$on-laptop: 800px;
|
||||
|
||||
|
||||
|
||||
// Using media queries with like this:
|
||||
// @include media-query($on-palm) {
|
||||
// .wrapper {
|
||||
// padding-right: $spacing-unit / 2;
|
||||
// padding-left: $spacing-unit / 2;
|
||||
// }
|
||||
// }
|
||||
@mixin media-query($device) {
|
||||
@media screen and (max-width: $device) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Import partials from `sass_dir` (defaults to `_sass`)
|
||||
@import
|
||||
"base",
|
||||
"layout",
|
||||
"syntax-highlighting"
|
||||
;
|
||||
@@ -1,20 +1,29 @@
|
||||
---
|
||||
layout: none
|
||||
layout: null
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ site.name | xml_escape }}</title>
|
||||
<title>{{ site.title | xml_escape }}</title>
|
||||
<description>{{ site.description | xml_escape }}</description>
|
||||
<link>{{ site.baseurl }}</link>
|
||||
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl }}" rel="self" type="application/rss+xml" />
|
||||
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
||||
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
|
||||
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
||||
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
||||
<generator>Jekyll v{{ jekyll.version }}</generator>
|
||||
{% for post in site.posts limit:10 %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
<description>{{ post.content | xml_escape }}</description>
|
||||
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
||||
<link>{{ post.url | prepend: site.baseurl }}</link>
|
||||
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl }}</guid>
|
||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
||||
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
||||
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
||||
{% for tag in post.tags %}
|
||||
<category>{{ tag | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
{% for cat in post.categories %}
|
||||
<category>{{ cat | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
|
||||
@@ -4,13 +4,16 @@ layout: default
|
||||
|
||||
<div class="home">
|
||||
|
||||
<h1>Posts</h1>
|
||||
<h1 class="page-heading">Posts</h1>
|
||||
|
||||
<ul class="posts">
|
||||
<ul class="post-list">
|
||||
{% for post in site.posts %}
|
||||
<li>
|
||||
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
|
||||
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
||||
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
|
||||
|
||||
<h2>
|
||||
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
||||
</h2>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user