Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c3134750e | ||
|
|
c1e541b32b | ||
|
|
6703454356 | ||
|
|
00911b7350 | ||
|
|
ae0ef54212 | ||
|
|
657715fdde | ||
|
|
4151875a93 | ||
|
|
716971d13d | ||
|
|
91aacd5493 | ||
|
|
6ee58d8b15 | ||
|
|
b955abab6e | ||
|
|
2e728cc9f6 | ||
|
|
7ca03c017d | ||
|
|
253596c58d | ||
|
|
a267729084 | ||
|
|
139778db3a | ||
|
|
dd50eb77e2 | ||
|
|
85a8b1041b | ||
|
|
0ff0b46c7a | ||
|
|
872a953ee0 | ||
|
|
ea81720a52 | ||
|
|
6c42611aa2 | ||
|
|
fd6c7e81bb | ||
|
|
880581dba3 | ||
|
|
16a120a019 | ||
|
|
5272abd70c | ||
|
|
93c2c777ac | ||
|
|
57158e7d10 | ||
|
|
9f30a13921 | ||
|
|
65442dccaf | ||
|
|
76c282c175 | ||
|
|
80bdd9670a | ||
|
|
7004e5cf2e | ||
|
|
12d1a2822a | ||
|
|
55a908f23a | ||
|
|
52b255c04a | ||
|
|
90ad175b00 | ||
|
|
2b6ad0053a | ||
|
|
d1376b89d7 | ||
|
|
707038db64 | ||
|
|
3d617ba270 | ||
|
|
739a41210d | ||
|
|
efd6efc855 | ||
|
|
ff3731ec05 | ||
|
|
94d0e888cf | ||
|
|
ecf5369891 | ||
|
|
91b87d1c91 | ||
|
|
50e6328d1f | ||
|
|
9694d23223 | ||
|
|
43484824ee | ||
|
|
60d3a49aed | ||
|
|
c6cb673abd | ||
|
|
a37bdac33e | ||
|
|
1511c43fca | ||
|
|
2537e39c75 | ||
|
|
a1a18404e3 | ||
|
|
2ae628ed6d | ||
|
|
bca99813d1 | ||
|
|
6a8eb11378 | ||
|
|
aff623aaac | ||
|
|
3f80ada54d | ||
|
|
19feb7a67d | ||
|
|
53a4221b53 | ||
|
|
4e748c5a55 | ||
|
|
1e5611f1e8 | ||
|
|
cf78aa3a9a | ||
|
|
c8d11a83bb | ||
|
|
39c38e6812 | ||
|
|
4d4c76c979 | ||
|
|
fc4d13de7d | ||
|
|
35dbc1c0bb | ||
|
|
4768d78530 | ||
|
|
a09d5e5819 | ||
|
|
cc7facb199 | ||
|
|
18b2ca47b2 | ||
|
|
3b6ee1e1cb | ||
|
|
14f85c52de | ||
|
|
c0164698cd | ||
|
|
bbb3455c52 | ||
|
|
fde1e25a69 | ||
|
|
8ff457a7fc | ||
|
|
fd305fe801 | ||
|
|
d204b63ee4 | ||
|
|
ef1c5a4043 | ||
|
|
147e5ef75d | ||
|
|
e7fd2b494c | ||
|
|
932be00bc8 | ||
|
|
bda96f88df | ||
|
|
357c6f4122 | ||
|
|
4887a7e062 | ||
|
|
fce9e77c26 | ||
|
|
993fb4782c | ||
|
|
b2969d6f24 | ||
|
|
39d18b6947 | ||
|
|
77e1a8031c | ||
|
|
546a32f87a | ||
|
|
6067536ea5 | ||
|
|
605d274523 | ||
|
|
e3bfb68115 | ||
|
|
eb3062b809 | ||
|
|
a0f0345a24 | ||
|
|
11c4693328 | ||
|
|
21918c8d54 | ||
|
|
ea3909dcc1 | ||
|
|
4aaf9d6491 | ||
|
|
47ac324dd7 | ||
|
|
a2cab75d96 | ||
|
|
bea89e87c1 | ||
|
|
32f6d63a29 | ||
|
|
a2261041dd | ||
|
|
d85ef155de | ||
|
|
7d373a128c | ||
|
|
cb8900d973 | ||
|
|
ad9388ab42 | ||
|
|
80c6474683 | ||
|
|
ef1a71a973 | ||
|
|
324e62e569 | ||
|
|
f4fd1c3cea | ||
|
|
876b71466f | ||
|
|
eed002861e | ||
|
|
ba0b46e9b0 | ||
|
|
e5761ccfb1 | ||
|
|
42d208560f | ||
|
|
6abed20acb | ||
|
|
95d014032f | ||
|
|
5305e3920a | ||
|
|
c586f9a799 | ||
|
|
cb12b4e587 | ||
|
|
00898eda30 | ||
|
|
dcb0ee3f22 | ||
|
|
271d974266 | ||
|
|
d40f6ce69f | ||
|
|
d17b0fbb90 | ||
|
|
974f07ccb4 | ||
|
|
745058c77e | ||
|
|
9a24b60cdf | ||
|
|
bca2077c1e | ||
|
|
0253d6e6c8 | ||
|
|
fba1883def | ||
|
|
3b544b94d9 | ||
|
|
13cd1d1a26 | ||
|
|
670ae4a44c | ||
|
|
c07ef90f0e | ||
|
|
9bb8ecc6b0 | ||
|
|
f86b79b0e5 | ||
|
|
f717345ec9 | ||
|
|
0e30256604 | ||
|
|
056e91e9f4 | ||
|
|
f8df576a2d | ||
|
|
db397f3151 | ||
|
|
7024070572 | ||
|
|
e473a1fedc | ||
|
|
4b6ffe6628 | ||
|
|
adc98fac48 | ||
|
|
2d66c7ed22 | ||
|
|
3516542c98 | ||
|
|
6b5629317f | ||
|
|
5255eaa813 | ||
|
|
2bc2517658 | ||
|
|
58288f87ac | ||
|
|
60a897152c | ||
|
|
f6c5529467 | ||
|
|
e7a72a3d5d | ||
|
|
00ba4be6aa | ||
|
|
5e9ee23b9b | ||
|
|
f5a0596b91 | ||
|
|
6609324bd6 | ||
|
|
0beb885666 | ||
|
|
7ae0a42654 | ||
|
|
f6238f3bae | ||
|
|
6336e5055c | ||
|
|
eea31eb528 | ||
|
|
eaaefe4fc4 | ||
|
|
00b7e600a8 | ||
|
|
a5b06b9839 | ||
|
|
3ac96ee1d2 | ||
|
|
8ac6712dc3 | ||
|
|
fab1ab54d6 | ||
|
|
45e57c29e2 | ||
|
|
0e971367c0 | ||
|
|
77e972753c | ||
|
|
a54f57affc | ||
|
|
c315a786fa | ||
|
|
87538c1745 | ||
|
|
7a6acb8a7b | ||
|
|
463fd5202d | ||
|
|
49ac0e2111 | ||
|
|
bdf359bafd | ||
|
|
ddab77a120 | ||
|
|
9abb64f1a1 | ||
|
|
5df7a85618 | ||
|
|
67bea5e152 | ||
|
|
ccde3239f8 | ||
|
|
5ef40b5e3d | ||
|
|
b283236770 | ||
|
|
ed0f7b96fe | ||
|
|
100f6c0e3b | ||
|
|
f921f45787 | ||
|
|
2ab6083ebe | ||
|
|
5b1bbea2a3 | ||
|
|
2c429eb739 | ||
|
|
3f1d258cb6 | ||
|
|
315fa4b590 | ||
|
|
6e5b9d0754 | ||
|
|
189e403d70 | ||
|
|
85d0a82706 | ||
|
|
aa0b80ef9b | ||
|
|
ecc04128f1 | ||
|
|
f375dd6f67 | ||
|
|
e4f4e630ce | ||
|
|
a00c8b1fdb | ||
|
|
758f07cadc | ||
|
|
92d77fd896 | ||
|
|
0ca71b6e8c | ||
|
|
9d066f5f78 | ||
|
|
de54e6e800 | ||
|
|
c732082a1c | ||
|
|
931465af9f | ||
|
|
544b1243aa | ||
|
|
3c1eb193bc | ||
|
|
89fff8a6ab | ||
|
|
50efda702a | ||
|
|
a2ff177885 | ||
|
|
da02320bb5 | ||
|
|
41df5e4d24 | ||
|
|
7da699a3fe | ||
|
|
17f67ae625 | ||
|
|
41ed99c3d3 | ||
|
|
4e6041364e | ||
|
|
f45e706c55 | ||
|
|
526842404a | ||
|
|
4cfd1d7d6c | ||
|
|
0f932c0520 | ||
|
|
c293fcfb42 | ||
|
|
a4012cf6f1 | ||
|
|
dfc7ed362a | ||
|
|
de20cdd67f | ||
|
|
e08e828e0a | ||
|
|
d77d900479 | ||
|
|
675a75e000 | ||
|
|
c4c7beaefa | ||
|
|
3c1cfa86e0 | ||
|
|
7485a2ec50 | ||
|
|
cd64b7372a | ||
|
|
e54dcba38e | ||
|
|
be5f4a5658 | ||
|
|
8359c24804 | ||
|
|
71c28f5f0a | ||
|
|
2bd669c7ab | ||
|
|
8f9124bc3f | ||
|
|
536554c18b | ||
|
|
1440c62e57 | ||
|
|
ba3565625d | ||
|
|
f72a88721e | ||
|
|
e8fc5132a1 | ||
|
|
e00d5fb98a | ||
|
|
59b2ae1a9d | ||
|
|
34b09a6724 | ||
|
|
b8f4b62b72 | ||
|
|
7cf5d428a4 | ||
|
|
200a28289b | ||
|
|
0862c7587f | ||
|
|
96efd18c32 | ||
|
|
fa6a343555 | ||
|
|
1801dd7b58 | ||
|
|
159466d448 | ||
|
|
19fb287cef | ||
|
|
d12f17e520 | ||
|
|
0fa899fe0b | ||
|
|
25b366ce7f | ||
|
|
12e12135c1 | ||
|
|
a911dd31b3 | ||
|
|
6f64bcc3e1 | ||
|
|
bbc48e75bf | ||
|
|
009b41cdb1 | ||
|
|
0a6e70262b | ||
|
|
68896b1a78 | ||
|
|
a58904c8c2 | ||
|
|
acf74131cc | ||
|
|
253d805352 | ||
|
|
7f37798408 | ||
|
|
fc4a466346 | ||
|
|
8bf2368892 | ||
|
|
ca4b8aa94b | ||
|
|
842146183d | ||
|
|
d52f605200 | ||
|
|
eb6aedf5cc | ||
|
|
0eee81b048 | ||
|
|
09d579b516 | ||
|
|
2c3ca5aeb4 | ||
|
|
eb66e7f894 | ||
|
|
968516a9c8 | ||
|
|
aaa3c8d6b4 | ||
|
|
ac2f924dad | ||
|
|
c6e5159cc6 | ||
|
|
2823b2b53d | ||
|
|
22a2f084a1 | ||
|
|
672a39b697 | ||
|
|
8f48f0bce6 | ||
|
|
de3bd8d665 | ||
|
|
ad39b98734 | ||
|
|
26b83b0365 | ||
|
|
0c7f500c41 | ||
|
|
e55aa3bc77 | ||
|
|
43a994245e | ||
|
|
bf439d34b7 | ||
|
|
604be71a37 | ||
|
|
309a951b93 | ||
|
|
0f7782a321 | ||
|
|
521ef0b8ee | ||
|
|
a9e7a5d421 | ||
|
|
7908140dc5 | ||
|
|
07e2eb4f85 | ||
|
|
af4db15a27 | ||
|
|
3e50c3394a | ||
|
|
5765619416 | ||
|
|
6fcf8d2ec1 | ||
|
|
5b92b29dc4 | ||
|
|
c59d776031 | ||
|
|
dccfcb8732 | ||
|
|
281449f418 | ||
|
|
b7fa2448a4 | ||
|
|
8f5aa8ad5f | ||
|
|
4927e57c88 | ||
|
|
9b471c682f | ||
|
|
18262ce8d2 | ||
|
|
769727e886 | ||
|
|
99bc558d5c | ||
|
|
b33a92e37b | ||
|
|
eadce61e75 | ||
|
|
13ab32f631 | ||
|
|
e483055e17 | ||
|
|
c890255c39 | ||
|
|
5e5b680fa0 | ||
|
|
0975c7d1be | ||
|
|
31836391e1 | ||
|
|
6a68347a87 | ||
|
|
c9a7019333 | ||
|
|
b6b5904a7a | ||
|
|
80fe7e010d | ||
|
|
7c36b5c4ef | ||
|
|
099799cdf5 | ||
|
|
854663ff03 | ||
|
|
885053bfbd | ||
|
|
0cfee35151 | ||
|
|
89c68b03f0 | ||
|
|
ee198dd6d2 | ||
|
|
401b512dda | ||
|
|
4fc2a6c02e | ||
|
|
7199f7ad6c | ||
|
|
8792079cb3 | ||
|
|
26d2ae36e3 | ||
|
|
2b0b90c5e9 | ||
|
|
c8ffa5203a | ||
|
|
f1ee7add1c | ||
|
|
78d7cdaf0b | ||
|
|
9028461c72 | ||
|
|
d75aec1b7e | ||
|
|
0beec63367 | ||
|
|
57871449ea | ||
|
|
038288d489 | ||
|
|
3e2fa37250 | ||
|
|
7e601d485a | ||
|
|
0bff78cd1b | ||
|
|
1fc01efe8b | ||
|
|
641b4ca13d | ||
|
|
cbb8567c76 | ||
|
|
70154b6047 | ||
|
|
d78e4e6a0b | ||
|
|
52a3761d65 | ||
|
|
07329f4304 | ||
|
|
f40585f528 | ||
|
|
9e3403ee4f | ||
|
|
76a383fb1b | ||
|
|
d4c796c73e | ||
|
|
64bd1d141a | ||
|
|
551138e7c1 | ||
|
|
7d94975960 | ||
|
|
8a7d9001fd | ||
|
|
55cae2d1f1 | ||
|
|
4fe26f24db | ||
|
|
87c440c003 | ||
|
|
ef7b07a90e | ||
|
|
17808d964d | ||
|
|
7d46ed2a85 | ||
|
|
3783eceb09 | ||
|
|
8f46cc6f09 | ||
|
|
0eb24a04ae | ||
|
|
c4ba189c05 | ||
|
|
79f277c8fe | ||
|
|
9a36dd67b2 | ||
|
|
82a98ae9d3 | ||
|
|
c994ce1dd9 | ||
|
|
1655f18a20 | ||
|
|
4c4edff9cb | ||
|
|
4997d1f63c | ||
|
|
fc900aa4b5 | ||
|
|
cae45a60b3 | ||
|
|
53e1977c65 | ||
|
|
33616c7deb | ||
|
|
25e1960511 | ||
|
|
758ae36c92 | ||
|
|
e9af74f3df | ||
|
|
c3231f1a9e | ||
|
|
fc71fd4c71 | ||
|
|
71b300aaa1 | ||
|
|
2c3ae17131 | ||
|
|
8b28c1f5a1 | ||
|
|
f474f63d6b | ||
|
|
aa8b3a6cf7 | ||
|
|
b04c3d1354 | ||
|
|
b09e334f3f | ||
|
|
f71359ce65 | ||
|
|
80be8bb1ec | ||
|
|
38f0099fc8 | ||
|
|
4186b7b7f8 | ||
|
|
bb9e1eb3df | ||
|
|
32ffc58d12 | ||
|
|
2e228af92d | ||
|
|
28d024af2f | ||
|
|
21f2617c9c | ||
|
|
203087bcb1 | ||
|
|
680725ed3a | ||
|
|
1e61603b4e | ||
|
|
f51f3c453d | ||
|
|
61533af0ef | ||
|
|
62ff9d0ac0 | ||
|
|
460164b560 | ||
|
|
9d24e6880b | ||
|
|
ceea88e066 | ||
|
|
ed1ae7226a | ||
|
|
f81a0c578a | ||
|
|
96168d05d8 | ||
|
|
c691fff501 | ||
|
|
c101debc8c | ||
|
|
65d725f260 | ||
|
|
040d3a303c | ||
|
|
823b24aa9c | ||
|
|
e3ac58a7c6 | ||
|
|
e0855d4002 | ||
|
|
b54813ffd8 | ||
|
|
5593f99c14 | ||
|
|
a463798593 | ||
|
|
c55cf5cba9 | ||
|
|
5257fe67a6 | ||
|
|
180da60770 | ||
|
|
7fd5811bf1 | ||
|
|
eea4ebdaf4 | ||
|
|
7b653fac4e | ||
|
|
7178bb4180 | ||
|
|
87bc1c8ef9 | ||
|
|
99b057a9ae | ||
|
|
9633f69b74 | ||
|
|
7661631e3e | ||
|
|
2ba776bb0e | ||
|
|
e37f517240 | ||
|
|
c0fe88004a | ||
|
|
6f324afb37 | ||
|
|
cf17f3b71e | ||
|
|
9ecc9aa8c9 | ||
|
|
e68f54c79f | ||
|
|
4086c2c973 | ||
|
|
364309d47a | ||
|
|
f850641437 | ||
|
|
0a08b2b1cd | ||
|
|
57d2a4e4a5 | ||
|
|
23be61a803 | ||
|
|
b894452360 | ||
|
|
c7ace3eba9 | ||
|
|
6e0f5799b4 | ||
|
|
a4b8bba3e0 | ||
|
|
e5831239e2 | ||
|
|
c61a6179f0 | ||
|
|
ce9ca56142 | ||
|
|
1a32e9b7e3 | ||
|
|
b32084bf8b | ||
|
|
2dbf60affd | ||
|
|
cecd1f1d7c | ||
|
|
6033519d15 | ||
|
|
6696f09444 | ||
|
|
bfca02762d | ||
|
|
7a6db53801 | ||
|
|
fcbe7f6384 | ||
|
|
a2ff959ab3 | ||
|
|
7fd950872c | ||
|
|
cb9a563a78 | ||
|
|
3568043dea | ||
|
|
6136fc905f | ||
|
|
cb5d51e7c1 | ||
|
|
82b8c71059 | ||
|
|
660844cb3c | ||
|
|
8a8fe982e2 | ||
|
|
b5a7759b0a | ||
|
|
0258fe6bcf | ||
|
|
07f3440f42 | ||
|
|
59605d0e0c | ||
|
|
6d01f17193 | ||
|
|
03604c5e27 | ||
|
|
46474cc7c0 | ||
|
|
efff866b62 | ||
|
|
aca699f2cb | ||
|
|
ebff8b795b | ||
|
|
d53945a89a | ||
|
|
60624bfa82 | ||
|
|
f37bb76d18 | ||
|
|
fde28c3f47 | ||
|
|
56207162fe | ||
|
|
41121cf582 | ||
|
|
4d4e869f02 | ||
|
|
42d6525c50 | ||
|
|
b273c429d9 | ||
|
|
33c183754c | ||
|
|
45208dea73 | ||
|
|
f56b070909 | ||
|
|
01054414c8 | ||
|
|
0198e5e98e | ||
|
|
e3fa0ebd87 | ||
|
|
29f96ca61f | ||
|
|
ddd7e33581 | ||
|
|
9617716652 | ||
|
|
b22e571f31 | ||
|
|
06076d2ab5 | ||
|
|
510c0fdf5e | ||
|
|
6806139d38 | ||
|
|
c6946350a9 | ||
|
|
5f5a82e718 | ||
|
|
1e590ba872 | ||
|
|
983e5bbf72 | ||
|
|
344ce1f4fa | ||
|
|
9e6d347db0 | ||
|
|
232e997ddc | ||
|
|
425daf1156 | ||
|
|
3bc52f0b53 | ||
|
|
662a2d3343 | ||
|
|
59281d63f2 | ||
|
|
9f71d0a220 | ||
|
|
ca0de52b45 | ||
|
|
8e51451366 | ||
|
|
6e69387b3d | ||
|
|
313424a521 | ||
|
|
d7ba0134a0 | ||
|
|
dc48b06500 | ||
|
|
1248237d60 | ||
|
|
763c23eebb | ||
|
|
67b2d84519 | ||
|
|
db4a8340d8 | ||
|
|
5ef3ec7aa3 | ||
|
|
9edf730873 | ||
|
|
9f8ef33545 | ||
|
|
a1105b81f1 | ||
|
|
9f3dde3957 | ||
|
|
acece94694 | ||
|
|
584a59ef8b | ||
|
|
db73d4863a | ||
|
|
3f5957bd01 | ||
|
|
4ed0b1328f | ||
|
|
9d4a8409f9 | ||
|
|
5ee95e4fe2 | ||
|
|
3222ec5a6e | ||
|
|
5e97b74471 | ||
|
|
f4c5344116 | ||
|
|
b3fcd629a3 | ||
|
|
27808a4899 | ||
|
|
1e35478b44 | ||
|
|
6364de1a2d | ||
|
|
113ba5fd8b | ||
|
|
96ae06f25c | ||
|
|
84dd88af69 | ||
|
|
e1310aa9ee | ||
|
|
be5c94128d | ||
|
|
dd59ed1f00 | ||
|
|
36ac36c56a | ||
|
|
64874a9583 | ||
|
|
02296f6605 | ||
|
|
124a6b2438 | ||
|
|
fc024da6e1 | ||
|
|
b812c54f66 | ||
|
|
5b5bc03600 | ||
|
|
127b98b009 | ||
|
|
e627f40b11 | ||
|
|
fd6ddc7eb8 | ||
|
|
2cb7e30568 | ||
|
|
457315315b | ||
|
|
c0fcd8f8c5 | ||
|
|
e08802aed1 | ||
|
|
f6d9a91995 | ||
|
|
72cfa5b7bc | ||
|
|
5000e3ee8d | ||
|
|
de177ca0c5 | ||
|
|
d86dadf4bd | ||
|
|
13b55fa165 | ||
|
|
7702904526 | ||
|
|
f2662fad38 | ||
|
|
df4351e6bc | ||
|
|
101078f313 | ||
|
|
5783e9de08 | ||
|
|
bf98f49819 | ||
|
|
6dd7789a2a | ||
|
|
66f8aae310 | ||
|
|
d2285b4d92 | ||
|
|
91c4926fe3 | ||
|
|
2ae22c2e3b | ||
|
|
2c8a324324 | ||
|
|
be2532d47f | ||
|
|
bb9a4a752d | ||
|
|
41fb9cd97a | ||
|
|
b44c503008 | ||
|
|
a74a025f47 | ||
|
|
c31f1c6125 | ||
|
|
ee36e2368f | ||
|
|
3a73abad08 | ||
|
|
420b841ecf | ||
|
|
5e6f5d9089 | ||
|
|
ab99591d76 | ||
|
|
fe12548f8e | ||
|
|
49020c51ae | ||
|
|
2fcfb551be | ||
|
|
9eae3956b7 | ||
|
|
e1a24279a7 | ||
|
|
65f23355c8 | ||
|
|
406883a236 | ||
|
|
34a5779628 | ||
|
|
528afd7d7f | ||
|
|
0d5e66d9a5 | ||
|
|
21720f1283 | ||
|
|
18fd27024c | ||
|
|
971aa3de0b | ||
|
|
2e9b339d84 | ||
|
|
2cd7f3de6e | ||
|
|
23ebd31b30 | ||
|
|
ee91b92c4a | ||
|
|
00b289bc0e | ||
|
|
cedc65d9fa | ||
|
|
bcf634faa8 | ||
|
|
3fbb56d9cf | ||
|
|
1bb5eb631c | ||
|
|
a0c10d868a | ||
|
|
738177d5a3 | ||
|
|
e76be3b704 | ||
|
|
cb215d0da4 | ||
|
|
f1af230918 | ||
|
|
8cac945757 | ||
|
|
669d7cbc19 | ||
|
|
d3ed8ccec6 | ||
|
|
26b1de049b | ||
|
|
83c5c7512b | ||
|
|
e61f12d429 | ||
|
|
60f48d71d1 | ||
|
|
3537235d78 | ||
|
|
95435e7035 | ||
|
|
d5a78ce396 | ||
|
|
46b7e0f5fe | ||
|
|
130bd9fe0b | ||
|
|
507e98871e | ||
|
|
a18eb4f982 | ||
|
|
eaeba59dd8 | ||
|
|
4dbd2978a8 | ||
|
|
1d637134b2 | ||
|
|
c814cc1584 | ||
|
|
1b58bba115 | ||
|
|
4dbb6095bc | ||
|
|
e7160cb85c | ||
|
|
7b585f191a | ||
|
|
68b1800d38 | ||
|
|
50be5f8712 | ||
|
|
3e47149fe4 | ||
|
|
82eef9340f | ||
|
|
cc302a70fc | ||
|
|
57822b1290 | ||
|
|
2159c730c5 | ||
|
|
d5ddc1ab8f | ||
|
|
ccfdbf040f | ||
|
|
48dc0527c8 | ||
|
|
914ccc4550 | ||
|
|
0dec429a9a | ||
|
|
46f45bb8a9 | ||
|
|
02915210f4 | ||
|
|
fc7fb28edb | ||
|
|
e32562fb1e | ||
|
|
ffe06939a7 | ||
|
|
71d022ef39 | ||
|
|
2fd1740f3d | ||
|
|
9338045887 | ||
|
|
e21949edc5 | ||
|
|
854fed7fb9 | ||
|
|
4ee1ee8c04 | ||
|
|
b387f2abee | ||
|
|
0111478b65 | ||
|
|
37310eb52d | ||
|
|
841b493df6 | ||
|
|
f5ad733181 | ||
|
|
6ac4b0f749 | ||
|
|
adf6f50c3e | ||
|
|
ba788dcaba | ||
|
|
5e838ecf4f | ||
|
|
72c7841808 | ||
|
|
2eed3bdb4f | ||
|
|
930c206132 | ||
|
|
1a92f01c41 | ||
|
|
d7d7ef566c | ||
|
|
fec7e13bea | ||
|
|
c3e10c25f3 | ||
|
|
c534800ab9 | ||
|
|
7f2444174f | ||
|
|
7032b7de4b | ||
|
|
51549c61ee | ||
|
|
56d252c6bb |
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [
|
||||
"add-module-exports",
|
||||
"root-import"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Top-level config
|
||||
root = true
|
||||
|
||||
# All files
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Files generated by build
|
||||
/build
|
||||
/material
|
||||
/site
|
||||
|
||||
# Files used and generated by flow
|
||||
/lib/declarations
|
||||
/tmp
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": {
|
||||
"Modernizr": true,
|
||||
"navigator": true
|
||||
},
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"ecmaFeatures": {
|
||||
"arrowFunctions": true,
|
||||
"binaryLiterals": true,
|
||||
"blockBindings": true,
|
||||
"classes": true,
|
||||
"defaultParams": true,
|
||||
"destructuring": true,
|
||||
"forOf": true,
|
||||
"generators": true,
|
||||
"globalReturn": true,
|
||||
"modules": true,
|
||||
"objectLiteralComputedProperties": true,
|
||||
"objectLiteralDuplicateProperties": true,
|
||||
"objectLiteralShorthandMethods": true,
|
||||
"objectLiteralShorthandProperties": true,
|
||||
"octalLiterals": true,
|
||||
"regexUFlag": true,
|
||||
"regexYFlag": true,
|
||||
"spread": true,
|
||||
"superInFunctions": false,
|
||||
"templateStrings": true,
|
||||
"unicodeCodePointEscapes": true
|
||||
},
|
||||
"impliedStrict": true,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [],
|
||||
"rules": {
|
||||
"array-callback-return": 2,
|
||||
"array-bracket-spacing": 2,
|
||||
"arrow-parens": [2, "as-needed"],
|
||||
"arrow-spacing": 2,
|
||||
"block-scoped-var": 2,
|
||||
"block-spacing": 2,
|
||||
"brace-style": 2,
|
||||
"camelcase": [2, {
|
||||
"properties": "always"
|
||||
}],
|
||||
"comma-dangle": [2, "never"],
|
||||
"comma-style": [2, "last"],
|
||||
"complexity": 2,
|
||||
"computed-property-spacing": 2,
|
||||
"consistent-this": 2,
|
||||
"dot-notation": 2,
|
||||
"eol-last": 2,
|
||||
"eqeqeq": 2,
|
||||
"func-call-spacing": 2,
|
||||
"func-names": [2, "never"],
|
||||
"func-style": 2,
|
||||
"generator-star-spacing": 2,
|
||||
"indent": [2, 2, {
|
||||
"FunctionDeclaration": {
|
||||
"body": 1,
|
||||
"parameters": 2
|
||||
},
|
||||
"FunctionExpression": {
|
||||
"body": 1,
|
||||
"parameters": 2
|
||||
},
|
||||
"MemberExpression": 1,
|
||||
"VariableDeclarator": {
|
||||
"var": 2,
|
||||
"let": 2,
|
||||
"const": 3
|
||||
},
|
||||
"SwitchCase": 1
|
||||
}],
|
||||
"init-declarations": 2,
|
||||
"key-spacing": 2,
|
||||
"keyword-spacing": 2,
|
||||
"linebreak-style": 2,
|
||||
"lines-around-comment": 2,
|
||||
"lines-around-directive": 2,
|
||||
"max-depth": 2,
|
||||
"max-len": [1, {
|
||||
"ignorePattern": "\/\/ TODO"
|
||||
}],
|
||||
"max-nested-callbacks": 2,
|
||||
"max-params": 2,
|
||||
"max-statements-per-line": 2,
|
||||
"new-cap": 2,
|
||||
"newline-per-chained-call": 2,
|
||||
"no-array-constructor": 2,
|
||||
"no-alert": 2,
|
||||
"no-caller": 2,
|
||||
"no-confusing-arrow": [2, {
|
||||
"allowParens": false
|
||||
}],
|
||||
"no-console": 1,
|
||||
"no-duplicate-imports": 2,
|
||||
"no-eq-null": 2,
|
||||
"no-eval": 2,
|
||||
"no-extend-native": 2,
|
||||
"no-extra-bind": 2,
|
||||
"no-floating-decimal": 2,
|
||||
"no-global-assign": 2,
|
||||
"no-invalid-this": 2,
|
||||
"no-labels": 2,
|
||||
"no-lone-blocks": 2,
|
||||
"no-loop-func": 2,
|
||||
"no-multiple-empty-lines": [1, {
|
||||
"max": 1
|
||||
}],
|
||||
"no-nested-ternary": 2,
|
||||
"no-new": 0,
|
||||
"no-new-object": 2,
|
||||
"no-param-reassign": 2,
|
||||
"no-prototype-builtins": 2,
|
||||
"no-shadow": 2,
|
||||
"no-tabs": 2,
|
||||
"no-template-curly-in-string": 2,
|
||||
"no-throw-literal": 2,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-undefined": 2,
|
||||
"no-underscore-dangle": [2, {
|
||||
"allowAfterThis": true,
|
||||
"allowAfterSuper": true
|
||||
}],
|
||||
"no-unneeded-ternary": 2,
|
||||
"no-unsafe-negation": 2,
|
||||
"no-unused-expressions": 2,
|
||||
"no-unused-vars": 1,
|
||||
"no-use-before-define": 2,
|
||||
"no-useless-call": 2,
|
||||
"no-useless-computed-key": 2,
|
||||
"no-useless-constructor": 2,
|
||||
"no-useless-rename": 2,
|
||||
"no-var": 2,
|
||||
"no-whitespace-before-property": 2,
|
||||
"no-with": 2,
|
||||
"object-curly-spacing": [2, "always"],
|
||||
"object-shorthand": 2,
|
||||
"one-var-declaration-per-line": 2,
|
||||
"operator-assignment": 2,
|
||||
"prefer-arrow-callback": 2,
|
||||
"prefer-const": 2,
|
||||
"prefer-numeric-literals": 2,
|
||||
"prefer-spread": 2,
|
||||
"prefer-template": 2,
|
||||
"quotes": [2, "double"],
|
||||
"radix": 2,
|
||||
"require-jsdoc": [1, {
|
||||
"require": {
|
||||
"FunctionDeclaration": true,
|
||||
"MethodDefinition": true,
|
||||
"ClassDeclaration": false
|
||||
}
|
||||
}],
|
||||
"rest-spread-spacing": 2,
|
||||
"semi": [2, "never"],
|
||||
"semi-spacing": 2,
|
||||
"space-before-function-paren": [2, "never"],
|
||||
"space-in-parens": 2,
|
||||
"space-infix-ops": 2,
|
||||
"space-unary-ops": 2,
|
||||
"spaced-comment": [2, "always", {
|
||||
"line": {
|
||||
"markers": ["/", ":"],
|
||||
"exceptions": ["-", "+"]
|
||||
},
|
||||
"block": {
|
||||
"markers": ["!"],
|
||||
"exceptions": ["*"],
|
||||
"balanced": true
|
||||
}
|
||||
}],
|
||||
"strict": 2,
|
||||
"template-curly-spacing": 2,
|
||||
"unicode-bom": 2,
|
||||
"valid-jsdoc": [1, {
|
||||
"prefer": {
|
||||
"arg": "param",
|
||||
"argument": "param",
|
||||
"class": "constructor",
|
||||
"returns": "return",
|
||||
"virtual": "abstract"
|
||||
},
|
||||
"requireParamDescription": true,
|
||||
"requireReturn": false,
|
||||
"requireReturnDescription": true
|
||||
}],
|
||||
"yield-star-spacing": 2
|
||||
},
|
||||
"root": true
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[ignore]
|
||||
.*/node_modules/.*
|
||||
|
||||
[libs]
|
||||
lib/declarations/
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Exit, if there's no .travisignore file
|
||||
if [[ ! -a .travisignore ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Filter relevant files for linting
|
||||
FILES=$(git diff --cached --name-only)
|
||||
|
||||
# Resolve the patterns we want to skip
|
||||
BLACKLIST=$(< .travisignore)
|
||||
|
||||
# Remove the pattern from the list of changes
|
||||
for f in $BLACKLIST; do
|
||||
FILES=( ${FILES[@]/$f/} )
|
||||
|
||||
# If we've exhausted the list of changes before we've finished going
|
||||
# through patterns, that's okay, just quit the loop
|
||||
if [[ ${#FILES[@]} -eq 0 ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# If there's changes left, then we have stuff to build, leave the commit alone
|
||||
if [[ ${#FILES[@]} -gt 0 ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Don't build this commit
|
||||
sed -i '' '1s/$/ [ci skip]/' "$1"
|
||||
|
||||
# We're good
|
||||
exit 0
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Check, if all changes are added to the index
|
||||
CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
|
||||
|
||||
# Perform install and prune of NPM dependencies if package.json changed
|
||||
if $(echo "$CHANGED" | grep --quiet package.json); then
|
||||
echo -e "\x1B[33m!\x1B[0m Updating dependencies"
|
||||
yarn install
|
||||
fi
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Determine current branch
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
MESSAGE="Commits on master are only allowed via Pull Requests. Aborting."
|
||||
|
||||
# If we're on master, abort commit
|
||||
if [[ "$BRANCH" == "master" ]]; then
|
||||
echo -e "\x1B[31m✗\x1B[0m Branch: $BRANCH - \x1B[31m$MESSAGE\x1B[0m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\x1B[32m✓\x1B[0m Branch: $BRANCH"
|
||||
fi
|
||||
|
||||
# We're good
|
||||
exit 0
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Patch file to store unindexed changes
|
||||
PATCH_FILE=".working-tree.patch"
|
||||
MESSAGE="Terminated with errors"
|
||||
|
||||
# Revert changes that have been registered in the patch file
|
||||
function cleanup {
|
||||
EXIT_CODE=$?
|
||||
if [ -f "$PATCH_FILE" ]; then
|
||||
git apply "$PATCH_FILE" 2> /dev/null
|
||||
rm "$PATCH_FILE"
|
||||
fi
|
||||
exit $EXIT_CODE
|
||||
}
|
||||
|
||||
# Register signal handlers
|
||||
trap cleanup EXIT SIGINT SIGHUP
|
||||
|
||||
# Cancel any changes to the working tree that are not going to be committed
|
||||
git diff > "$PATCH_FILE"
|
||||
git checkout -- .
|
||||
|
||||
# Filter relevant files for linting
|
||||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | \
|
||||
grep "\.\(js\|jsx\|scss\)$")
|
||||
|
||||
# Run check and print indicator
|
||||
if [ "$FILES" ]; then
|
||||
|
||||
# If linter terminated with errors, abort commit
|
||||
if [ $? -gt 0 ]; then
|
||||
echo -e "\x1B[31m✗\x1B[0m Linter - \x1B[31m$MESSAGE\x1B[0m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\x1B[32m✓\x1B[0m Linter"
|
||||
fi
|
||||
|
||||
# If flow terminated with errors, abort commit
|
||||
yarn run flow --silent
|
||||
if [ $? -gt 0 ]; then
|
||||
echo -e "\x1B[31m✗\x1B[0m Flow - \x1B[31m$MESSAGE\x1B[0m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\x1B[32m✓\x1B[0m Flow"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We're good
|
||||
exit 0
|
||||
@@ -0,0 +1,34 @@
|
||||
## Description
|
||||
|
||||
[Description of the bug]
|
||||
|
||||
### Expected behavior
|
||||
|
||||
[What you expected to happen]
|
||||
|
||||
### Actual behavior
|
||||
|
||||
[What is actually happening]
|
||||
|
||||
### Steps to reproduce the bug
|
||||
|
||||
1. [First step]
|
||||
2. [Second step]
|
||||
3. [and so on...]
|
||||
|
||||
### Package versions
|
||||
|
||||
* Python: `python --version`
|
||||
* MkDocs: `mkdocs --version`
|
||||
* Material: `pip show mkdocs-material | grep -E ^Version`
|
||||
|
||||
### Project configuration
|
||||
|
||||
``` yaml
|
||||
The contents of your mkdocs.yml
|
||||
```
|
||||
|
||||
### System information
|
||||
|
||||
* OS: [The operating system you're running]
|
||||
* Browser: [The browser used, if relevant]
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
@@ -18,18 +18,23 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Mac OS X internals
|
||||
# macOS internals
|
||||
.DS_Store
|
||||
|
||||
# Bower and NPM libraries
|
||||
bower_components
|
||||
node_modules
|
||||
# NPM-related
|
||||
/node_modules
|
||||
/npm-debug.log*
|
||||
/yarn-error.log
|
||||
|
||||
# Build files
|
||||
build
|
||||
MANIFEST
|
||||
site
|
||||
# Files generated by build
|
||||
/build
|
||||
/manifest.json
|
||||
/MANIFEST
|
||||
/site
|
||||
|
||||
# Files generated by flow typechecker
|
||||
/tmp
|
||||
|
||||
# Distribution files
|
||||
dist
|
||||
mkdocs_material.egg-info
|
||||
/dist
|
||||
/mkdocs_material.egg-info
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Don't line shame
|
||||
src/assets/stylesheets/_shame.scss
|
||||
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"plugins": [
|
||||
"stylelint-order",
|
||||
"stylelint-scss"
|
||||
],
|
||||
"rules": {
|
||||
"at-rule-empty-line-before": null,
|
||||
"at-rule-no-unknown": null,
|
||||
"at-rule-no-vendor-prefix": true,
|
||||
"block-opening-brace-space-before": null,
|
||||
"block-closing-brace-newline-after": ["always", {
|
||||
"ignoreAtRules": [
|
||||
"if",
|
||||
"else",
|
||||
"elseif"
|
||||
]
|
||||
}],
|
||||
"color-hex-case": "upper",
|
||||
"color-hex-length": "long",
|
||||
"color-named": "never",
|
||||
"comment-empty-line-before": ["always", {
|
||||
"ignore": ["stylelint-commands"]
|
||||
}],
|
||||
"font-family-name-quotes": "always-where-recommended",
|
||||
"font-weight-notation": "numeric",
|
||||
"function-url-quotes": "always",
|
||||
"no-unknown-animations": true,
|
||||
"order/order": [
|
||||
"custom-properties",
|
||||
"declarations"
|
||||
],
|
||||
"order/properties-order": [
|
||||
"display",
|
||||
"position",
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left",
|
||||
|
||||
"flex",
|
||||
"flex-basis",
|
||||
"flex-direction",
|
||||
"flex-flow",
|
||||
"flex-grow",
|
||||
"flex-shrink",
|
||||
"flex-wrap",
|
||||
"align-content",
|
||||
"align-items",
|
||||
"align-self",
|
||||
"justify-content",
|
||||
"order",
|
||||
|
||||
"width",
|
||||
"min-width",
|
||||
"max-width",
|
||||
|
||||
"height",
|
||||
"min-height",
|
||||
"max-height",
|
||||
|
||||
"margin",
|
||||
"margin-top",
|
||||
"margin-right",
|
||||
"margin-bottom",
|
||||
"margin-left",
|
||||
|
||||
"padding",
|
||||
"padding-top",
|
||||
"padding-right",
|
||||
"padding-bottom",
|
||||
"padding-left",
|
||||
|
||||
"float",
|
||||
"clear",
|
||||
"clip",
|
||||
|
||||
"columns",
|
||||
"column-gap",
|
||||
"column-fill",
|
||||
"column-rule",
|
||||
"column-span",
|
||||
"column-count",
|
||||
"column-width",
|
||||
|
||||
"transform",
|
||||
"transform-box",
|
||||
"transform-origin",
|
||||
"transform-style",
|
||||
|
||||
"transition",
|
||||
"transition-delay",
|
||||
"transition-duration",
|
||||
"transition-property",
|
||||
"transition-timing-function",
|
||||
|
||||
"border",
|
||||
"border-top",
|
||||
"border-right",
|
||||
"border-bottom",
|
||||
"border-left",
|
||||
"border-width",
|
||||
"border-top-width",
|
||||
"border-right-width",
|
||||
"border-bottom-width",
|
||||
"border-left-width",
|
||||
|
||||
"border-style",
|
||||
"border-top-style",
|
||||
"border-right-style",
|
||||
"border-bottom-style",
|
||||
"border-left-style",
|
||||
|
||||
"border-radius",
|
||||
"border-top-left-radius",
|
||||
"border-top-right-radius",
|
||||
"border-bottom-left-radius",
|
||||
"border-bottom-right-radius",
|
||||
|
||||
"border-color",
|
||||
"border-top-color",
|
||||
"border-right-color",
|
||||
"border-bottom-color",
|
||||
"border-left-color",
|
||||
|
||||
"outline",
|
||||
"outline-color",
|
||||
"outline-offset",
|
||||
"outline-style",
|
||||
"outline-width",
|
||||
|
||||
"background",
|
||||
"background-attachment",
|
||||
"background-clip",
|
||||
"background-color",
|
||||
"background-image",
|
||||
"background-repeat",
|
||||
"background-position",
|
||||
"background-size",
|
||||
|
||||
"color",
|
||||
|
||||
"font",
|
||||
"font-family",
|
||||
"font-size",
|
||||
"font-smoothing",
|
||||
"font-style",
|
||||
"font-variant",
|
||||
"font-weight",
|
||||
|
||||
"letter-spacing",
|
||||
"line-height",
|
||||
"list-style",
|
||||
|
||||
"text-align",
|
||||
"text-decoration",
|
||||
"text-indent",
|
||||
"text-overflow",
|
||||
"text-rendering",
|
||||
"text-shadow",
|
||||
"text-transform",
|
||||
"text-wrap",
|
||||
|
||||
"white-space",
|
||||
"word-spacing",
|
||||
|
||||
"border-collapse",
|
||||
"border-spacing",
|
||||
"box-shadow",
|
||||
"caption-side",
|
||||
"content",
|
||||
"cursor",
|
||||
"empty-cells",
|
||||
"opacity",
|
||||
"overflow",
|
||||
"quotes",
|
||||
"speak",
|
||||
"table-layout",
|
||||
"vertical-align",
|
||||
"visibility",
|
||||
"z-index"
|
||||
],
|
||||
"property-no-vendor-prefix": true,
|
||||
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
|
||||
"selector-descendant-combinator-no-non-space": null,
|
||||
"string-quotes": "double",
|
||||
"unit-whitelist": ["rem", "em", "deg", "s", "%", "mm", "vh"],
|
||||
"value-keyword-case": "lower",
|
||||
"value-no-vendor-prefix": true
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2013-2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
@@ -19,21 +19,37 @@
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
language: node_js
|
||||
sudo: false
|
||||
|
||||
# Node.js versions
|
||||
node_js:
|
||||
- '4.1'
|
||||
- '0.11'
|
||||
# -----------------------------------------------------------------------------
|
||||
# Regular builds
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Node.js version and necessary services
|
||||
node_js: 5
|
||||
services:
|
||||
- docker
|
||||
|
||||
# Limit clone depth to 5, to speed up build
|
||||
git:
|
||||
depth: 5
|
||||
|
||||
# Cache dependencies
|
||||
cache:
|
||||
pip: true
|
||||
yarn: true
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
# Install yarn as Travis doesn't support it out of the box
|
||||
before_install:
|
||||
- npm install -g yarn@v0.22.0
|
||||
|
||||
# Install dependencies
|
||||
before_script:
|
||||
install:
|
||||
- yarn install --ignore-optional
|
||||
- pip install --user -r requirements.txt
|
||||
|
||||
# Install bower
|
||||
- npm install -g bower
|
||||
|
||||
# Install project dependencies
|
||||
- npm install
|
||||
- bower install
|
||||
|
||||
# Perform build and tests
|
||||
script: gulp build --production
|
||||
# Perform build and release
|
||||
script:
|
||||
- yarn run travis
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
.github/*
|
||||
material/*
|
||||
.editorconfig
|
||||
.gitignore
|
||||
CHANGELOG
|
||||
LICENSE
|
||||
*.md
|
||||
git
|
||||
@@ -1,6 +1,273 @@
|
||||
mkdocs-material-1.11.0 (2017-10-19)
|
||||
|
||||
* Added localization to clipboard
|
||||
* Refactored i18n localization logic
|
||||
|
||||
mkdocs-material-1.10.4 (2017-10-18)
|
||||
|
||||
* Improved print styles of code blocks
|
||||
* Improved search UX (don't close on enter if no selection)
|
||||
* Fixed #495: Vertical scrollbar on short pages
|
||||
|
||||
mkdocs-material-1.10.3 (2017-10-11)
|
||||
|
||||
* Fixed #484: Vertical scrollbar on some MathJax formulas
|
||||
* Fixed #483: Footnote backref target offset regression
|
||||
|
||||
mkdocs-material-1.10.2 (2017-10-06)
|
||||
|
||||
* Fixed #468: Sidebar shows scrollbar if content is shorter (in Safari)
|
||||
|
||||
mkdocs-material-1.10.1 (2017-09-14)
|
||||
|
||||
* Fixed #455: Bold code blocks rendered with normal font weight
|
||||
|
||||
mkdocs-material-1.10.0 (2017-09-01)
|
||||
|
||||
* Added support to make logo default icon configurable
|
||||
* Fixed uninitialized overflow scrolling on main pane for iOS
|
||||
* Fixed error in mobile navigation in case JavaScript is not available
|
||||
* Fixed incorrect color transition for nested panes in mobile navigation
|
||||
* Improved checkbox styles for Tasklist from PyMdown Extension package
|
||||
|
||||
mkdocs-material-1.9.0 (2017-08-29)
|
||||
|
||||
* Added info (synonym: todo) style for Admonition
|
||||
* Added question (synonym: help, faq) style for Admonition
|
||||
* Added support for Details from PyMdown Extensions package
|
||||
* Improved Admonition styles to match Details
|
||||
* Improved styles for social links in footer
|
||||
* Replaced ligatures with Unicode code points to avoid broken layout
|
||||
* Upgraded PyMdown Extensions package dependency to >= 3.4
|
||||
|
||||
mkdocs-material-1.8.1 (2017-08-07)
|
||||
|
||||
* Fixed #421: Missing pagination for GitHub API
|
||||
|
||||
mkdocs-material-1.8.0 (2017-08-02)
|
||||
|
||||
* Added support for lazy-loading of search results for better performance
|
||||
* Added support for customization of search tokenizer/separator
|
||||
* Fixed #424: Search doesn't handle capital letters anymore
|
||||
* Fixed #419: Search doesn't work on whole words
|
||||
|
||||
mkdocs-material-1.7.5 (2017-07-25)
|
||||
|
||||
* Fixed #398: Forms broken due to search shortcuts
|
||||
* Improved search overall user experience
|
||||
* Improved search matching and highlighting
|
||||
* Improved search accessibility
|
||||
|
||||
mkdocs-material-1.7.4 (2017-06-21)
|
||||
|
||||
* Fixed functional link colors in table of contents for active palette
|
||||
* Fixed #368: Compatibility issues with IE11
|
||||
|
||||
mkdocs-material-1.7.3 (2017-06-07)
|
||||
|
||||
* Fixed error when setting language to Japanese for site search
|
||||
|
||||
mkdocs-material-1.7.2 (2017-06-06)
|
||||
|
||||
* Fixed offset of search box when repo_url is not set
|
||||
* Fixed non-disappearing tooltip
|
||||
|
||||
mkdocs-material-1.7.1 (2017-06-01)
|
||||
|
||||
* Fixed wrong z-index order of header, overlay and drawer
|
||||
* Fixed wrong offset of targeted footnote back references
|
||||
|
||||
mkdocs-material-1.7.0 (2017-06-01)
|
||||
|
||||
* Added "copy to clipboard" buttons to code blocks
|
||||
* Added support for multilingual site search
|
||||
* Fixed search term highlighting for non-latin languages
|
||||
|
||||
mkdocs-material-1.6.4 (2017-05-24)
|
||||
|
||||
* Fixed #337: JavaScript error for GitHub organization URLs
|
||||
|
||||
mkdocs-material-1.6.3 (2017-05-16)
|
||||
|
||||
* Fixed #329: Broken source stats for private or unknown GitHub repos
|
||||
|
||||
mkdocs-material-1.6.2 (2017-05-15)
|
||||
|
||||
* Fixed #316: Fatal error for git clone on Windows
|
||||
* Fixed #320: Chrome 58 creates double underline for abbr tags
|
||||
* Fixed #323: Ligatures rendered inside code blocks
|
||||
* Fixed miscalculated sidebar height due to missing margin collapse
|
||||
* Changed deprecated MathJax CDN to Cloudflare
|
||||
|
||||
mkdocs-material-1.6.1 (2017-04-23)
|
||||
|
||||
* Fixed following of active/focused element if search input is focused
|
||||
* Fixed layer order of search component elements
|
||||
|
||||
mkdocs-material-1.6.0 (2017-04-22)
|
||||
|
||||
* Added build test for Docker image on Travis
|
||||
* Added search overlay for better user experience (focus)
|
||||
* Added language from localizations to html tag
|
||||
* Fixed #270: Source links broken for absolute URLs
|
||||
* Fixed missing top spacing for first targeted element in content
|
||||
* Fixed too small footnote divider when using larger font sizes
|
||||
|
||||
mkdocs-material-1.5.5 (2017-04-20)
|
||||
|
||||
* Fixed #282: Browser search (META+F) is hijacked
|
||||
|
||||
mkdocs-material-1.5.4 (2017-04-08)
|
||||
|
||||
* Fixed broken highlighting for two or more search terms
|
||||
* Fixed missing search results when only a h1 is present
|
||||
* Fixed unresponsive overlay on Android
|
||||
|
||||
mkdocs-material-1.5.3 (2017-04-07)
|
||||
|
||||
* Fixed deprecated calls for template variables
|
||||
* Fixed wrong palette color for focused search result
|
||||
* Fixed JavaScript errors on 404 page
|
||||
* Fixed missing top spacing on 404 page
|
||||
* Fixed missing right spacing on overflow of source container
|
||||
|
||||
mkdocs-material-1.5.2 (2017-04-05)
|
||||
|
||||
* Added requirements as explicit dependencies in setup.py
|
||||
* Fixed non-synchronized transitions in search form
|
||||
|
||||
mkdocs-material-1.5.1 (2017-03-30)
|
||||
|
||||
* Fixed rendering and offset of targetted footnotes
|
||||
* Fixed #238: Link on logo is not set to site_url
|
||||
|
||||
mkdocs-material-1.5.0 (2017-03-24)
|
||||
|
||||
* Added support for localization of search placeholder
|
||||
* Added keyboard events for quick access of search
|
||||
* Added keyboard events for search control
|
||||
* Added opacity on hover for search buttons
|
||||
* Added git hook to skip CI build on non-src changes
|
||||
* Fixed non-resetting search placeholder when input is cleared
|
||||
* Fixed error for unescaped parentheses in search term
|
||||
* Fixed #229: Button to clear search missing
|
||||
* Fixed #231: Escape key doesn't exit search
|
||||
* Removed old-style figures from font feature settings
|
||||
|
||||
mkdocs-material-1.4.1 (2017-03-16)
|
||||
|
||||
* Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE)
|
||||
|
||||
mkdocs-material-1.4.0 (2017-03-16)
|
||||
|
||||
* Added support for grouping searched sections by documents
|
||||
* Added support for highlighting of search terms
|
||||
* Added support for localization of search results
|
||||
* Fixed #216: table of contents icon doesn't show if h1 is not present
|
||||
* Reworked style and layout of search results for better usability
|
||||
|
||||
mkdocs-material-1.3.0 (2017-03-11)
|
||||
|
||||
* Added support for page-specific title and description using metadata
|
||||
* Added support for linking source files to documentation
|
||||
* Fixed jitter and offset of sidebar when zooming browser
|
||||
* Fixed incorrectly initialized tablet sidebar height
|
||||
* Fixed regression for #1: GitHub stars break if the repo_url ends with a '/'
|
||||
* Fixed undesired white line below copyright footer due to base font scaling
|
||||
* Fixed issue with whitespace in path for scripts
|
||||
* Fixed #205: support non-fixed (static) header
|
||||
* Refactored footnote references for better visibility
|
||||
* Reduced repaints to a minimum for non-tabs configuration
|
||||
* Reduced contrast of edit button (slightly)
|
||||
|
||||
mkdocs-material-1.2.0 (2017-03-03)
|
||||
|
||||
* Added quote (synonym: cite) style for Admonition
|
||||
* Added help message to build pipeline
|
||||
* Fixed wrong navigation link colors when applying palette
|
||||
* Fixed #197: Link missing in tabs navigation on deeply nested items
|
||||
* Removed unnecessary dev dependencies
|
||||
|
||||
mkdocs-material-1.1.1 (2017-02-26)
|
||||
|
||||
* Fixed incorrectly displayed nested lists when using tabs
|
||||
|
||||
mkdocs-material-1.1.0 (2017-02-26)
|
||||
|
||||
* Added tabs navigation feature (optional)
|
||||
* Added Disqus integration (optional)
|
||||
* Added a high resolution Favicon with the new logo
|
||||
* Added static type checking using Facebook's Flow
|
||||
* Fixed #173: Dictionary elements have no bottom spacing
|
||||
* Fixed #175: Tables cannot be set to 100% width
|
||||
* Fixed race conditions in build related to asset revisioning
|
||||
* Fixed accidentally re-introduced Permalink on top-level headline
|
||||
* Fixed alignment of logo in drawer on IE11
|
||||
* Refactored styles related to tables
|
||||
* Refactored and automated Docker build and PyPI release
|
||||
* Refactored build scripts
|
||||
|
||||
mkdocs-material-1.0.5 (2017-02-18)
|
||||
|
||||
* Fixed #153: Sidebar flows out of constrained area in Chrome 56
|
||||
* Fixed #159: Footer jitter due to JavaScript if content is short
|
||||
|
||||
mkdocs-material-1.0.4 (2017-02-16)
|
||||
|
||||
* Fixed #142: Documentation build errors if h1 is defined as raw HTML
|
||||
* Fixed #164: PyPI release does not build and install
|
||||
* Fixed offsets of targeted headlines
|
||||
* Increased sidebar font size by 0.12rem
|
||||
|
||||
mkdocs-material-1.0.3 (2017-01-22)
|
||||
|
||||
* Fixed #117: Table of contents items don't blur on fast scrolling
|
||||
* Refactored sidebar positioning logic
|
||||
* Further reduction of repaints
|
||||
|
||||
mkdocs-material-1.0.2 (2017-01-15)
|
||||
|
||||
* Fixed #108: Horizontal scrollbar in content area
|
||||
|
||||
mkdocs-material-1.0.1 (2017-01-14)
|
||||
|
||||
* Fixed massive repaints happening when scrolling
|
||||
* Fixed footer back reference positions in case of overflow
|
||||
* Fixed header logo from showing when the menu icon is rendered
|
||||
* Changed scrollbar behavior to only show when content overflows
|
||||
|
||||
mkdocs-material-1.0.0 (2017-01-13)
|
||||
|
||||
* Introduced Webpack for more sophisticated JavaScript bundling
|
||||
* Introduced ESLint and Stylelint for code style checks
|
||||
* Introduced more accurate Material Design colors and shadows
|
||||
* Introduced modular scales for harmonic font sizing
|
||||
* Introduced git-hooks for better development workflow
|
||||
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
|
||||
* Rewrite of JavaScript using ES6 and Babel as a transpiler
|
||||
* Rewrite of Admonition, Permalinks and CodeHilite integration
|
||||
* Rewrite of the complete typographical system
|
||||
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
|
||||
* Removed Bower as a dependency in favor of NPM
|
||||
* Removed custom icon build in favor of the Material Design iconset
|
||||
* Removed _blank targets on links due to vulnerability: http://bit.ly/1Mk2Rtw
|
||||
* Removed unversioned assets from build directory
|
||||
* Restructured templates into base templates and partials
|
||||
* Added build and watch scripts in package.json
|
||||
* Added support for Metadata and Footnotes Markdown extensions
|
||||
* Added support for PyMdown Extensions package
|
||||
* Added support for collapsible sections in navigation
|
||||
* Added support for separate table of contents
|
||||
* Added support for better accessibility through REM-based layout
|
||||
* Added icons for GitHub, GitLab and BitBucket integrations
|
||||
* Added more detailed documentation on specimen, extensions etc.
|
||||
* Added a 404.html error page for deployment on GitHub Pages
|
||||
* Fixed live reload chain in watch mode when saving a template
|
||||
* Fixed variable references to work with MkDocs 0.16
|
||||
|
||||
mkdocs-material-0.2.4 (2016-06-26)
|
||||
|
||||
* Fixed improperly set set default favicon
|
||||
* Fixed improperly set default favicon
|
||||
* Fixed #33: Protocol relative URL for webfonts doesn't work with file://
|
||||
* Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag
|
||||
* Fixed #35: Add styling for blockquotes
|
||||
@@ -13,7 +280,7 @@ mkdocs-material-0.2.3 (2016-05-16)
|
||||
|
||||
mkdocs-material-0.2.2 (2016-03-20)
|
||||
|
||||
* Fixed #15: Document pygments dependency for codehilite
|
||||
* Fixed #15: Document Pygments dependency for CodeHilite
|
||||
* Fixed #16: Favicon could not be set through mkdocs.yml
|
||||
* Fixed #17: Put version into own container for styling
|
||||
* Fixed #20: Fix rounded borders for tables
|
||||
@@ -53,11 +320,11 @@ mkdocs-material-0.1.2 (2016-02-16)
|
||||
mkdocs-material-0.1.1 (2016-02-11)
|
||||
|
||||
* Fixed #1: GitHub stars don't work if the repo_url ends with a '/'
|
||||
* Updated npm and bower dependencies to most recent versions
|
||||
* Updated NPM and Bower dependencies to most recent versions
|
||||
* Changed footer/copyright link to Material theme to GitHub pages
|
||||
* Made MkDocs building/serving in build process optional
|
||||
* Set up continuous integration with travis-ci.org
|
||||
* Set up continuous integration with Travis
|
||||
|
||||
mkdocs-material-0.1.0 (2016-02-09)
|
||||
|
||||
* Initial release
|
||||
* Initial release
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://gitter.im/squidfunk/mkdocs-material. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
@@ -0,0 +1,82 @@
|
||||
# Contributing
|
||||
|
||||
Interested in contributing to the Material theme? Want to report a bug? Before
|
||||
you do, please read the following guidelines.
|
||||
|
||||
## Submission context
|
||||
|
||||
### Got a question or problem?
|
||||
|
||||
For quick questions there's no need to open an issue as you can reach us on
|
||||
[gitter.im][1].
|
||||
|
||||
[1]: https://gitter.im/squidfunk/mkdocs-material
|
||||
|
||||
### Found a bug?
|
||||
|
||||
If you found a bug in the source code, you can help us by submitting an issue
|
||||
to the [issue tracker][2] in our GitHub repository. Even better, you can submit
|
||||
a Pull Request with a fix. However, before doing so, please read the
|
||||
[submission guidelines][3].
|
||||
|
||||
[2]: https://github.com/squidfunk/mkdocs-material/issues
|
||||
[3]: #submission-guidelines
|
||||
|
||||
### Missing a feature?
|
||||
|
||||
You can request a new feature by submitting an issue to our GitHub Repository.
|
||||
If you would like to implement a new feature, please submit an issue with a
|
||||
proposal for your work first, to be sure that it is of use for everyone, as
|
||||
the Material theme is highly opinionated. Please consider what kind of change
|
||||
it is:
|
||||
|
||||
* For a **major feature**, first open an issue and outline your proposal so
|
||||
that it can be discussed. This will also allow us to better coordinate our
|
||||
efforts, prevent duplication of work, and help you to craft the change so
|
||||
that it is successfully accepted into the project.
|
||||
|
||||
* **Small features and bugs** can be crafted and directly submitted as a Pull
|
||||
Request. However, there is no guarantee that your feature will make it into
|
||||
the master, as it's always a matter of opinion whether if benefits the
|
||||
overall functionality of the theme.
|
||||
|
||||
## Submission guidelines
|
||||
|
||||
### Submitting an issue
|
||||
|
||||
Before you submit an issue, please search the issue tracker, maybe an issue for
|
||||
your problem already exists and the discussion might inform you of workarounds
|
||||
readily available.
|
||||
|
||||
We want to fix all the issues as soon as possible, but before fixing a bug we
|
||||
need to reproduce and confirm it. In order to reproduce bugs we will
|
||||
systematically ask you to provide a minimal reproduction scenario using the
|
||||
custom issue template. Please stick to the issue template.
|
||||
|
||||
Unfortunately we are not able to investigate / fix bugs without a minimal
|
||||
reproduction scenario, so if we don't hear back from you we may close the issue.
|
||||
|
||||
### Submitting a Pull Request (PR)
|
||||
|
||||
Search GitHub for an open or closed PR that relates to your submission. You
|
||||
don't want to duplicate effort. If you do not find a related issue or PR,
|
||||
go ahead.
|
||||
|
||||
1. **Development**: Fork the project, set up the [development environment][4],
|
||||
make your changes in a separate git branch and add descriptive messages to
|
||||
your commits.
|
||||
|
||||
2. **Build**: Before submitting a pull requests, [build the theme][5]. This is
|
||||
a mandatory requirement for your PR to get accepted, as the theme should at
|
||||
all times be installable through GitHub.
|
||||
|
||||
3. **Pull Request**: After building the theme, commit the compiled output, push
|
||||
your branch to GitHub and send a PR to `mkdocs-material:master`. If we
|
||||
suggest changes, make the required updates, rebase your branch and push the
|
||||
changes to your GitHub repository, which will automatically update your PR.
|
||||
|
||||
After your PR is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository.
|
||||
|
||||
[4]: http://squidfunk.github.io/mkdocs-material/customization/#environment-setup
|
||||
[5]: http://squidfunk.github.io/mkdocs-material/customization/#build-process
|
||||
@@ -0,0 +1,47 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
FROM jfloff/alpine-python:2.7-slim
|
||||
MAINTAINER Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Set build directory
|
||||
WORKDIR /tmp
|
||||
|
||||
# Copy files necessary for build
|
||||
COPY material material
|
||||
COPY MANIFEST.in MANIFEST.in
|
||||
COPY package.json package.json
|
||||
COPY requirements.txt requirements.txt
|
||||
COPY setup.py setup.py
|
||||
|
||||
# Perform build and cleanup artifacts
|
||||
RUN \
|
||||
python setup.py install 2>/dev/null && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /docs
|
||||
|
||||
# Expose MkDocs development server port
|
||||
EXPOSE 8000
|
||||
|
||||
# Start development server by default
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
|
||||
@@ -0,0 +1,427 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import chalk from "chalk"
|
||||
import gulp from "gulp"
|
||||
import notifier from "node-notifier"
|
||||
import plumber from "gulp-plumber"
|
||||
import util from "gulp-util"
|
||||
import yargs from "yargs"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Configuration and arguments
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* General configuration */
|
||||
const config = {
|
||||
assets: {
|
||||
src: "src/assets", /* Source directory for assets */
|
||||
build: "material/assets" /* Target directory for assets */
|
||||
},
|
||||
lib: "lib", /* Libraries and tasks */
|
||||
views: {
|
||||
src: "src", /* Source directory for views */
|
||||
build: "material" /* Target directory for views */
|
||||
}
|
||||
}
|
||||
|
||||
/* Commandline arguments */
|
||||
let args = yargs
|
||||
.locale("en")
|
||||
.usage(`\n${chalk.yellow("Usage:")} yarn run <command> -- [options]`)
|
||||
.wrap(84)
|
||||
.updateStrings({
|
||||
"Commands:": chalk.yellow("Commands:"),
|
||||
"Examples:": chalk.yellow("Examples:")
|
||||
})
|
||||
|
||||
/* Commands */
|
||||
.command("build", chalk.grey("build assets and views"))
|
||||
.command("clean", chalk.grey("clean build artifacts"))
|
||||
.command("flow", chalk.grey("type check with flow"))
|
||||
.command("help", chalk.grey("display this message"))
|
||||
.command("lint", chalk.grey("lint sources"))
|
||||
.command("start", chalk.grey("start development server"))
|
||||
|
||||
/* Options */
|
||||
.group([
|
||||
"help", "clean"
|
||||
], chalk.yellow("Options:"))
|
||||
.help("help", chalk.grey("display this message"))
|
||||
.option("clean", {
|
||||
describe: chalk.grey("clean artifacts before command"),
|
||||
default: false,
|
||||
global: true
|
||||
})
|
||||
|
||||
/* Build options */
|
||||
.group([
|
||||
"lint", "optimize", "revision", "sourcemaps", "mkdocs"
|
||||
], chalk.yellow("Build Options:"))
|
||||
.option("lint", {
|
||||
describe: chalk.grey("lint sources before build"),
|
||||
default: true,
|
||||
global: true
|
||||
})
|
||||
.option("optimize", {
|
||||
describe: chalk.grey("optimize and minify assets"),
|
||||
default: false,
|
||||
global: true
|
||||
})
|
||||
.option("revision", {
|
||||
describe: chalk.grey("revision assets for cache busting"),
|
||||
default: false,
|
||||
global: true
|
||||
})
|
||||
.option("sourcemaps", {
|
||||
describe: chalk.grey("generate sourcemaps for assets"),
|
||||
default: false,
|
||||
global: true
|
||||
})
|
||||
.option("mkdocs", {
|
||||
describe: chalk.grey("build documentation or start watchdog"),
|
||||
default: true,
|
||||
global: true
|
||||
})
|
||||
|
||||
/* Example commands */
|
||||
.example("yarn run build")
|
||||
.example("yarn run build -- --no-optimize")
|
||||
.example("yarn run clean")
|
||||
.example("yarn run flow")
|
||||
.example("yarn run lint")
|
||||
.example("yarn run start")
|
||||
|
||||
/* Apply to process.argv */
|
||||
.argv
|
||||
|
||||
/* Only use the last seen value if boolean, so overrides are possible */
|
||||
args = Object.keys(args).reduce((result, arg) => {
|
||||
result[arg] = Array.isArray(args[arg]) && typeof args[arg][0] === "boolean"
|
||||
? [].concat(args[arg]).pop()
|
||||
: args[arg]
|
||||
return result
|
||||
}, {})
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Overrides and helpers
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Override gulp.src() for nicer error handling.
|
||||
*/
|
||||
const src = gulp.src
|
||||
gulp.src = (...glob) => {
|
||||
return src.apply(gulp, glob)
|
||||
.pipe(
|
||||
plumber(function(error) {
|
||||
util.log(util.colors.red(
|
||||
`Error (${error.plugin}): ${error.message}`
|
||||
))
|
||||
|
||||
/* Extract file where error happened, if existent */
|
||||
const file = error.relativePath
|
||||
? error.relativePath.split("/").pop()
|
||||
: ""
|
||||
|
||||
/* Dispatch system-level notification */
|
||||
notifier.notify({
|
||||
title: `Error (${error.plugin}): ${file}`,
|
||||
message: error.messageOriginal
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
this.emit("end")
|
||||
|
||||
/* Throw error and abort, if not in watch mode */
|
||||
if (args._[0] !== "watch")
|
||||
throw error
|
||||
}))
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to load a task
|
||||
*
|
||||
* This function returns a callback that will require the task with the given
|
||||
* name and execute the function that is returned by this task. It omits the
|
||||
* need to load all tasks upfront, speeding up the build a gazillion times.
|
||||
*/
|
||||
const load = task => {
|
||||
return done => {
|
||||
return require(`./${config.lib}/tasks/${task}`)
|
||||
.call(gulp, gulp, config, args)(done)
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Images
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Copy favicon
|
||||
*/
|
||||
gulp.task("assets:images:build:ico", [
|
||||
args.clean ? "assets:images:clean" : false
|
||||
].filter(Boolean), load("assets/images/build/ico"))
|
||||
|
||||
/*
|
||||
* Copy and minify vector graphics
|
||||
*/
|
||||
gulp.task("assets:images:build:svg", [
|
||||
args.clean ? "assets:images:clean" : false
|
||||
].filter(Boolean), load("assets/images/build/svg"))
|
||||
|
||||
/*
|
||||
* Copy images
|
||||
*/
|
||||
gulp.task("assets:images:build", [
|
||||
"assets:images:build:ico",
|
||||
"assets:images:build:svg"
|
||||
])
|
||||
|
||||
/*
|
||||
* Clean images generated by build
|
||||
*/
|
||||
gulp.task("assets:images:clean",
|
||||
load("assets/images/clean"))
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* JavaScript
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build application logic
|
||||
*
|
||||
* When revisioning assets, the build must be serialized due to possible race
|
||||
* conditions when two tasks try to write manifest.json simultaneously
|
||||
*/
|
||||
|
||||
gulp.task("assets:javascripts:build:application", [
|
||||
args.clean ? "assets:javascripts:clean" : false,
|
||||
args.lint ? "assets:javascripts:lint" : false,
|
||||
args.revision ? "assets:stylesheets:build" : false
|
||||
].filter(Boolean), load("assets/javascripts/build/application"))
|
||||
|
||||
/*
|
||||
* Build custom modernizr
|
||||
*
|
||||
* When revisioning assets, the build must be serialized due to possible race
|
||||
* conditions when two tasks try to write manifest.json simultaneously
|
||||
*/
|
||||
gulp.task("assets:javascripts:build:modernizr", [
|
||||
"assets:stylesheets:build",
|
||||
args.clean ? "assets:javascripts:clean" : false,
|
||||
args.lint ? "assets:javascripts:lint" : false,
|
||||
args.revision ? "assets:javascripts:build:application" : false
|
||||
].filter(Boolean), load("assets/javascripts/build/modernizr"))
|
||||
|
||||
/*
|
||||
* Build search language support files
|
||||
*/
|
||||
gulp.task("assets:javascripts:build:languages", [
|
||||
args.clean ? "assets:javascripts:clean" : false
|
||||
].filter(Boolean), load("assets/javascripts/build/languages"))
|
||||
|
||||
/*
|
||||
* Build JavaScript
|
||||
*/
|
||||
gulp.task("assets:javascripts:build", [
|
||||
"assets:javascripts:build:application",
|
||||
"assets:javascripts:build:modernizr",
|
||||
"assets:javascripts:build:languages"
|
||||
])
|
||||
|
||||
/*
|
||||
* Clean JavaScript generated by build
|
||||
*/
|
||||
gulp.task("assets:javascripts:clean",
|
||||
load("assets/javascripts/clean"))
|
||||
|
||||
/*
|
||||
* Annotate JavaScript
|
||||
*/
|
||||
gulp.task("assets:javascripts:annotate",
|
||||
load("assets/javascripts/annotate"))
|
||||
|
||||
/*
|
||||
* Lint JavaScript
|
||||
*/
|
||||
gulp.task("assets:javascripts:lint",
|
||||
load("assets/javascripts/lint"))
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Stylesheets
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build stylesheets from SASS source
|
||||
*/
|
||||
gulp.task("assets:stylesheets:build", [
|
||||
args.clean ? "assets:stylesheets:clean" : false,
|
||||
args.lint ? "assets:stylesheets:lint" : false
|
||||
].filter(Boolean), load("assets/stylesheets/build"))
|
||||
|
||||
/*
|
||||
* Clean stylesheets generated by build
|
||||
*/
|
||||
gulp.task("assets:stylesheets:clean",
|
||||
load("assets/stylesheets/clean"))
|
||||
|
||||
/*
|
||||
* Lint SASS sources
|
||||
*/
|
||||
gulp.task("assets:stylesheets:lint",
|
||||
load("assets/stylesheets/lint"))
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Assets
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build assets
|
||||
*/
|
||||
gulp.task("assets:build", [
|
||||
"assets:images:build",
|
||||
"assets:javascripts:build",
|
||||
"assets:stylesheets:build"
|
||||
])
|
||||
|
||||
/*
|
||||
* Clean files generated by build
|
||||
*/
|
||||
gulp.task("assets:clean", [
|
||||
"assets:images:clean",
|
||||
"assets:javascripts:clean",
|
||||
"assets:stylesheets:clean"
|
||||
])
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Views
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Minify views
|
||||
*/
|
||||
|
||||
gulp.task("views:build", [
|
||||
args.clean ? "views:clean" : false,
|
||||
args.revision ? "assets:images:build" : false,
|
||||
args.revision ? "assets:stylesheets:build" : false,
|
||||
args.revision ? "assets:javascripts:build" : false
|
||||
].filter(Boolean), load("views/build"))
|
||||
|
||||
/*
|
||||
* Clean views
|
||||
*/
|
||||
gulp.task("views:clean",
|
||||
load("views/clean"))
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* MkDocs
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build documentation
|
||||
*/
|
||||
gulp.task("mkdocs:build", [
|
||||
"assets:build",
|
||||
"views:build",
|
||||
"mkdocs:clean"
|
||||
], load("mkdocs/build"))
|
||||
|
||||
/*
|
||||
* Clean documentation build
|
||||
*/
|
||||
gulp.task("mkdocs:clean",
|
||||
load("mkdocs/clean"))
|
||||
|
||||
/*
|
||||
* Restart MkDocs server
|
||||
*/
|
||||
gulp.task("mkdocs:serve",
|
||||
load("mkdocs/serve"))
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Interface
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build assets and documentation
|
||||
*/
|
||||
gulp.task("build", [
|
||||
"assets:build",
|
||||
"views:build",
|
||||
args.mkdocs ? "mkdocs:build" : false
|
||||
].filter(f => f))
|
||||
|
||||
/*
|
||||
* Clean assets and documentation
|
||||
*/
|
||||
gulp.task("clean", [
|
||||
"assets:clean",
|
||||
"views:clean",
|
||||
"mkdocs:clean"
|
||||
])
|
||||
|
||||
/*
|
||||
* Watch for changes and rebuild assets on the fly
|
||||
*/
|
||||
gulp.task("watch", [
|
||||
"assets:build",
|
||||
"views:build"
|
||||
], () => {
|
||||
process.env.WATCH = true
|
||||
|
||||
/* Start MkDocs server */
|
||||
if (args.mkdocs)
|
||||
gulp.start("mkdocs:serve")
|
||||
|
||||
/* Rebuild stylesheets */
|
||||
gulp.watch([
|
||||
`${config.assets.src}/stylesheets/**/*.scss`
|
||||
], ["assets:stylesheets:build"])
|
||||
|
||||
/* Rebuild JavaScript */
|
||||
gulp.watch([
|
||||
`${config.assets.src}/javascripts/**/*.{js,jsx}`
|
||||
], ["assets:javascripts:build:application"])
|
||||
|
||||
/* Copy images */
|
||||
gulp.watch([
|
||||
`${config.assets.src}/images/**/*`
|
||||
], ["assets:images:build"])
|
||||
|
||||
/* Minify views */
|
||||
gulp.watch([
|
||||
`${config.views.src}/**/*.html`
|
||||
], ["views:build"])
|
||||
})
|
||||
|
||||
/*
|
||||
* Print help message
|
||||
*/
|
||||
gulp.task("help")
|
||||
|
||||
/*
|
||||
* Build assets by default
|
||||
*/
|
||||
gulp.task("default", ["build"])
|
||||
@@ -1,332 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Imports
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
var gulp = require('gulp');
|
||||
var addsrc = require('gulp-add-src');
|
||||
var args = require('yargs').argv;
|
||||
var autoprefix = require('autoprefixer');
|
||||
var child = require('child_process');
|
||||
var clean = require('del');
|
||||
var collect = require('gulp-rev-collector');
|
||||
var compact = require('gulp-remove-empty-lines');
|
||||
var concat = require('gulp-concat');
|
||||
var ignore = require('gulp-ignore');
|
||||
var gulpif = require('gulp-if');
|
||||
var mincss = require('gulp-cssnano');
|
||||
var minhtml = require('gulp-htmlmin');
|
||||
var minimage = require('gulp-image-optimization');
|
||||
var modernizr = require('gulp-modernizr');
|
||||
var mqpacker = require('css-mqpacker');
|
||||
var notifier = require('node-notifier');
|
||||
var plumber = require('gulp-plumber');
|
||||
var postcss = require('gulp-postcss');
|
||||
var rev = require('gulp-rev');
|
||||
var sass = require('gulp-sass');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var uglify = require('gulp-uglify');
|
||||
var util = require('gulp-util');
|
||||
var vinyl = require('vinyl-paths');
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Locals
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* MkDocs server */
|
||||
var server = null;
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Overrides
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Override gulp.src() for nicer error handling.
|
||||
*/
|
||||
var src = gulp.src;
|
||||
gulp.src = function() {
|
||||
return src.apply(gulp, arguments)
|
||||
.pipe(
|
||||
plumber(function(error) {
|
||||
util.log(util.colors.red(
|
||||
'Error (' + error.plugin + '): ' + error.message
|
||||
));
|
||||
notifier.notify({
|
||||
title: 'Error (' + error.plugin + ')',
|
||||
message: error.message.split('\n')[0]
|
||||
});
|
||||
this.emit('end');
|
||||
}));
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Asset pipeline
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build stylesheets from SASS source.
|
||||
*/
|
||||
gulp.task('assets:stylesheets', function() {
|
||||
return gulp.src('src/assets/stylesheets/*.scss')
|
||||
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
|
||||
.pipe(
|
||||
sass({
|
||||
includePaths: [
|
||||
'bower_components/bourbon/app/assets/stylesheets/',
|
||||
'bower_components/quantum-colors/',
|
||||
'bower_components/quantum-shadows/'
|
||||
]
|
||||
}))
|
||||
.pipe(
|
||||
postcss([
|
||||
autoprefix(),
|
||||
mqpacker
|
||||
]))
|
||||
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
|
||||
.pipe(gulpif(args.production, mincss()))
|
||||
.pipe(gulp.dest('material/assets/stylesheets/'));
|
||||
});
|
||||
|
||||
/*
|
||||
* Build javascripts from Bower components and source.
|
||||
*/
|
||||
gulp.task('assets:javascripts', function() {
|
||||
return gulp.src([
|
||||
|
||||
/* Bower components */
|
||||
'bower_components/classlist/classList.js',
|
||||
'bower_components/fastclick/lib/fastclick.js',
|
||||
'bower_components/pegasus/dist/pegasus.js',
|
||||
'bower_components/lunr.js/lunr.js',
|
||||
|
||||
/* Application javascripts */
|
||||
'src/assets/javascripts/application.js',
|
||||
'src/assets/javascripts/standalone.js'
|
||||
]).pipe(gulpif(args.sourcemaps, sourcemaps.init()))
|
||||
.pipe(concat('application.js'))
|
||||
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
|
||||
.pipe(gulpif(args.production, uglify()))
|
||||
.pipe(gulp.dest('material/assets/javascripts/'));
|
||||
});
|
||||
|
||||
/*
|
||||
* Create a customized modernizr build.
|
||||
*/
|
||||
gulp.task('assets:modernizr', [
|
||||
'assets:stylesheets',
|
||||
'assets:javascripts'
|
||||
], function() {
|
||||
return gulp.src([
|
||||
'material/assets/stylesheets/application.css',
|
||||
'material/assets/javascripts/application.js'
|
||||
]).pipe(
|
||||
modernizr({
|
||||
options: [
|
||||
'addTest', /* Add custom tests */
|
||||
'fnBind', /* Use function.bind */
|
||||
'html5printshiv', /* HTML5 support for IE */
|
||||
'setClasses', /* Add CSS classes to root tag */
|
||||
'testProp' /* Test for properties */
|
||||
]
|
||||
}))
|
||||
.pipe(addsrc.append('bower_components/respond/dest/respond.src.js'))
|
||||
.pipe(concat('modernizr.js'))
|
||||
.pipe(gulpif(args.production, uglify()))
|
||||
.pipe(gulp.dest('material/assets/javascripts'));
|
||||
});
|
||||
|
||||
/*
|
||||
* Copy static assets like images and webfonts.
|
||||
*/
|
||||
gulp.task('assets:static', function() {
|
||||
return gulp.src('src/assets/{fonts,images}/*.{jpg,png,gif}')
|
||||
.pipe(gulpif(args.production,
|
||||
minimage({
|
||||
optimizationLevel: 5,
|
||||
progressive: true,
|
||||
interlaced: true
|
||||
})))
|
||||
.pipe(addsrc.append('src/assets/{fonts,images}/*.{ico,eot,svg,ttf,woff}'))
|
||||
.pipe(gulp.dest('material/assets/'));
|
||||
});
|
||||
|
||||
/*
|
||||
* Minify views.
|
||||
*/
|
||||
gulp.task('assets:views', args.production ? [
|
||||
'assets:modernizr',
|
||||
'assets:revisions:clean',
|
||||
'assets:revisions'
|
||||
] : [], function() {
|
||||
return gulp.src([
|
||||
'src/*.html'
|
||||
]).pipe(
|
||||
minhtml({
|
||||
collapseBooleanAttributes: true,
|
||||
removeComments: true,
|
||||
removeScriptTypeAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true
|
||||
}))
|
||||
.pipe(compact())
|
||||
.pipe(gulpif(args.production,
|
||||
addsrc.append([
|
||||
'material/manifest.json',
|
||||
'material/**/*.css'
|
||||
])))
|
||||
.pipe(gulpif(args.production, collect()))
|
||||
.pipe(ignore.exclude(/manifest\.json$/))
|
||||
.pipe(gulp.dest('material'));
|
||||
});
|
||||
|
||||
/*
|
||||
* Clean outdated revisions.
|
||||
*/
|
||||
gulp.task('assets:revisions:clean', function() {
|
||||
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
|
||||
.pipe(ignore.include(/-[a-f0-9]{8,}\.(ico|css|js|png|jpg|gif)$/))
|
||||
.pipe(vinyl(clean));
|
||||
});
|
||||
|
||||
/*
|
||||
* Revision assets after build.
|
||||
*/
|
||||
gulp.task('assets:revisions', [
|
||||
'assets:revisions:clean',
|
||||
'assets:stylesheets',
|
||||
'assets:javascripts',
|
||||
'assets:static'
|
||||
], function() {
|
||||
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
|
||||
.pipe(ignore.exclude(/-[a-f0-9]{8,}\.(css|js|png|jpg|gif)$/))
|
||||
.pipe(rev())
|
||||
.pipe(gulp.dest('material'))
|
||||
.pipe(rev.manifest('manifest.json'))
|
||||
.pipe(gulp.dest('material'));
|
||||
});
|
||||
|
||||
/*
|
||||
* Build assets.
|
||||
*/
|
||||
gulp.task('assets:build', [
|
||||
'assets:stylesheets',
|
||||
'assets:javascripts',
|
||||
'assets:modernizr',
|
||||
'assets:static',
|
||||
'assets:views'
|
||||
]);
|
||||
|
||||
/*
|
||||
* Watch assets for changes and rebuild on the fly.
|
||||
*/
|
||||
gulp.task('assets:watch', function() {
|
||||
|
||||
/* Rebuild stylesheets */
|
||||
gulp.watch([
|
||||
'src/assets/stylesheets/**/*.scss'
|
||||
], ['assets:stylesheets']);
|
||||
|
||||
/* Rebuild javascripts */
|
||||
gulp.watch([
|
||||
'src/assets/javascripts/**/*.js',
|
||||
'bower.json'
|
||||
], ['assets:javascripts']);
|
||||
|
||||
/* Copy static assets */
|
||||
gulp.watch([
|
||||
'src/assets/{fonts,images}/*'
|
||||
], ['assets:static']);
|
||||
|
||||
/* Minify views */
|
||||
gulp.watch([
|
||||
'src/*.html'
|
||||
], ['assets:views']);
|
||||
});
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Application server
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build documentation.
|
||||
*/
|
||||
gulp.task('mkdocs:build', [
|
||||
'assets:build'
|
||||
], function() {
|
||||
return child.spawnSync('mkdocs', ['build']);
|
||||
});
|
||||
|
||||
/*
|
||||
* Restart MkDocs server.
|
||||
*/
|
||||
gulp.task('mkdocs:serve', function() {
|
||||
if (server)
|
||||
server.kill();
|
||||
|
||||
/* Spawn MkDocs server */
|
||||
server = child.spawn('mkdocs', ['serve', '-a', '0.0.0.0:8000']);
|
||||
|
||||
/* Pretty print server log output */
|
||||
server.stdout.on('data', function(data) {
|
||||
var lines = data.toString().split('\n')
|
||||
for (var l in lines)
|
||||
if (lines[l].length)
|
||||
util.log(lines[l]);
|
||||
});
|
||||
|
||||
/* Print errors to stdout */
|
||||
server.stderr.on('data', function(data) {
|
||||
process.stdout.write(data.toString());
|
||||
});
|
||||
});
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Interface
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Build assets and documentation.
|
||||
*/
|
||||
gulp.task('build', [
|
||||
'assets:build'
|
||||
].concat(args.mkdocs
|
||||
? 'mkdocs:build'
|
||||
: []));
|
||||
|
||||
/*
|
||||
* Start asset and MkDocs watchdogs.
|
||||
*/
|
||||
gulp.task('watch', [
|
||||
'assets:build',
|
||||
], function() {
|
||||
return gulp.start([
|
||||
'assets:watch'
|
||||
].concat(args.mkdocs
|
||||
? 'mkdocs:serve'
|
||||
: []));
|
||||
});
|
||||
|
||||
/*
|
||||
* Build assets by default.
|
||||
*/
|
||||
gulp.task('default', ['build']);
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
recursive-include material *.ico *.js *.css *.html *.eot *.svg *.ttf *.woff
|
||||
recursive-exclude site *
|
||||
recursive-include material *.ico *.js *.css *.html *.svg
|
||||
recursive-exclude site *
|
||||
recursive-exclude * __pycache__
|
||||
recursive-exclude * *.py[co]
|
||||
include LICENSE
|
||||
include package.json
|
||||
include requirements.txt
|
||||
|
||||
@@ -1,26 +1,57 @@
|
||||
# Material
|
||||
[![Travis][travis-image]][travis-link]
|
||||
[![Gitter][gitter-image]][gitter-link]
|
||||
[![Codacy][codacy-image]][codacy-link]
|
||||
[![Docker][docker-image]][docker-link]
|
||||
[![PyPI][pypi-image]][pypi-link]
|
||||
|
||||
[![Travis CI][travis-image]][travis-link]
|
||||
[![PyPI Version][pypi-v-image]][pypi-v-link]
|
||||
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg?branch=master
|
||||
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
|
||||
[gitter-image]: https://img.shields.io/gitter/room/squidfunk/mkdocs-material.svg
|
||||
[gitter-link]: https://gitter.im/squidfunk/mkdocs-material
|
||||
[codacy-image]: https://api.codacy.com/project/badge/Grade/fe07aa1fa91d453cb69711d3885c5d7e
|
||||
[codacy-link]: https://www.codacy.com/app/squidfunk/mkdocs-material?utm_source=github.com&utm_medium=referral&utm_content=squidfunk/mkdocs-material&utm_campaign=Badge_Grade
|
||||
[docker-image]: https://img.shields.io/docker/pulls/squidfunk/mkdocs-material.svg
|
||||
[docker-link]: https://hub.docker.com/r/squidfunk/mkdocs-material/
|
||||
[pypi-image]: https://img.shields.io/pypi/v/mkdocs-material.svg
|
||||
[pypi-link]: https://pypi.python.org/pypi/mkdocs-material
|
||||
|
||||
A material design theme for [MkDocs](http://www.mkdocs.org).
|
||||
# Material for MkDocs
|
||||
|
||||
[](http://squidfunk.github.io/mkdocs-material/)
|
||||
A Material Design theme for [MkDocs][1].
|
||||
|
||||
[][2]
|
||||
|
||||
[1]: http://www.mkdocs.org
|
||||
[2]: http://squidfunk.github.io/mkdocs-material/
|
||||
|
||||
## Quick start
|
||||
|
||||
Install with `pip`:
|
||||
Install the latest version of Material with `pip`:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs-material
|
||||
```
|
||||
|
||||
Add the following line to your `mkdocs.yml`:
|
||||
Append the following line to your project's `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
theme: 'material'
|
||||
```
|
||||
|
||||
## What to expect
|
||||
|
||||
* Responsive design and fluid layout for all kinds of screens and devices,
|
||||
designed to serve your project documentation in a user-friendly way with
|
||||
optimal readability.
|
||||
|
||||
* Easily customizable primary and accent color, fonts, favicon and logo;
|
||||
straight forward localization through theme extension; integrated with Google
|
||||
Analytics, Disqus and GitHub.
|
||||
|
||||
* Well-designed search interface accessible through hotkeys (<kbd>F</kbd> or
|
||||
<kbd>S</kbd>), intelligent grouping of search results, search term
|
||||
highlighting and lazy loading.
|
||||
|
||||
For detailed installation instructions and a demo, visit
|
||||
http://squidfunk.github.io/mkdocs-material/
|
||||
|
||||
@@ -28,7 +59,7 @@ http://squidfunk.github.io/mkdocs-material/
|
||||
|
||||
**MIT License**
|
||||
|
||||
Copyright (c) 2016 Martin Donath
|
||||
Copyright (c) 2016-2017 Martin Donath
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
@@ -47,8 +78,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
||||
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg
|
||||
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
|
||||
[pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png
|
||||
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "0.2.4",
|
||||
"description": "A material design theme for MkDocs",
|
||||
"homepage": "http://squidfunk.github.io/mkdocs-material/",
|
||||
"authors": [
|
||||
"squidfunk <martin.donath@squidfunk.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"bower_components",
|
||||
"node_modules"
|
||||
],
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"classlist": "^2014.12.13",
|
||||
"fastclick": "^1.0.6",
|
||||
"lunr.js": "^0.6.0",
|
||||
"pegasus": "^0.3.2",
|
||||
"respond": "^1.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bourbon": "^4.2.6",
|
||||
"quantum-colors": "^1.0.1",
|
||||
"quantum-shadows": "^1.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
../CONTRIBUTING.md
|
||||
@@ -1,104 +1,245 @@
|
||||
# Customization
|
||||
|
||||
## A good starting point
|
||||
## A great starting point
|
||||
|
||||
Project documentation is as diverse as the projects themselves and the Material
|
||||
theme is a good starting point for making it look good. However, as you write
|
||||
your documentation, you may reach some point where some small adjustments are
|
||||
necessary to preserve the style.
|
||||
theme is a good starting point for making it look great. However, as you write
|
||||
your documentation, you may reach a point where some small adjustments are
|
||||
necessary to preserve the desired style.
|
||||
|
||||
## Small tweaks
|
||||
## Adding assets
|
||||
|
||||
[MkDocs][] provides a simple way for making small adjustments, that is changing
|
||||
some margins, centering text, etc. Simply put the CSS and Javascript files that
|
||||
contain your adjustments in the `docs` directory (ideally in subdirectories of
|
||||
their own) and include them via the `extra_css` and `extra_javascript`
|
||||
variables in your `mkdocs.yml`:
|
||||
[MkDocs][1] provides several ways to interfere with themes. In order to make a
|
||||
few tweaks to an existing theme, you can just add your stylesheets and
|
||||
JavaScript files to the `docs` directory.
|
||||
|
||||
``` yaml
|
||||
extra_css: ['/stylesheets/extra.css']
|
||||
extra_javascript: ['/javascripts/extra.js']
|
||||
```
|
||||
[1]: http://www.mkdocs.org
|
||||
|
||||
Further assistance on including extra CSS and Javascript can be found in the
|
||||
[MkDocs documentation][].
|
||||
### Additional stylesheets
|
||||
|
||||
## Fundamental changes
|
||||
|
||||
If you want to make larger adjustments like changing the color palette or
|
||||
typography, you should check out or download the repository of the project and
|
||||
compile the SASS sources with your changes. The project design is very modular,
|
||||
so most things can be tweaked by changing a few variables.
|
||||
|
||||
### Setup
|
||||
|
||||
In order to compile the project, you need `node` with a version greater than
|
||||
`0.11` up and running. Then, make sure `bower` is installed or install it:
|
||||
If you want to tweak some colors or change the spacing of certain elements,
|
||||
you can do this in a separate stylesheet. The easiest way is by creating a
|
||||
new stylesheet file in your `docs` directory:
|
||||
|
||||
``` sh
|
||||
npm install -g bower
|
||||
mkdir docs/stylesheets
|
||||
touch docs/stylesheets/extra.css
|
||||
```
|
||||
|
||||
The project itself is hosted on GitHub, so the next
|
||||
thing you should do is clone the project from GitHub:
|
||||
Then, add the following line to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra_css:
|
||||
- 'stylesheets/extra.css'
|
||||
```
|
||||
|
||||
Spin up the development server with `mkdocs serve` and start typing your
|
||||
changes in your additional stylesheet file – you can see them instantly after
|
||||
saving, as the MkDocs development server implements live reloading.
|
||||
|
||||
### Additional JavaScript
|
||||
|
||||
The same is true for additional JavaScript. If you want to integrate another
|
||||
syntax highlighter or add some custom logic to your theme, create a new
|
||||
JavaScript file in your `docs` directory:
|
||||
|
||||
``` sh
|
||||
mkdir docs/javascripts
|
||||
touch docs/javascripts/extra.js
|
||||
```
|
||||
|
||||
Then, add the following line to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'javascripts/extra.js'
|
||||
```
|
||||
|
||||
Further assistance can be found in the [MkDocs documentation][2].
|
||||
|
||||
[2]: http://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme
|
||||
|
||||
## Extending the theme
|
||||
|
||||
If you want to alter the HTML source (e.g. add or remove some part), you can
|
||||
extend the theme. From version 0.16 on MkDocs implements [theme extension][3],
|
||||
an easy way to override parts of a theme without forking and changing the
|
||||
main theme.
|
||||
|
||||
[3]: http://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme_dir
|
||||
|
||||
### Setup and theme structure
|
||||
|
||||
Reference the Material theme as usual in your `mkdocs.yml`, and create a
|
||||
new folder for overrides, e.g. `theme`, which you reference using `theme_dir`:
|
||||
|
||||
``` yaml
|
||||
theme: 'material'
|
||||
theme_dir: 'theme'
|
||||
```
|
||||
|
||||
!!! warning "Theme extension prerequisites"
|
||||
|
||||
As the `theme_dir` variable is used for the theme extension process, the
|
||||
Material theme needs to be installed via `pip` and referenced with the
|
||||
`theme` parameter in your `mkdocs.yml`.
|
||||
|
||||
The structure in the theme directory must mirror the directory structure of the
|
||||
original theme, as any file in the theme directory will replace the file with
|
||||
the same name which is part of the original theme. Besides, further assets
|
||||
may also be put in the theme directory.
|
||||
|
||||
The directory layout of the Material theme is as follows:
|
||||
|
||||
``` sh
|
||||
.
|
||||
├─ assets/
|
||||
│ ├─ images/ # Images and icons
|
||||
│ ├─ javascripts/ # JavaScript
|
||||
│ └─ stylesheets/ # Stylesheets
|
||||
├─ partials/
|
||||
│ ├─ disqus.html # Disqus integration
|
||||
│ ├─ footer.html # Footer bar
|
||||
│ ├─ header.html # Header bar
|
||||
│ ├─ language.html # Localized labels
|
||||
│ ├─ nav-item.html # Main navigation item
|
||||
│ ├─ nav.html # Main navigation
|
||||
│ ├─ search.html # Search box
|
||||
│ ├─ social.html # Social links
|
||||
│ ├─ source.html # Repository information
|
||||
│ ├─ tabs-item.html # Tabs navigation item
|
||||
│ ├─ tabs.html # Tabs navigation
|
||||
│ ├─ toc-item.html # Table of contents item
|
||||
│ └─ toc.html # Table of contents
|
||||
├─ 404.html # 404 error page
|
||||
├─ base.html # Base template
|
||||
└─ main.html # Default page
|
||||
```
|
||||
|
||||
### Overriding partials
|
||||
|
||||
In order to override the footer, we can replace the `footer.html` partial with
|
||||
our own partial. To do this, create the file `partials/footer.html` in the
|
||||
theme directory. MkDocs will now use the new partial when rendering the theme.
|
||||
This can be done with any file.
|
||||
|
||||
### Overriding template blocks
|
||||
|
||||
Besides overriding partials, one can also override so called template blocks,
|
||||
which are defined inside the Material theme and wrap specific features. To
|
||||
override a template block, create a `main.html` inside the theme directory and
|
||||
define the block, e.g.:
|
||||
|
||||
``` jinja
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block htmltitle %}
|
||||
<title>Lorem ipsum dolor sit amet</title>
|
||||
{% endblock %}
|
||||
```
|
||||
|
||||
The Material theme provides the following template blocks:
|
||||
|
||||
| Block name | Wrapped contents |
|
||||
| ------------ | ----------------------------------------------- |
|
||||
| `analytics` | Wraps the Google Analytics integration |
|
||||
| `content` | Wraps the main content |
|
||||
| `disqus` | Wraps the disqus integration |
|
||||
| `extrahead` | Empty block to define additional meta tags |
|
||||
| `fonts` | Wraps the webfont definitions |
|
||||
| `footer` | Wraps the footer with navigation and copyright |
|
||||
| `header` | Wraps the fixed header bar |
|
||||
| `htmltitle` | Wraps the `<title>` tag |
|
||||
| `libs` | Wraps the JavaScript libraries, e.g. Modernizr |
|
||||
| `repo` | Wraps the repository link in the header bar |
|
||||
| `scripts` | Wraps the JavaScript application logic |
|
||||
| `source` | Wraps the linked source files |
|
||||
| `search_box` | Wraps the search form in the header bar |
|
||||
| `site_meta` | Wraps the meta tags in the document head |
|
||||
| `site_name` | Wraps the site name in the header bar |
|
||||
| `site_nav` | Wraps the site navigation and table of contents |
|
||||
| `social` | Wraps the social links in the footer |
|
||||
| `styles` | Wraps the stylesheets (also extra sources) |
|
||||
|
||||
For more on this topic refer to the [MkDocs documentation][4]
|
||||
|
||||
[4]: http://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
|
||||
|
||||
## Theme development
|
||||
|
||||
The Material theme is built on modern technologies like ES6, [Webpack][5],
|
||||
[Babel][6] and [SASS][7]. If you want to make more fundamental changes, it may
|
||||
be necessary to make the adjustments directly in the source of the Material
|
||||
theme and recompile it. This is fairly easy.
|
||||
|
||||
[5]: https://webpack.github.io/
|
||||
[6]: https://babeljs.io
|
||||
[7]: http://sass-lang.com
|
||||
|
||||
### Environment setup
|
||||
|
||||
In order to start development on the Material theme, a [Node.js][8] version of
|
||||
at least 5 is required, as well as the package manager [yarn][9] which is a
|
||||
better version of `npm`. First, clone the repository:
|
||||
|
||||
``` sh
|
||||
git clone https://github.com/squidfunk/mkdocs-material
|
||||
```
|
||||
|
||||
Then you change the directory and install all dependencies specified in the
|
||||
`package.json` and `bower.json` with the following command:
|
||||
Next, all dependencies need to be installed, which is done with:
|
||||
|
||||
``` sh
|
||||
cd mkdocs-material
|
||||
npm install && bower install
|
||||
pip install -r requirements.txt
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Development
|
||||
[8]: https://nodejs.org
|
||||
[9]: https://yarnpkg.com/
|
||||
|
||||
The asset pipeline is contained in `Gulpfile.js`, which you can start with
|
||||
`gulp watch`. If you specify the `--mkdocs` flag, this will also run
|
||||
`mkdocs serve`, to monitor changes to the documentation. Point your browser to [localhost:8000](http://localhost:8000) and you should see this very
|
||||
documentation in front of your eyes.
|
||||
### Development mode
|
||||
|
||||
The Material theme uses a sophisticated asset pipeline using [Gulp][10] and
|
||||
Webpack which can be started with the following command:
|
||||
|
||||
``` sh
|
||||
gulp watch --mkdocs
|
||||
yarn start
|
||||
```
|
||||
|
||||
For example, changing the color palette is as simple as changing the `$primary`
|
||||
and `$accent` variables in `src/assets/stylesheets/_palette.scss`:
|
||||
This will also start the MkDocs development server which will monitor changes
|
||||
on assets, templates and documentation. Point your browser to
|
||||
[localhost:8000][11] and you should see this documentation in front of you.
|
||||
|
||||
For example, changing the color palette is as simple as changing the
|
||||
`$md-color-primary` and `$md-color-accent` variables in
|
||||
`src/assets/stylesheets/_config.scss`:
|
||||
|
||||
``` css
|
||||
$primary: $red-400;
|
||||
$accent: $teal-a700;
|
||||
$md-color-primary: $clr-red-400;
|
||||
$md-color-accent: $clr-teal-a700;
|
||||
```
|
||||
|
||||
The color variables are defined by the SASS library [quantum-colors][] and
|
||||
resemble all the colors contained in the material design palette.
|
||||
[This page][material-colors] offers a really good overview of the palette.
|
||||
!!! warning "Automatically generated files"
|
||||
|
||||
### Building
|
||||
Never make any changes in the `material` directory, as the contents of this
|
||||
directory are automatically generated from the `src` directory and will be
|
||||
overriden when the theme is built.
|
||||
|
||||
When you finished making your changes, you can build the theme by invoking:
|
||||
[10]: http://gulpjs.com
|
||||
[11]: http://localhost:8000
|
||||
|
||||
### Build process
|
||||
|
||||
When you've finished making your changes, you can build the theme by invoking:
|
||||
|
||||
``` sh
|
||||
gulp build --production
|
||||
yarn run build
|
||||
```
|
||||
|
||||
The `--production` flag triggers the production-level compilation and
|
||||
minification of all CSS and Javascript sources. When the command is ready,
|
||||
the final theme is located in the `material` directory. Add the `theme_dir`
|
||||
variable pointing to the aforementioned directory in your original
|
||||
`mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
theme_dir: 'mkdocs-material/material'
|
||||
```
|
||||
This triggers the production-level compilation and minification of all
|
||||
stylesheets and JavaScript sources. When the command exits, the final theme is
|
||||
located in the `material` directory. Add the `theme_dir` variable pointing to
|
||||
the aforementioned directory in your original `mkdocs.yml`.
|
||||
|
||||
Now you can run `mkdocs build` and you should see your documentation with your
|
||||
changes to the original Material theme.
|
||||
|
||||
[MkDocs]: http://www.mkdocs.org
|
||||
[MkDocs documentation]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
|
||||
[quantum-colors]: https://github.com/nkpfstr/quantum-colors
|
||||
[material-colors]: http://www.materialui.co/colors
|
||||
@@ -0,0 +1,432 @@
|
||||
# Admonition
|
||||
|
||||
[Admonition][1] is an extension included in the standard Markdown library that
|
||||
makes it possible to add block-styled side content to your documentation, for
|
||||
example summaries, notes, hints or warnings.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/admonition.html
|
||||
|
||||
## Installation
|
||||
|
||||
Add the following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Admonition blocks follow a simple syntax: every block is started with `!!!`,
|
||||
followed by a single keyword which is used as the [type qualifier][2] of the
|
||||
block. The content of the block then follows on the next line, indented by
|
||||
four spaces.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! note
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! note
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
[2]: #types
|
||||
|
||||
### Changing the title
|
||||
|
||||
By default, the block title will equal the type qualifier in titlecase. However,
|
||||
it can easily be changed by adding a quoted string after the type qualifier.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! note "Phasellus posuere in sem ut cursus"
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! note "Phasellus posuere in sem ut cursus"
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
### Removing the title
|
||||
|
||||
Similar to setting a [custom title][3], the icon and title can be omitted by
|
||||
providing an empty string after the type qualifier:
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! note ""
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! note ""
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
[3]: #changing-the-title
|
||||
|
||||
### Embedded code blocks
|
||||
|
||||
Blocks can contain all kinds of text content, including headlines, lists,
|
||||
paragraphs and other blocks – except code blocks, because the parser from the
|
||||
standard Markdown library does not account for those.
|
||||
|
||||
However, the [PyMdown Extensions][4] package adds an extension called
|
||||
[SuperFences][5], which makes it possible to nest code blocks within other
|
||||
blocks, respectively Admonition blocks.
|
||||
|
||||
[4]: https://facelessuser.github.io/pymdown-extensions
|
||||
[5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
|
||||
|
||||
Example:
|
||||
|
||||
!!! note
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
``` mysql
|
||||
SELECT
|
||||
Employees.EmployeeID,
|
||||
Employees.Name,
|
||||
Employees.Salary,
|
||||
Manager.Name AS Manager
|
||||
FROM
|
||||
Employees
|
||||
LEFT JOIN
|
||||
Employees AS Manager
|
||||
ON
|
||||
Employees.ManagerID = Manager.EmployeeID
|
||||
WHERE
|
||||
Employees.EmployeeID = '087652';
|
||||
```
|
||||
|
||||
Nunc eu odio eleifend, blandit leo a, volutpat sapien. Phasellus posuere in
|
||||
sem ut cursus. Nullam sit amet tincidunt ipsum, sit amet elementum turpis.
|
||||
Etiam ipsum quam, mattis in purus vitae, lacinia fermentum enim.
|
||||
|
||||
### Collapsible blocks
|
||||
|
||||
The [Details][6] extension which is also part of the [PyMdown Extensions][4]
|
||||
package adds support for rendering collapsible Admonition blocks. This is
|
||||
useful for FAQs or content that is of secondary nature.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
??? note "Phasellus posuere in sem ut cursus"
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
??? note "Phasellus posuere in sem ut cursus"
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
By adding a `+` sign directly after the start marker, blocks can be rendered
|
||||
open by default.
|
||||
|
||||
[6]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
|
||||
|
||||
## Types
|
||||
|
||||
Admonition supports user-defined type qualifiers which may influence the style
|
||||
of the inserted block. Following is a list of type qualifiers provided by the
|
||||
Material theme, whereas the default type, and thus fallback for unknown type
|
||||
qualifiers, is `note`.
|
||||
|
||||
### Note
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! note
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! note
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `note`
|
||||
* `seealso`
|
||||
|
||||
### Summary
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! summary
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! summary
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `summary`
|
||||
* `tldr`
|
||||
|
||||
### Info
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! info
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! info
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `info`
|
||||
* `todo`
|
||||
|
||||
### Tip
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! tip
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! tip
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `tip`
|
||||
* `hint`
|
||||
* `important`
|
||||
|
||||
### Success
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! success
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! success
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `success`
|
||||
* `check`
|
||||
* `done`
|
||||
|
||||
### Question
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! question
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! question
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `question`
|
||||
* `help`
|
||||
* `faq`
|
||||
|
||||
### Warning
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! warning
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! warning
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `warning`
|
||||
* `caution`
|
||||
* `attention`
|
||||
|
||||
### Failure
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! failure
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! failure
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `failure`
|
||||
* `fail`
|
||||
* `missing`
|
||||
|
||||
### Danger
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! danger
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! danger
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `danger`
|
||||
* `error`
|
||||
|
||||
### Bug
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! bug
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! bug
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `bug`
|
||||
|
||||
### Quote
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
!!! quote
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
!!! quote
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
Qualifiers:
|
||||
|
||||
* `quote`
|
||||
* `cite`
|
||||
@@ -0,0 +1,863 @@
|
||||
# CodeHilite
|
||||
|
||||
[CodeHilite][1] is an extension that adds syntax highlighting to code blocks
|
||||
and is included in the standard Markdown library. The highlighting process is
|
||||
executed during compilation of the Markdown file.
|
||||
|
||||
!!! failure "Syntax highlighting not working?"
|
||||
|
||||
Please ensure that [Pygments][2] is installed. See the next section for
|
||||
further directions on how to set up Pygments or use the official
|
||||
[Docker image][3] with all dependencies pre-installed.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/code_hilite.html
|
||||
[2]: http://pygments.org
|
||||
[3]: https://hub.docker.com/r/squidfunk/mkdocs-material/
|
||||
|
||||
## Installation
|
||||
|
||||
CodeHilite parses code blocks and wraps them in `pre` tags. If [Pygments][2]
|
||||
is installed, which is a generic syntax highlighter with support for over
|
||||
[300 languages][4], CodeHilite will also highlight the code block. Pygments can
|
||||
be installed with the following command:
|
||||
|
||||
``` sh
|
||||
pip install pygments
|
||||
```
|
||||
|
||||
To enable CodeHilite, add the following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- codehilite
|
||||
```
|
||||
|
||||
!!! warning "Migrating from Material 0.2.x"
|
||||
|
||||
In 0.2.x the CodeHilite extension was included with
|
||||
`codehilite(css_class=code)` which switched the CSS class from
|
||||
`.codehilite` to `.code`. The current version of the theme doesn't require
|
||||
that and defines styles for the default `.codehilite` class, so the part
|
||||
`css_class=code` needs to be removed.
|
||||
|
||||
[4]: http://pygments.org/languages
|
||||
|
||||
## Usage
|
||||
|
||||
### Specifying the language
|
||||
|
||||
The CodeHilite extension uses the same syntax as regular Markdown code blocks,
|
||||
but needs to know the language of the code block. This can be done in three
|
||||
different ways.
|
||||
|
||||
#### via Markdown syntax <small>recommended</small>
|
||||
|
||||
In Markdown, code blocks can be opened and closed by writing three backticks on
|
||||
separate lines. To add code highlighting to those blocks, the easiest way is
|
||||
to specify the language directly after the opening block.
|
||||
|
||||
Example:
|
||||
|
||||
```` markdown
|
||||
``` python
|
||||
import tensorflow as tf
|
||||
```
|
||||
````
|
||||
|
||||
Result:
|
||||
|
||||
``` python
|
||||
import tensorflow as tf
|
||||
```
|
||||
|
||||
#### via Shebang
|
||||
|
||||
Alternatively, if the first line of a code block contains a shebang, the
|
||||
language is derived from the path referenced in the shebang. This will only
|
||||
work for code blocks that are indented using four spaces, not for those
|
||||
encapsulated in three backticks.
|
||||
|
||||
Example:
|
||||
|
||||
```` markdown
|
||||
#!/usr/bin/python
|
||||
import tensorflow as tf
|
||||
````
|
||||
|
||||
Result:
|
||||
|
||||
``` python
|
||||
#!/usr/bin/python
|
||||
import tensorflow as tf
|
||||
```
|
||||
|
||||
#### via three colons
|
||||
|
||||
If the first line starts with three colons followed by a language identifier,
|
||||
the first line is stripped. This will only work for code blocks that are
|
||||
indented using four spaces, not for those encapsulated in three backticks.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
:::python
|
||||
import tensorflow as tf
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
:::python
|
||||
import tensorflow as tf
|
||||
|
||||
### Adding line numbers
|
||||
|
||||
Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- codehilite:
|
||||
linenums:true
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```` markdown
|
||||
``` python
|
||||
""" Bubble sort """
|
||||
def bubble_sort(items):
|
||||
for i in range(len(items)):
|
||||
for j in range(len(items) - 1 - i):
|
||||
if items[j] > items[j + 1]:
|
||||
items[j], items[j + 1] = items[j + 1], items[j]
|
||||
```
|
||||
````
|
||||
|
||||
Result:
|
||||
|
||||
#!python
|
||||
""" Bubble sort """
|
||||
def bubble_sort(items):
|
||||
for i in range(len(items)):
|
||||
for j in range(len(items) - 1 - i):
|
||||
if items[j] > items[j + 1]:
|
||||
items[j], items[j + 1] = items[j + 1], items[j]
|
||||
|
||||
### Highlighting specific lines
|
||||
|
||||
Specific lines can be highlighted by passing the line numbers to the `hl_lines`
|
||||
argument placed right after the language identifier. Line counts start at 1.
|
||||
|
||||
Example:
|
||||
|
||||
```` markdown
|
||||
``` python hl_lines="3 4"
|
||||
""" Bubble sort """
|
||||
def bubble_sort(items):
|
||||
for i in range(len(items)):
|
||||
for j in range(len(items) - 1 - i):
|
||||
if items[j] > items[j + 1]:
|
||||
items[j], items[j + 1] = items[j + 1], items[j]
|
||||
```
|
||||
````
|
||||
|
||||
Result:
|
||||
|
||||
#!python hl_lines="3 4"
|
||||
""" Bubble sort """
|
||||
def bubble_sort(items):
|
||||
for i in range(len(items)):
|
||||
for j in range(len(items) - 1 - i):
|
||||
if items[j] > items[j + 1]:
|
||||
items[j], items[j + 1] = items[j + 1], items[j]
|
||||
|
||||
|
||||
## Supported languages <small>excerpt</small>
|
||||
|
||||
CodeHilite uses [Pygments][2], a generic syntax highlighter with support for
|
||||
over [300 languages][3], so the following list of examples is just an excerpt.
|
||||
|
||||
### Bash
|
||||
|
||||
``` bash
|
||||
#!/bin/bash
|
||||
|
||||
for OPT in "$@"
|
||||
do
|
||||
case "$OPT" in
|
||||
'-f' ) canonicalize=1 ;;
|
||||
'-n' ) switchlf="-n" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# readlink -f
|
||||
function __readlink_f {
|
||||
target="$1"
|
||||
while test -n "$target"; do
|
||||
filepath="$target"
|
||||
cd `dirname "$filepath"`
|
||||
target=`readlink "$filepath"`
|
||||
done
|
||||
/bin/echo $switchlf `pwd -P`/`basename "$filepath"`
|
||||
}
|
||||
|
||||
if [ ! "$canonicalize" ]; then
|
||||
readlink $switchlf "$@"
|
||||
else
|
||||
for file in "$@"
|
||||
do
|
||||
case "$file" in
|
||||
-* ) ;;
|
||||
* ) __readlink_f "$file" ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
exit $?
|
||||
```
|
||||
|
||||
### C
|
||||
|
||||
``` c
|
||||
extern size_t
|
||||
pb_varint_scan(const uint8_t data[], size_t left) {
|
||||
assert(data && left);
|
||||
left = left > 10 ? 10 : left;
|
||||
|
||||
#ifdef __SSE2__
|
||||
|
||||
/* Mapping: remaining bytes ==> bitmask */
|
||||
static const int mask_map[] = {
|
||||
0x0000, 0x0001, 0x0003, 0x0007,
|
||||
0x000F, 0x001F, 0x003F, 0x007F,
|
||||
0x00FF, 0x01FF, 0x03FF
|
||||
};
|
||||
|
||||
/* Load buffer into 128-bit integer and create high-bit mask */
|
||||
__m128i temp = _mm_loadu_si128((const __m128i *)data);
|
||||
__m128i high = _mm_set1_epi8(0x80);
|
||||
|
||||
/* Intersect and extract mask with high-bits set */
|
||||
int mask = _mm_movemask_epi8(_mm_and_si128(temp, high));
|
||||
mask = (mask & mask_map[left]) ^ mask_map[left];
|
||||
|
||||
/* Count trailing zeroes */
|
||||
return mask ? __builtin_ctz(mask) + 1 : 0;
|
||||
|
||||
#else
|
||||
|
||||
/* Linear scan */
|
||||
size_t size = 0;
|
||||
while (data[size++] & 0x80)
|
||||
if (!--left)
|
||||
return 0;
|
||||
return size;
|
||||
|
||||
#endif /* __SSE2__ */
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### C++
|
||||
|
||||
``` cpp
|
||||
Extension::
|
||||
Extension(const Descriptor *descriptor, const Descriptor *scope) :
|
||||
descriptor_(descriptor),
|
||||
scope_(scope) {
|
||||
|
||||
/* Extract full name for signature */
|
||||
variables_["signature"] = descriptor_->full_name();
|
||||
|
||||
/* Prepare message symbol */
|
||||
variables_["message"] = StringReplace(
|
||||
variables_["signature"], ".", "_", true);
|
||||
LowerString(&(variables_["message"]));
|
||||
|
||||
/* Suffix scope to identifiers, if given */
|
||||
string suffix ("");
|
||||
if (scope_) {
|
||||
suffix = scope_->full_name();
|
||||
|
||||
/* Check if the base and extension types are in the same package */
|
||||
if (!scope_->file()->package().compare(descriptor_->file()->package()))
|
||||
suffix = StripPrefixString(suffix,
|
||||
scope_->file()->package() + ".");
|
||||
|
||||
/* Append to signature */
|
||||
variables_["signature"] += ".[" + suffix +"]";
|
||||
suffix = "_" + suffix;
|
||||
}
|
||||
|
||||
/* Prepare extension symbol */
|
||||
variables_["extension"] = StringReplace(
|
||||
suffix, ".", "_", true);
|
||||
LowerString(&(variables_["extension"]));
|
||||
}
|
||||
```
|
||||
|
||||
### C#
|
||||
|
||||
``` csharp
|
||||
public static void Send(
|
||||
Socket socket, byte[] buffer, int offset, int size, int timeout) {
|
||||
int startTickCount = Environment.TickCount;
|
||||
int sent = 0;
|
||||
do {
|
||||
if (Environment.TickCount > startTickCount + timeout)
|
||||
throw new Exception("Timeout.");
|
||||
try {
|
||||
sent += socket.Send(buffer, offset + sent,
|
||||
size - sent, SocketFlags.None);
|
||||
} catch (SocketException ex) {
|
||||
if (ex.SocketErrorCode == SocketError.WouldBlock ||
|
||||
ex.SocketErrorCode == SocketError.IOPending ||
|
||||
ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable) {
|
||||
/* Socket buffer is probably full, wait and try again */
|
||||
Thread.Sleep(30);
|
||||
} else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
} while (sent < size);
|
||||
}
|
||||
```
|
||||
|
||||
### Clojure
|
||||
|
||||
``` clojure
|
||||
(clojure-version)
|
||||
|
||||
(defn partition-when
|
||||
[f]
|
||||
(fn [rf]
|
||||
(let [a (java.util.ArrayList.)
|
||||
fval (volatile! false)]
|
||||
(fn
|
||||
([] (rf))
|
||||
([result]
|
||||
(let [result (if (.isEmpty a)
|
||||
result
|
||||
(let [v (vec (.toArray a))]
|
||||
;; Clear first
|
||||
(.clear a)
|
||||
(unreduced (rf result v))))]
|
||||
(rf result)))
|
||||
([result input]
|
||||
(if-not (and (f input) @fval)
|
||||
(do
|
||||
(vreset! fval true)
|
||||
(.add a input)
|
||||
result)
|
||||
(let [v (vec (.toArray a))]
|
||||
(.clear a)
|
||||
(let [ret (rf result v)]
|
||||
(when-not (reduced? ret)
|
||||
(.add a input))
|
||||
ret))))))))
|
||||
|
||||
|
||||
(into [] (partition-when
|
||||
#(.startsWith % ">>"))
|
||||
["1d" "33" ">> 1" ">> 2" "22" ">> 3"])
|
||||
```
|
||||
|
||||
### Diff
|
||||
|
||||
``` diff
|
||||
Index: grunt.js
|
||||
===================================================================
|
||||
--- grunt.js (revision 31200)
|
||||
+++ grunt.js (working copy)
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
||||
+ console.log('hello world');
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
lint: {
|
||||
@@ -19,10 +20,6 @@
|
||||
'packages/services.web/{!(test)/**/,}*.js',
|
||||
'packages/error/**/*.js'
|
||||
],
|
||||
- scripts: [
|
||||
- 'grunt.js',
|
||||
- 'db/**/*.js'
|
||||
- ],
|
||||
browser: [
|
||||
'packages/web/server.js',
|
||||
'packages/web/server/**/*.js',
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
``` docker
|
||||
FROM ubuntu
|
||||
|
||||
# Install vnc, xvfb in order to create a 'fake' display and firefox
|
||||
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
|
||||
RUN mkdir ~/.vnc
|
||||
|
||||
# Setup a password
|
||||
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
|
||||
|
||||
# Autostart firefox (might not be the best way, but it does the trick)
|
||||
RUN bash -c 'echo "firefox" >> /.bashrc'
|
||||
|
||||
EXPOSE 5900
|
||||
CMD ["x11vnc", "-forever", "-usepw", "-create"]
|
||||
```
|
||||
|
||||
### Elixir
|
||||
|
||||
``` elixir
|
||||
require Logger
|
||||
|
||||
def accept(port) do
|
||||
{:ok, socket} = :gen_tcp.listen(port,
|
||||
[:binary, packet: :line, active: false, reuseaddr: true])
|
||||
Logger.info "Accepting connections on port #{port}"
|
||||
loop_acceptor(socket)
|
||||
end
|
||||
|
||||
defp loop_acceptor(socket) do
|
||||
{:ok, client} = :gen_tcp.accept(socket)
|
||||
serve(client)
|
||||
loop_acceptor(socket)
|
||||
end
|
||||
|
||||
defp serve(socket) do
|
||||
socket
|
||||
|> read_line()
|
||||
|> write_line(socket)
|
||||
|
||||
serve(socket)
|
||||
end
|
||||
|
||||
defp read_line(socket) do
|
||||
{:ok, data} = :gen_tcp.recv(socket, 0)
|
||||
data
|
||||
end
|
||||
|
||||
defp write_line(line, socket) do
|
||||
:gen_tcp.send(socket, line)
|
||||
end
|
||||
```
|
||||
|
||||
### Erlang
|
||||
|
||||
``` erlang
|
||||
circular(Defs) ->
|
||||
[ { { Type, Base }, Fields } ||
|
||||
{ { Type, Base }, Fields } <- Defs, Type == msg, circular(Base, Defs) ].
|
||||
|
||||
circular(Base, Defs) ->
|
||||
Fields = proplists:get_value({ msg, Base }, Defs),
|
||||
circular(Defs, Fields, [Base]).
|
||||
|
||||
circular(_Defs, [], _Path) ->
|
||||
false;
|
||||
circular(Defs, [Field | Fields], Path) ->
|
||||
case Field#field.type of
|
||||
{ msg, Type } ->
|
||||
case lists:member(Type, Path) of
|
||||
false ->
|
||||
Children = proplists:get_value({ msg, Type }, Defs),
|
||||
case circular(Defs, Children, [Type | Path]) of
|
||||
false -> circular(Defs, Fields, Path);
|
||||
true -> true
|
||||
end;
|
||||
true ->
|
||||
Type == lists:last(Path) andalso
|
||||
(length(Path) == 1 orelse not is_tree(Path))
|
||||
end;
|
||||
_ ->
|
||||
circular(Defs, Fields, Path)
|
||||
end.
|
||||
```
|
||||
|
||||
### F#
|
||||
|
||||
``` fsharp
|
||||
/// Asynchronously download retangles from the server
|
||||
/// and decode the JSON format to F# Rectangle record
|
||||
let [<Js>] getRectangles () : Async<Rectangle[]> = async {
|
||||
let req = XMLHttpRequest()
|
||||
req.Open("POST", "/get", true)
|
||||
let! resp = req.AsyncSend()
|
||||
return JSON.parse(resp) }
|
||||
|
||||
/// Repeatedly update rectangles after 0.5 sec
|
||||
let [<Js>] updateLoop () = async {
|
||||
while true do
|
||||
do! Async.Sleep(500)
|
||||
let! rects = getRectangles()
|
||||
cleanRectangles()
|
||||
rects |> Array.iter createRectangle }
|
||||
```
|
||||
|
||||
### Go
|
||||
|
||||
``` go
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func counter(id int, channel chan int, closer bool) {
|
||||
for i := 0; i < 10000000; i++ {
|
||||
fmt.Println("process", id," send", i)
|
||||
channel <- 1
|
||||
}
|
||||
if closer { close(channel ) }
|
||||
}
|
||||
|
||||
func main() {
|
||||
channel := make(chan int)
|
||||
go counter(1, channel, false)
|
||||
go counter(2, channel, true)
|
||||
|
||||
x := 0
|
||||
|
||||
// receiving data from channel
|
||||
for i := range channel {
|
||||
fmt.Println("receiving")
|
||||
x += i
|
||||
}
|
||||
|
||||
fmt.Println(x)
|
||||
}
|
||||
```
|
||||
|
||||
### HTML
|
||||
|
||||
``` html
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>HTML5 Boilerplate</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Java
|
||||
|
||||
``` java
|
||||
import java.util.LinkedList;
|
||||
import java.lang.reflect.Array;
|
||||
|
||||
public class UnsortedHashSet<E> {
|
||||
|
||||
private static final double LOAD_FACTOR_LIMIT = 0.7;
|
||||
|
||||
private int size;
|
||||
private LinkedList<E>[] con;
|
||||
|
||||
public UnsortedHashSet() {
|
||||
con = (LinkedList<E>[])(new LinkedList[10]);
|
||||
}
|
||||
|
||||
public boolean add(E obj) {
|
||||
int oldSize = size;
|
||||
int index = Math.abs(obj.hashCode()) % con.length;
|
||||
if (con[index] == null)
|
||||
con[index] = new LinkedList<E>();
|
||||
if (!con[index].contains(obj)) {
|
||||
con[index].add(obj);
|
||||
size++;
|
||||
}
|
||||
if (1.0 * size / con.length > LOAD_FACTOR_LIMIT)
|
||||
resize();
|
||||
return oldSize != size;
|
||||
}
|
||||
|
||||
private void resize() {
|
||||
UnsortedHashSet<E> temp = new UnsortedHashSet<E>();
|
||||
temp.con = (LinkedList<E>[])(new LinkedList[con.length * 2 + 1]);
|
||||
for (int i = 0; i < con.length; i++) {
|
||||
if (con[i] != null)
|
||||
for (E e : con[i])
|
||||
temp.add(e);
|
||||
}
|
||||
con = temp.con;
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return size;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### JavaScript
|
||||
|
||||
``` javascript
|
||||
var Math = require('lib/math');
|
||||
|
||||
var _extends = function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
var e = exports.e = 2.71828182846;
|
||||
exports['default'] = function (x) {
|
||||
return Math.exp(x);
|
||||
};
|
||||
|
||||
module.exports = _extends(exports['default'], exports);
|
||||
```
|
||||
|
||||
### JSON
|
||||
|
||||
``` json
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "0.2.4",
|
||||
"description": "A Material Design theme for MkDocs",
|
||||
"homepage": "http://squidfunk.github.io/mkdocs-material/",
|
||||
"authors": [
|
||||
"squidfunk <martin.donath@squidfunk.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "Gulpfile.js",
|
||||
"scripts": {
|
||||
"start": "./node_modules/.bin/gulp watch --mkdocs",
|
||||
"build": "./node_modules/.bin/gulp build --production"
|
||||
}
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### Julia
|
||||
|
||||
``` julia
|
||||
using MXNet
|
||||
|
||||
mlp = @mx.chain mx.Variable(:data) =>
|
||||
mx.FullyConnected(name=:fc1, num_hidden=128) =>
|
||||
mx.Activation(name=:relu1, act_type=:relu) =>
|
||||
mx.FullyConnected(name=:fc2, num_hidden=64) =>
|
||||
mx.Activation(name=:relu2, act_type=:relu) =>
|
||||
mx.FullyConnected(name=:fc3, num_hidden=10) =>
|
||||
mx.SoftmaxOutput(name=:softmax)
|
||||
|
||||
# data provider
|
||||
batch_size = 100
|
||||
include(Pkg.dir("MXNet", "examples", "mnist", "mnist-data.jl"))
|
||||
train_provider, eval_provider = get_mnist_providers(batch_size)
|
||||
|
||||
# setup model
|
||||
model = mx.FeedForward(mlp, context=mx.cpu())
|
||||
|
||||
# optimization algorithm
|
||||
optimizer = mx.SGD(lr=0.1, momentum=0.9)
|
||||
|
||||
# fit parameters
|
||||
mx.fit(model, optimizer, train_provider, n_epoch=20, eval_data=eval_provider)
|
||||
```
|
||||
|
||||
### Lua
|
||||
|
||||
``` lua
|
||||
local ffi = require("ffi")
|
||||
|
||||
ffi.cdef[[
|
||||
void Sleep(int ms);
|
||||
int poll(struct pollfd *fds, unsigned long nfds, int timeout);
|
||||
]]
|
||||
|
||||
local sleep
|
||||
if ffi.os == "Windows" then
|
||||
function sleep(s)
|
||||
ffi.C.Sleep(s*1000)
|
||||
end
|
||||
else
|
||||
function sleep(s)
|
||||
ffi.C.poll(nil, 0, s * 1000)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1,160 do
|
||||
io.write("."); io.flush()
|
||||
sleep(0.01)
|
||||
end
|
||||
io.write("\n")
|
||||
```
|
||||
|
||||
### MySQL
|
||||
|
||||
``` mysql
|
||||
SELECT
|
||||
Employees.EmployeeID,
|
||||
Employees.Name,
|
||||
Employees.Salary,
|
||||
Manager.Name AS Manager
|
||||
FROM
|
||||
Employees
|
||||
LEFT JOIN
|
||||
Employees AS Manager
|
||||
ON
|
||||
Employees.ManagerID = Manager.EmployeeID
|
||||
WHERE
|
||||
Employees.EmployeeID = '087652';
|
||||
```
|
||||
|
||||
### PHP
|
||||
|
||||
``` php
|
||||
<?php
|
||||
|
||||
// src/AppBundle/Controller/LuckyController.php
|
||||
namespace AppBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class LuckyController {
|
||||
|
||||
/**
|
||||
* @Route("/lucky/number")
|
||||
*/
|
||||
public function numberAction() {
|
||||
$number = mt_rand(0, 100);
|
||||
|
||||
return new Response(
|
||||
'<html><body>Lucky number: '.$number.'</body></html>'
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Protocol Buffers
|
||||
|
||||
``` proto
|
||||
syntax = "proto2";
|
||||
|
||||
package caffe;
|
||||
|
||||
// Specifies the shape (dimensions) of a Blob.
|
||||
message BlobShape {
|
||||
repeated int64 dim = 1 [packed = true];
|
||||
}
|
||||
|
||||
message BlobProto {
|
||||
optional BlobShape shape = 7;
|
||||
repeated float data = 5 [packed = true];
|
||||
repeated float diff = 6 [packed = true];
|
||||
|
||||
// 4D dimensions -- deprecated. Use "shape" instead.
|
||||
optional int32 num = 1 [default = 0];
|
||||
optional int32 channels = 2 [default = 0];
|
||||
optional int32 height = 3 [default = 0];
|
||||
optional int32 width = 4 [default = 0];
|
||||
}
|
||||
```
|
||||
|
||||
### Python
|
||||
|
||||
``` python
|
||||
|
||||
"""
|
||||
A very simple MNIST classifier.
|
||||
See extensive documentation at
|
||||
http://tensorflow.org/tutorials/mnist/beginners/index.md
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
# Import data
|
||||
from tensorflow.examples.tutorials.mnist import input_data
|
||||
|
||||
import tensorflow as tf
|
||||
|
||||
flags = tf.app.flags
|
||||
FLAGS = flags.FLAGS
|
||||
flags.DEFINE_string('data_dir', '/tmp/data/', 'Directory for storing data')
|
||||
|
||||
mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True)
|
||||
|
||||
sess = tf.InteractiveSession()
|
||||
|
||||
# Create the model
|
||||
x = tf.placeholder(tf.float32, [None, 784])
|
||||
W = tf.Variable(tf.zeros([784, 10]))
|
||||
b = tf.Variable(tf.zeros([10]))
|
||||
y = tf.nn.softmax(tf.matmul(x, W) + b)
|
||||
```
|
||||
|
||||
### Ruby
|
||||
|
||||
``` ruby
|
||||
require 'finity/event'
|
||||
require 'finity/machine'
|
||||
require 'finity/state'
|
||||
require 'finity/transition'
|
||||
require 'finity/version'
|
||||
|
||||
module Finity
|
||||
class InvalidCallback < StandardError; end
|
||||
class MissingCallback < StandardError; end
|
||||
class InvalidState < StandardError; end
|
||||
|
||||
# Class methods to be injected into the including class upon inclusion.
|
||||
module ClassMethods
|
||||
|
||||
# Instantiate a new state machine for the including class by accepting a
|
||||
# block with state and event (and subsequent transition) definitions.
|
||||
def finity options = {}, &block
|
||||
@finity ||= Machine.new self, options, &block
|
||||
end
|
||||
|
||||
# Return the names of all registered states.
|
||||
def states
|
||||
@finity.states.map { |name, _| name }
|
||||
end
|
||||
|
||||
# Return the names of all registered events.
|
||||
def events
|
||||
@finity.events.map { |name, _| name }
|
||||
end
|
||||
end
|
||||
|
||||
# Inject methods into the including class upon inclusion.
|
||||
def self.included base
|
||||
base.extend ClassMethods
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
### XML
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mainTag SYSTEM "some.dtd" [ENTITY % entity]>
|
||||
<?oxygen RNGSchema="some.rng" type="xml"?>
|
||||
<xs:main-Tag xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This is a sample comment -->
|
||||
<childTag attribute="Quoted Value" another-attribute='Single quoted value'
|
||||
a-third-attribute='123'>
|
||||
<withTextContent>Some text content</withTextContent>
|
||||
<withEntityContent>Some text content with <entities> and
|
||||
mentioning uint8_t and int32_t</withEntityContent>
|
||||
<otherTag attribute='Single quoted Value'/>
|
||||
</childTag>
|
||||
<![CDATA[ some CData ]]>
|
||||
</main-Tag>
|
||||
```
|
||||
@@ -0,0 +1,84 @@
|
||||
# Footnotes
|
||||
|
||||
[Footnotes][1] is another extension included in the standard Markdown library.
|
||||
As the name says, it adds the ability to add footnotes to your documentation.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/footnotes.html
|
||||
|
||||
## Installation
|
||||
|
||||
Add the following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- footnotes
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The markup for footnotes is similar to the standard Markdown markup for links.
|
||||
A reference is inserted in the text, which can then be defined at any point in
|
||||
the document.
|
||||
|
||||
### Inserting the reference
|
||||
|
||||
The footnote reference is enclosed in square brackets and starts with a caret,
|
||||
followed by an arbitrary label which may contain numeric identifiers [1, 2, 3,
|
||||
...] or names [Granovetter et al. 1998]. The rendered references are always
|
||||
consecutive superscripted numbers.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
|
||||
|
||||
### Inserting the content
|
||||
|
||||
The footnote content is also declared with a label, which must match the label
|
||||
used for the footnote reference. It can be inserted at an arbitrary position in
|
||||
the document and is always rendered at the bottom of the page. Furthermore, a
|
||||
backlink is automatically added to the footnote reference.
|
||||
|
||||
#### on a single line
|
||||
|
||||
Short statements can be written on the same line.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
<a href="#fn:1">Jump to footnote at the bottom of the page</a>
|
||||
|
||||
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
|
||||
#### on multiple lines
|
||||
|
||||
Paragraphs should be written on the next line. As with all Markdown blocks, the
|
||||
content must be indented by four spaces.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
[^2]:
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
[^2]:
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus
|
||||
auctor massa, nec semper lorem quam in massa.
|
||||
|
||||
<a href="#fn:2">Jump to footnote at the bottom of the page</a>
|
||||
@@ -0,0 +1,99 @@
|
||||
path: tree/master/docs/extensions
|
||||
source: metadata.md
|
||||
|
||||
# Metadata
|
||||
|
||||
The [Metadata][1] extension makes it possible to add metadata to a document
|
||||
which gives more control over the theme in a page-specific context.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/meta_data.html
|
||||
|
||||
## Installation
|
||||
|
||||
Add the following lines to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- meta
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Metadata is written as a series of key-value pairs at the beginning of the
|
||||
Markdown document, delimited by a blank line which ends the metadata context.
|
||||
Naturally, the metadata is stripped from the document before rendering the
|
||||
actual page content and made available to the theme.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
title: Lorem ipsum dolor sit amet
|
||||
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
|
||||
path: path/to/file
|
||||
source: file.js
|
||||
|
||||
# Headline
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
See the next section which covers the metadata that is supported by Material.
|
||||
|
||||
### Overriding the title
|
||||
|
||||
The page title can be overridden on a per-document level:
|
||||
|
||||
``` markdown
|
||||
title: Lorem ipsum dolor sit amet
|
||||
```
|
||||
|
||||
This will set the `title` tag inside the document `head` for the current page
|
||||
to the provided value. It will also override the default behavior of Material
|
||||
for MkDocs which appends the site title using a dash as a separator to the page
|
||||
title.
|
||||
|
||||
### Overriding the description
|
||||
|
||||
The page description can also be overridden on a per-document level:
|
||||
|
||||
``` yaml
|
||||
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
|
||||
```
|
||||
|
||||
This will set the `meta` tag containing the site description inside the
|
||||
document `head` for the current page to the provided value.
|
||||
|
||||
### Linking sources
|
||||
|
||||
When a document is related to a specific set of source files and the `repo_url`
|
||||
is defined inside the project's `mkdocs.yml`, the files can be linked using the
|
||||
`source` key:
|
||||
|
||||
``` markdown
|
||||
source: file.js
|
||||
```
|
||||
|
||||
A new entry at the bottom of the table of contents is generated that is linking
|
||||
to the section listing the linked source files. Multiple files can be linked by
|
||||
adding filenames on separate lines:
|
||||
|
||||
``` markdown
|
||||
source: file.js
|
||||
file.css
|
||||
```
|
||||
|
||||
The filenames are appended to the `repo_url` set in your `mkdocs.yml`, but can
|
||||
be prefixed with a `path` to ensure correct path resolving:
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
path: tree/master/docs/extensions
|
||||
source: metadata.md
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
See the [source][2] section for the resulting output.
|
||||
|
||||
[2]: #__source
|
||||
@@ -0,0 +1,33 @@
|
||||
# Permalinks
|
||||
|
||||
Permalinks are a feature of the [Table of Contents][1] extension, which is part
|
||||
of the standard Markdown library. The extension inserts an anchor at the end of
|
||||
each headline, which makes it possible to directly link to a subpart of the
|
||||
document.
|
||||
|
||||
[1]: https://pythonhosted.org/Markdown/extensions/toc.html
|
||||
|
||||
## Installation
|
||||
|
||||
To enable permalinks, add the following to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: true
|
||||
```
|
||||
|
||||
This will add a link containing the paragraph symbol `¶` at the end of each
|
||||
headline (exactly like on the page you're currently viewing), which the
|
||||
Material theme will make appear on hover. In order to change the text of the
|
||||
permalink, a string can be passed, e.g.:
|
||||
|
||||
``` markdown
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: Link
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
When enabled, permalinks are inserted automatically.
|
||||
@@ -0,0 +1,286 @@
|
||||
# PyMdown Extensions
|
||||
|
||||
[PyMdown Extensions][1] is a collection of Markdown extensions that add some
|
||||
great features to the standard Markdown library. For this reason, the
|
||||
**installation of this package is highly recommended** as it's well-integrated
|
||||
with the Material theme.
|
||||
|
||||
[1]: http://facelessuser.github.io/pymdown-extensions/
|
||||
|
||||
## Installation
|
||||
|
||||
The PyMdown Extensions package can be installed with the following command:
|
||||
|
||||
``` sh
|
||||
pip install pymdown-extensions
|
||||
```
|
||||
|
||||
The following list of extensions that are part of the PyMdown Extensions
|
||||
package are recommended to be used together with the Material theme:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.arithmatex
|
||||
- pymdownx.betterem:
|
||||
smart_enable: all
|
||||
- pymdownx.caret
|
||||
- pymdownx.critic
|
||||
- pymdownx.details
|
||||
- pymdownx.emoji:
|
||||
emoji_generator: !!python/name:pymdownx.emoji.to_svg
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.mark
|
||||
- pymdownx.smartsymbols
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.tilde
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Arithmatex <small>MathJax</small>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||
|
||||
[Arithmatex][2] integrates Material with [MathJax][3] which parses
|
||||
block-style and inline equations written in TeX markup and outputs them in
|
||||
mathematical notation. See [this thread][4] for a short introduction and quick
|
||||
reference on how to write equations in TeX syntax.
|
||||
|
||||
Besides activating the extension in the `mkdocs.yml`, the MathJax JavaScript
|
||||
runtime needs to be included. This must be done with
|
||||
[additional JavaScript][5]:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
|
||||
```
|
||||
|
||||
If you want to override the default MathJax configuration, you can do this by
|
||||
adding another JavaScript file **before** the MathJax runtime in
|
||||
`extra_javascript` which contains your MathJax configuration, e.g.:
|
||||
|
||||
``` js
|
||||
window.MathJax = {
|
||||
tex2jax: {
|
||||
inlineMath: [ ["\\(","\\)"] ],
|
||||
displayMath: [ ["\\[","\\]"] ]
|
||||
},
|
||||
TeX: {
|
||||
TagSide: "right",
|
||||
TagIndent: ".8em",
|
||||
MultLineWidth: "85%",
|
||||
equationNumbers: {
|
||||
autoNumber: "AMS",
|
||||
},
|
||||
unicode: {
|
||||
fonts: "STIXGeneral,'Arial Unicode MS'"
|
||||
}
|
||||
},
|
||||
displayAlign: "left",
|
||||
showProcessingMessages: false,
|
||||
messageStyle: "none"
|
||||
};
|
||||
```
|
||||
|
||||
In your `mkdocs.yml`, include it with:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'javascripts/extra.js'
|
||||
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
|
||||
```
|
||||
|
||||
[2]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
|
||||
[3]: https://www.mathjax.org/
|
||||
[4]: http://meta.math.stackexchange.com/questions/5020/
|
||||
[5]: ../customization.md#additional-javascript
|
||||
|
||||
#### Blocks
|
||||
|
||||
Blocks are enclosed in `:::tex $$...$$` which are placed on separate lines.
|
||||
|
||||
Example:
|
||||
|
||||
``` tex
|
||||
$$
|
||||
\frac{n!}{k!(n-k)!} = \binom{n}{k}
|
||||
$$
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
$$
|
||||
\frac{n!}{k!(n-k)!} = \binom{n}{k}
|
||||
$$
|
||||
|
||||
#### Inline
|
||||
|
||||
Inline equations need to be enclosed in `:::tex $...$`:
|
||||
|
||||
Example:
|
||||
|
||||
``` tex
|
||||
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
|
||||
|
||||
### BetterEm
|
||||
|
||||
[BetterEm][6] improves the handling of emphasis markup (**bold** and *italic*)
|
||||
within Markdown by providing a more sophisticated parser for better detecting
|
||||
start and end tokens. Read the documentation for [usage notes][7].
|
||||
|
||||
[6]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
|
||||
[7]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
|
||||
|
||||
### Caret
|
||||
|
||||
[Caret][8] makes it possible to highlight ^^inserted text^^. The portion of
|
||||
text that should be marked as added must be enclosed in two carets `^^...^^`.
|
||||
|
||||
[8]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
|
||||
|
||||
### Critic
|
||||
|
||||
[Critic][9] implements [Critic Markup][10], a Markdown extension that enables
|
||||
the tracking of changes (additions, deletions and comments) on documents.
|
||||
During compilation of the Markdown document, changes can be rendered (default),
|
||||
accepted or rejected.
|
||||
|
||||
Text can be {--deleted--} and replacement text {++added++}. This can also be
|
||||
combined into {~~one~>a single~~} operation. {==Highlighting==} is also
|
||||
possible {>>and comments can be added inline<<}.
|
||||
|
||||
{==
|
||||
|
||||
Formatting can also be applied to blocks, by putting the opening and closing
|
||||
tags on separate lines and adding new lines between the tags and the content.
|
||||
|
||||
==}
|
||||
|
||||
[9]: https://facelessuser.github.io/pymdown-extensions/extensions/critic/
|
||||
[10]: http://criticmarkup.com/
|
||||
|
||||
### Details
|
||||
|
||||
[Details][11] adds collapsible [Admonition-style blocks][12] which can contain
|
||||
arbitrary content using the HTML5 `details` and `summary` tags. Additionally,
|
||||
all Admonition qualifiers can be used, e.g. `note`, `question`, `warning` etc.:
|
||||
|
||||
??? question "How many Prolog programmers does it take to change a lightbulb?"
|
||||
|
||||
Yes.
|
||||
|
||||
[11]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
|
||||
[12]: admonition.md
|
||||
|
||||
### Emoji
|
||||
|
||||
[Emoji][13] adds the ability to insert a :shit:-load of emojis that we use in
|
||||
our daily lives. See the [EmojiOne demo][14] for a list of all available
|
||||
emojis. Happy scrolling :tada:
|
||||
|
||||
!!! warning "Legal disclaimer"
|
||||
|
||||
Material has no affiliation with [EmojiOne][15] which is released under
|
||||
[CC BY 4.0][16]. When including EmojiOne images or CSS, please read the
|
||||
[EmojiOne license][17] to ensure proper usage and attribution.
|
||||
|
||||
[13]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/
|
||||
[14]: https://emoji.codes/
|
||||
[15]: http://emojione.com
|
||||
[16]: https://creativecommons.org/licenses/by/4.0/legalcode
|
||||
[17]: http://emojione.com/licensing/
|
||||
|
||||
### InlineHilite
|
||||
|
||||
[InlineHilite][18] adds support for inline code highlighting. It's useful for
|
||||
short snippets included within body copy, e.g. `#!js var test = 0;` and can be
|
||||
achived by prefixing inline code with a shebang and language identifier,
|
||||
e.g. `#!js`.
|
||||
|
||||
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
|
||||
|
||||
### MagicLink
|
||||
|
||||
[MagicLink][19] detects links in Markdown and auto-generates the necessary
|
||||
markup, so no special syntax is required. It auto-links `http[s]://` and
|
||||
`ftp://` links, as well as references to email addresses.
|
||||
|
||||
[19]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
|
||||
|
||||
### Mark
|
||||
|
||||
[Mark][20] adds the ability to ==highlight text== like it was marked with a
|
||||
==text marker==. The portion of text that should be highlighted must be
|
||||
enclosed in two equal signs `==...==`.
|
||||
|
||||
[20]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
|
||||
|
||||
### SmartSymbols
|
||||
|
||||
[SmartSymbols][21] converts markup for special characters into their
|
||||
corresponding symbols, e.g. arrows (<--, -->, <-->), trademark and copyright
|
||||
symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...).
|
||||
|
||||
[21]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
|
||||
|
||||
### SuperFences
|
||||
|
||||
[SuperFences][22] provides the ability to nest code blocks under blockquotes,
|
||||
lists and other block elements, which the [Fenced Code Blocks][23] extension
|
||||
from the standard Markdown library doesn't parse correctly.
|
||||
|
||||
[22]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
|
||||
[23]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
|
||||
|
||||
### Tasklist
|
||||
|
||||
[Tasklist][24] adds support for styled checkbox lists. This is useful for
|
||||
keeping track of tasks and showing what has been done and has yet to be done.
|
||||
Checkbox lists are like regular lists, but prefixed with `[ ]` for empty or
|
||||
`[x]` for filled checkboxes.
|
||||
|
||||
Example:
|
||||
|
||||
``` markdown
|
||||
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
* [x] Nulla lobortis egestas semper
|
||||
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
|
||||
* [ ] Vestibulum convallis sit amet nisi a tincidunt
|
||||
* [x] In hac habitasse platea dictumst
|
||||
* [x] In scelerisque nibh non dolor mollis congue sed et metus
|
||||
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
|
||||
* [ ] Praesent sed risus massa
|
||||
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
|
||||
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
* [x] Nulla lobortis egestas semper
|
||||
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
|
||||
* [ ] Vestibulum convallis sit amet nisi a tincidunt
|
||||
* [x] In hac habitasse platea dictumst
|
||||
* [x] In scelerisque nibh non dolor mollis congue sed et metus
|
||||
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
|
||||
* [ ] Praesent sed risus massa
|
||||
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
|
||||
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
|
||||
|
||||
[24]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
|
||||
|
||||
### Tilde
|
||||
|
||||
[Tilde][25] provides an easy way to ~~strike through~~ cross out text.
|
||||
The portion of text that should be erased must be enclosed in two tildes
|
||||
`~~...~~` and the extension will take care of the rest.
|
||||
|
||||
[25]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
|
||||
@@ -2,113 +2,143 @@
|
||||
|
||||
## Installation
|
||||
|
||||
!!! tip "Set up Material using Docker"
|
||||
|
||||
The official [Docker image][1] for Material comes with all dependencies
|
||||
pre-installed and ready-to-use with the latest version published on PyPI,
|
||||
packaged in a very small image (23MB compressed).
|
||||
|
||||
[1]: https://hub.docker.com/r/squidfunk/mkdocs-material/
|
||||
|
||||
### Installing MkDocs
|
||||
|
||||
Before installing [MkDocs][], you need to make sure you have Python and `pip`
|
||||
– the Python package manager – up and running. Assuming you are a developer and
|
||||
have a basic understanding of how things work and what StackOverflow is, we
|
||||
won't provide guidelines on setting those up. You can verify if you're already
|
||||
Before installing [MkDocs][2], you need to make sure you have Python and `pip`
|
||||
– the Python package manager – up and running. You can verify if you're already
|
||||
good to go with the following commands:
|
||||
|
||||
``` sh
|
||||
python --version
|
||||
# Python 2.7.2
|
||||
# Python 2.7.13
|
||||
pip --version
|
||||
# pip 1.5.2
|
||||
# pip 9.0.1
|
||||
```
|
||||
|
||||
Installing and verifying MkDocs is as simple as:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs && mkdocs --version
|
||||
# mkdocs, version 0.15.2
|
||||
# mkdocs, version 0.16.0
|
||||
```
|
||||
|
||||
!!! warning "MkDocs version requirements"
|
||||
|
||||
Material requires MkDocs >= 0.16.
|
||||
|
||||
[2]: http://www.mkdocs.org
|
||||
|
||||
### Installing Material
|
||||
|
||||
Next, assuming you have MkDocs up and running `mkdocs-material` can be
|
||||
installed with `pip`:
|
||||
#### using pip
|
||||
|
||||
Material can be installed with `pip`:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs-material
|
||||
```
|
||||
|
||||
## Usage
|
||||
#### using choco
|
||||
|
||||
If you haven't already done it, creating a new documentation project is really
|
||||
simple in MkDocs:
|
||||
If you're on Windows you can use [Chocolatey][3] to install [Material][4]:
|
||||
|
||||
``` sh
|
||||
mkdocs new my-project
|
||||
cd my-project
|
||||
``` dos
|
||||
choco install mkdocs-material
|
||||
```
|
||||
|
||||
MkDocs will create the necessary files and base directory structure inside the
|
||||
folder `my-project`. In order to enable the theme just add the following line
|
||||
to the auto-generated `mkdocs.yml`:
|
||||
This will install all required dependencies like [Python][5] and [MkDocs][6].
|
||||
|
||||
[3]: https://chocolatey.org
|
||||
[4]: https://chocolatey.org/packages/mkdocs-material
|
||||
[5]: https://chocolatey.org/packages/python
|
||||
[6]: https://chocolatey.org/packages/mkdocs
|
||||
|
||||
#### cloning from GitHub
|
||||
|
||||
Material can also be used without a system-wide installation by cloning the
|
||||
repository into a subfolder of your project's root directory:
|
||||
|
||||
``` sh
|
||||
git clone https://github.com/squidfunk/mkdocs-material.git
|
||||
```
|
||||
|
||||
This is especially useful if you want to [extend the theme][7] and
|
||||
[override some parts][8] of the theme. The theme will reside in the folder
|
||||
`mkdocs-material/material`.
|
||||
|
||||
[7]: customization.md#extending-the-theme
|
||||
[8]: customization.md#overriding-partials
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
!!! warning "Installation on macOS"
|
||||
|
||||
When you're running the pre-installed version of Python on macOS, `pip`
|
||||
tries to install packages in a folder for which your user might not have
|
||||
the adequate permissions. There are two possible solutions for this:
|
||||
|
||||
1. **Installing in user space** (recommended): Provide the `--user` flag
|
||||
to the install command and `pip` will install the package in a user-site
|
||||
location. This is the recommended way.
|
||||
|
||||
2. **Switching to a homebrewed Python**: Upgrade your Python installation
|
||||
to a self-contained solution by installing Python with Homebrew. This
|
||||
should eliminate a lot of problems you may be having with `pip`.
|
||||
|
||||
!!! failure "Error: unrecognized theme 'material'"
|
||||
|
||||
If you run into this error, the most common reason is that you installed
|
||||
MkDocs through some package manager (e.g. Homebrew or `apt-get`) and the
|
||||
Material theme through `pip`, so both packages end up in different
|
||||
locations. MkDocs only checks its install location for themes.
|
||||
|
||||
## Usage
|
||||
|
||||
In order to enable the theme just add one of the following lines to your
|
||||
project's `mkdocs.yml`. If you installed Material using pip:
|
||||
|
||||
``` yaml
|
||||
theme: 'material'
|
||||
```
|
||||
|
||||
If your project is hosted on GitHub, add the repository link to the
|
||||
configuration. If the `repo_name` equals **GitHub**, the Material theme will
|
||||
add a download and star button, and display the number of stars:
|
||||
If you cloned Material from GitHub:
|
||||
|
||||
``` yaml
|
||||
repo_name: 'GitHub'
|
||||
repo_url: 'https://github.com/my-github-handle/my-project'
|
||||
theme_dir: 'mkdocs-material/material'
|
||||
```
|
||||
|
||||
MkDocs includes a development server, so you can view your changes as you go -
|
||||
very handy. Spin it up with the following command:
|
||||
MkDocs includes a development server, so you can review your changes as you go.
|
||||
The development server can be started with the following command:
|
||||
|
||||
``` sh
|
||||
mkdocs serve
|
||||
```
|
||||
|
||||
Now you can go to [localhost:8000](http://localhost:8000) and the Material
|
||||
theme should be visible. You can now start writing your documentation, or read
|
||||
on and customize the theme through some options.
|
||||
Now you can point your browser to [http://localhost:8000][9] and the Material
|
||||
theme should be visible. From here on, you can start writing your documentation,
|
||||
or read on and customize the theme through some options.
|
||||
|
||||
[9]: http://localhost:8000
|
||||
|
||||
## Options
|
||||
|
||||
The Material theme adds some extra variables for configuration via your
|
||||
project's `mkdocs.yml`. See the following section for all available options.
|
||||
|
||||
### Adding a version
|
||||
|
||||
In order to add the current version next to the project banner inside the
|
||||
drawer, you can set the variable `extra.version`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
version: '0.1.0'
|
||||
```
|
||||
|
||||
This will also change the link behind the download button to point to the
|
||||
archive with the respective version on GitHub, assuming a release tagged with
|
||||
this exact version identifier.
|
||||
|
||||
### Adding a logo
|
||||
|
||||
If your project has a logo, you can add it to the drawer/navigation by defining
|
||||
the variable `extra.logo`. Ideally, the image of your logo should have
|
||||
rectangular shape with a minimum resolution of 128x128 and leave some room
|
||||
towards the edges. The logo will also be used as a web application icon on iOS.
|
||||
Simply create the folder `docs/images`, add your image and reference it via:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
logo: 'images/logo.png'
|
||||
```
|
||||
project's `mkdocs.yml`. See the following sections for all available options.
|
||||
|
||||
### Changing the color palette
|
||||
|
||||
Material defines a default hue for every primary and accent color on Google's
|
||||
material design [color palette][]. This makes it very easy to change the
|
||||
overall look of the theme. Just set the variables `extra.palette.primary` and
|
||||
`extra.palette.accent` to one of the colors defined in the palette:
|
||||
A default hue is defined for every primary and accent color on Google's
|
||||
Material Design [color palette][10], which makes it very easy to change the
|
||||
overall look of the theme. Just set the primary and accent colors using the
|
||||
following variables:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
@@ -117,74 +147,203 @@ extra:
|
||||
accent: 'light blue'
|
||||
```
|
||||
|
||||
Color names can be written upper- or lowercase but must match the names of the
|
||||
material design [color palette][]. Valid values are: _red_, _pink_, _purple_,
|
||||
_deep purple_, _indigo_, _blue_, _light blue_, _cyan_, _teal_, _green_, _light
|
||||
green_, _lime_, _yellow_, _amber_, _orange_, _deep orange_, _brown_, _grey_ and
|
||||
_blue grey_. The last three colors can only be used as a primary color.
|
||||
Color names are case-insensitive, but must match the names of the Material
|
||||
Design color palette. Valid values are: `red`, `pink`, `purple`, `deep purple`,
|
||||
`indigo`, `blue`, `light blue`, `cyan`, `teal`, `green`, `light green`, `lime`,
|
||||
`yellow`, `amber`, `orange`, `deep orange`, `brown`, `grey` and `blue grey`.
|
||||
The last three colors can only be used as a primary color.
|
||||
|
||||

|
||||
If the color is set via this configuration, an additional CSS file that
|
||||
defines the color palette is automatically included. If you want to keep things
|
||||
lean, clone the repository and recompile the theme with your custom colors set.
|
||||
See the guide on [customization][11] for more information.
|
||||
|
||||
If the color is set via this configuration, an additional CSS file called
|
||||
`palettes.css` is included that defines the color palettes. If you want to
|
||||
keep things lean, clone the repository and recompile the theme with your
|
||||
custom colors set. See [this article](customization.md) for more information.
|
||||
[10]: http://www.materialui.co/colors
|
||||
[11]: customization.md
|
||||
|
||||
#### Primary colors
|
||||
|
||||
Click on a tile to change the primary color of the theme:
|
||||
|
||||
<button data-md-color-primary="red">Red</button>
|
||||
<button data-md-color-primary="pink">Pink</button>
|
||||
<button data-md-color-primary="purple">Purple</button>
|
||||
<button data-md-color-primary="deep-purple">Deep Purple</button>
|
||||
<button data-md-color-primary="indigo">Indigo</button>
|
||||
<button data-md-color-primary="blue">Blue</button>
|
||||
<button data-md-color-primary="light-blue">Light Blue</button>
|
||||
<button data-md-color-primary="cyan">Cyan</button>
|
||||
<button data-md-color-primary="teal">Teal</button>
|
||||
<button data-md-color-primary="green">Green</button>
|
||||
<button data-md-color-primary="light-green">Light Green</button>
|
||||
<button data-md-color-primary="lime">Lime</button>
|
||||
<button data-md-color-primary="yellow">Yellow</button>
|
||||
<button data-md-color-primary="amber">Amber</button>
|
||||
<button data-md-color-primary="orange">Orange</button>
|
||||
<button data-md-color-primary="deep-orange">Deep Orange</button>
|
||||
<button data-md-color-primary="brown">Brown</button>
|
||||
<button data-md-color-primary="grey">Grey</button>
|
||||
<button data-md-color-primary="blue-grey">Blue Grey</button>
|
||||
|
||||
<script>
|
||||
var buttons = document.querySelectorAll("button[data-md-color-primary]");
|
||||
Array.prototype.forEach.call(buttons, function(button) {
|
||||
button.addEventListener("click", function() {
|
||||
document.body.dataset.mdColorPrimary = this.dataset.mdColorPrimary;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
#### Accent colors
|
||||
|
||||
Click on a tile to change the accent color of the theme:
|
||||
|
||||
<button data-md-color-accent="red">Red</button>
|
||||
<button data-md-color-accent="pink">Pink</button>
|
||||
<button data-md-color-accent="purple">Purple</button>
|
||||
<button data-md-color-accent="deep-purple">Deep Purple</button>
|
||||
<button data-md-color-accent="indigo">Indigo</button>
|
||||
<button data-md-color-accent="blue">Blue</button>
|
||||
<button data-md-color-accent="light-blue">Light Blue</button>
|
||||
<button data-md-color-accent="cyan">Cyan</button>
|
||||
<button data-md-color-accent="teal">Teal</button>
|
||||
<button data-md-color-accent="green">Green</button>
|
||||
<button data-md-color-accent="light-green">Light Green</button>
|
||||
<button data-md-color-accent="lime">Lime</button>
|
||||
<button data-md-color-accent="yellow">Yellow</button>
|
||||
<button data-md-color-accent="amber">Amber</button>
|
||||
<button data-md-color-accent="orange">Orange</button>
|
||||
<button data-md-color-accent="deep-orange">Deep Orange</button>
|
||||
|
||||
<script>
|
||||
var buttons = document.querySelectorAll("button[data-md-color-accent]");
|
||||
Array.prototype.forEach.call(buttons, function(button) {
|
||||
button.addEventListener("click", function() {
|
||||
document.body.dataset.mdColorAccent = this.dataset.mdColorAccent;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
### Changing the font family
|
||||
|
||||
Material uses the [Ubuntu font family][] by default, specifically the regular
|
||||
sans-serif type for text and the monospaced type for code. Both fonts are
|
||||
loaded from [Google Fonts][] and can be easily changed to other fonts, like for
|
||||
example Google's own [Roboto font][]:
|
||||
By default the [Roboto font family][12] is included with the theme, specifically
|
||||
the regular sans-serif type for text and the `monospaced` type for code. Both
|
||||
fonts are loaded from [Google Fonts][13] and can be changed to other fonts,
|
||||
like for example the [Ubuntu font family][14]:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
font:
|
||||
text: 'Roboto'
|
||||
code: 'Roboto Mono'
|
||||
text: 'Ubuntu'
|
||||
code: 'Ubuntu Mono'
|
||||
```
|
||||
|
||||
The text font will be loaded in font-weights 400 and **700**, the monospaced
|
||||
font in regular weight. If you want to load fonts from other destinations or
|
||||
don't want to use the Google Fonts loading magic, just set `extra.font` to
|
||||
`'none'`:
|
||||
The text font will be loaded in weights 400 and **700**, the `monospaced` font
|
||||
in regular weight. If you want to load fonts from other destinations or don't
|
||||
want to use the Google Fonts loading magic, just set `font` to `false`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
font: 'none'
|
||||
font: false
|
||||
```
|
||||
|
||||
### Localization
|
||||
[12]: https://fonts.google.com/specimen/Roboto
|
||||
[13]: https://fonts.google.com
|
||||
[14]: https://fonts.google.com/specimen/Ubuntu
|
||||
|
||||
The **Previous** and **Next** labels in the footer can easily be changed by
|
||||
defining the variables `extra.i18n.prev` and `extra.i18n.next`:
|
||||
### Adding a source repository
|
||||
|
||||
To include a link to the repository of your project within your documentation,
|
||||
set the following variables via your project's `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
repo_name: 'my-github-handle/my-project'
|
||||
repo_url: 'https://github.com/my-github-handle/my-project'
|
||||
```
|
||||
|
||||
The name of the repository will be rendered next to the search bar on big
|
||||
screens and as part of the main navigation drawer on smaller screen sizes.
|
||||
Furthermore, if `repo_url` points to a GitHub, BitBucket or GitLab repository,
|
||||
the respective service logo will be shown next to the name of the repository.
|
||||
Additionally, for GitHub, the number of stars and forks is shown.
|
||||
|
||||
If the repository is hosted in a private environment, the service logo can be
|
||||
set explicitly by setting `extra.repo_icon` to `github`, `gitlab` or
|
||||
`bitbucket`.
|
||||
|
||||
!!! question "Why is there an edit button at the top of every article?"
|
||||
|
||||
If the `repo_url` is set to a GitHub or BitBucket repository, and the
|
||||
`repo_name` is set to *GitHub* or *BitBucket* (implied by default), an
|
||||
edit button will appear at the top of every article. This is the automatic
|
||||
behavior that MkDocs implements. See the [MkDocs documentation][15] on more
|
||||
guidance regarding the `edit_uri` attribute, which defines whether the edit
|
||||
button is shown or not.
|
||||
|
||||
[15]: http://www.mkdocs.org/user-guide/configuration/#edit_uri
|
||||
|
||||
### Adding a favicon
|
||||
|
||||
A favicon can be added by setting the `site_favicon` variable to an `.ico` or
|
||||
image file:
|
||||
|
||||
``` yaml
|
||||
site_favicon: 'images/favicon.ico'
|
||||
```
|
||||
|
||||
### Adding a logo
|
||||
|
||||
Your logo should have rectangular shape with a minimum resolution of 128x128,
|
||||
leave some room towards the edges and be composed of high contrast areas on a
|
||||
transparent ground, as it will be placed on the colored header bar and drawer.
|
||||
Simply create the folder `docs/images`, add your logo and embed it with:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
i18n:
|
||||
prev: 'Previous'
|
||||
next: 'Next'
|
||||
logo: 'images/logo.svg'
|
||||
```
|
||||
|
||||
### Adding a GitHub and Twitter account
|
||||
|
||||
If you have a GitHub and/or Twitter account, you can add links to your
|
||||
accounts to the drawer by setting the variables `extra.author.github` and
|
||||
`extra.author.twitter` respectively:
|
||||
Additionally, the default icon can be changed by setting an arbitrary ligature
|
||||
(or Unicode code point) from the [Material Design icon font][16], e.g.
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
author:
|
||||
github: 'my-github-handle'
|
||||
twitter: 'my-twitter-handle'
|
||||
logo:
|
||||
icon: 'cloud'
|
||||
```
|
||||
|
||||
[16]: https://material.io/icons/
|
||||
|
||||
### Adding social links
|
||||
|
||||
Social accounts can be linked in the footer of the documentation using the
|
||||
automatically included [FontAwesome][17] webfont. The `type` must denote the
|
||||
name of the social service, e.g. `github`, `twitter` or `linkedin` and the
|
||||
`link` must contain the URL you want to link to:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
social:
|
||||
- type: 'github'
|
||||
link: 'https://github.com/squidfunk'
|
||||
- type: 'twitter'
|
||||
link: 'https://twitter.com/squidfunk'
|
||||
- type: 'linkedin'
|
||||
link: 'https://linkedin.com/in/squidfunk'
|
||||
```
|
||||
|
||||
The links are generated in order and the `type` of the links must match the
|
||||
name of the FontAwesome glyph. The `fa` is automatically added, so `github`
|
||||
will result in `fa fa-github`.
|
||||
|
||||
[17]: http://fontawesome.io/icons/
|
||||
|
||||
### Google Analytics integration
|
||||
|
||||
Material makes it easy to integrate site tracking with Google Analytics.
|
||||
Besides basic tracking, clicks on all outgoing links can be tracked, clicks on
|
||||
the download and star button, as well as how site search is used. Tracking can
|
||||
be activated in your project's `mkdocs.yml`:
|
||||
MkDocs makes it easy to integrate site tracking with Google Analytics.
|
||||
Besides basic tracking, clicks on all outgoing links can be tracked as well as
|
||||
how site search is used. Tracking can be activated in your project's
|
||||
`mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
google_analytics:
|
||||
@@ -192,121 +351,204 @@ google_analytics:
|
||||
- 'auto'
|
||||
```
|
||||
|
||||
### Disqus integation
|
||||
|
||||
Material for MkDocs is integrated with [Disqus][18], so if you want to add a
|
||||
comments section to your documentation set the shortname of your Disqus project
|
||||
in your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
disqus: 'your-disqus-shortname'
|
||||
```
|
||||
|
||||
The comments section is inserted in *every page, except the index page*.
|
||||
Additionally, a new entry at the bottom of the table of contents is generated
|
||||
that is linking to the comments section. The necessary JavaScript is
|
||||
automatically included.
|
||||
|
||||
!!! warning "Requirements"
|
||||
|
||||
`site_url` value must be set in `mkdocs.yml` for the Disqus integration to
|
||||
load properly.
|
||||
|
||||
[18]: https://disqus.com
|
||||
|
||||
### Localization
|
||||
|
||||
#### Translations
|
||||
|
||||
Material for MkDocs supports internationalization (i18n). In order to translate
|
||||
the labels (e.g. *Previous* and *Next* in the footer), you can override the
|
||||
file `partials/language.html` and provide your own translations inside the
|
||||
macro `t`:
|
||||
|
||||
``` jinja
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "en",
|
||||
"clipboard.copy": "Copy to clipboard",
|
||||
"clipboard.copied": "Copied to clipboard",
|
||||
"edit.link.title": "Edit this page",
|
||||
"footer.previous": "Previous",
|
||||
"footer.next": "Next",
|
||||
"meta.comments": "Comments",
|
||||
"meta.source": "Source",
|
||||
"search.languages": "",
|
||||
"search.placeholder": "Search",
|
||||
"search.result.placeholder": "Type to start searching",
|
||||
"search.result.none": "No matching documents",
|
||||
"search.result.one": "1 matching document",
|
||||
"search.result.other": "# matching documents",
|
||||
"search.tokenizer": "[\s\-]+",
|
||||
"source.link.title": "Go to repository",
|
||||
"toc.title": "Table of contents"
|
||||
}[key] }}{% endmacro %}
|
||||
```
|
||||
|
||||
Just copy the file from the original theme and make your adjustments. See the
|
||||
section on [overriding partials][19] and the general guide on
|
||||
[theme extension][20] in the customization guide. Furthermore, see the
|
||||
[example configuration][21] for a head start.
|
||||
|
||||
[19]: customization.md#overriding-partials
|
||||
[20]: customization.md#extending-the-theme
|
||||
[21]: https://github.com/squidfunk/mkdocs-material/tree/master/examples/language
|
||||
|
||||
#### Site search
|
||||
|
||||
Site search is implemented using [lunr.js][22], which includes stemmers for the
|
||||
English language by default, while stemmers for other languages are included
|
||||
with [lunr-languages][23], both of which are integrated with this theme. Support
|
||||
for other languages and even multilingual search can be activated by setting
|
||||
the key `search.languages` to a comma-separated list of supported 2-letter
|
||||
language codes, e.g.:
|
||||
|
||||
``` jinja
|
||||
{% macro t(key) %}{{ {
|
||||
...
|
||||
"search.languages": "en, de, ru",
|
||||
...
|
||||
}[key] }}{% endmacro %}
|
||||
```
|
||||
|
||||
This will automatically load the stemmers for the specified languages and
|
||||
set them up with site search, nothing else to be done.
|
||||
|
||||
At the time of writing, the following languages are supported: English `en`,
|
||||
French `fr`, Spanish `es`, Italian `it`, Japanese `jp`, Dutch `du`, Danish `da`,
|
||||
Portguese `pt`, Finnish `fi`, Romanian `ro`, Hungarian `hu`, Russian `ru`,
|
||||
Norwegian `no`, Swedish `sv` and Turkish `tr`.
|
||||
|
||||
!!! warning "Only specify the languages you really need"
|
||||
|
||||
Be aware that including support for other languages increases the general
|
||||
JavaScript payload by around 20kb (without gzip) and by another 15-30kb per
|
||||
language.
|
||||
|
||||
The separator for tokenization can also be customized, which makes it possible
|
||||
to index parts of words that are separated by `-` or `.` for example:
|
||||
|
||||
``` jinja
|
||||
{% macro t(key) %}{{ {
|
||||
...
|
||||
"search.tokenizer": "[\s\-\.]+",
|
||||
...
|
||||
}[key] }}{% endmacro %}
|
||||
```
|
||||
|
||||
[22]: https://lunrjs.com
|
||||
[23]: https://github.com/MihaiValentin/lunr-languages
|
||||
|
||||
### Tabs
|
||||
|
||||
From version 1.1.0 on, Material supports another layer on top of the main
|
||||
navigation for larger screens in the form of tabs. This is especially useful
|
||||
for larger documentation projects with only few top-level sections. Tabs can be
|
||||
enabled by setting the respective feature flag to true:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
feature:
|
||||
tabs: true
|
||||
```
|
||||
|
||||
### More advanced customization
|
||||
|
||||
If you want to change the general appearance of the Material theme, see
|
||||
[this article](customization.md) for more information on advanced customization.
|
||||
[this article][24] for more information on advanced customization.
|
||||
|
||||
[24]: customization.md
|
||||
|
||||
## Extensions
|
||||
|
||||
MkDocs supports several [Markdown extensions][]. The following extensions are
|
||||
not enabled by default (see the link for which are enabled by default), so you
|
||||
have to switch them on explicitly.
|
||||
|
||||
### CodeHilite (recommended)
|
||||
|
||||
This extensions uses [Pygments][] (install with `pip install pygments`) to add
|
||||
code highlighting to fenced code blocks. It might not be the best code
|
||||
highlighter, but it works without JavaScript and on the server:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- codehilite(css_class=code)
|
||||
```
|
||||
|
||||
If you want more extensive highlighting, you can use a JavaScript library like
|
||||
[highlight.js][], which is not included in Material. See [this link][extra] for
|
||||
further instructions
|
||||
|
||||
### Permalinks
|
||||
|
||||
In order to add [permalinks][] to the headers of your article, set the
|
||||
`markdown_extensions.toc.permalink` variable to a symbol, e.g. `#`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: '#'
|
||||
```
|
||||
|
||||
The symbol can be chosen freely, it can even be a WebFont icon.
|
||||
|
||||
### Admonition
|
||||
|
||||
[Admonition][] is a handy extension that adds block-styled side content to your
|
||||
documentation, for example hints, notes or warnings. It can be enabled by
|
||||
setting the variable `markdown_extensions.admonition`:
|
||||
MkDocs supports several [Markdown extensions][25]. The following extensions
|
||||
are not enabled by default (see the link for which are enabled by default)
|
||||
but highly recommended, so they should be switched on at all times:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite:
|
||||
guess_lang: false
|
||||
- toc:
|
||||
permalink: true
|
||||
```
|
||||
|
||||
In order to add a note, use the following syntax inside your article:
|
||||
For more information, see the following list of extensions supported by the
|
||||
Material theme including more information regarding installation and usage:
|
||||
|
||||
``` markdown
|
||||
!!! note
|
||||
Nothing to see here, move along.
|
||||
```
|
||||
* [Admonition][26]
|
||||
* [Codehilite][27]
|
||||
* [Footnotes][28]
|
||||
* [Metadata][29]
|
||||
* [Permalinks][30]
|
||||
* [PyMdown Extensions][31]
|
||||
|
||||
This will print the following block:
|
||||
|
||||
!!! note
|
||||
Nothing to see here, move along.
|
||||
|
||||
The Material template adds a neutral color for the `note` class and a red color
|
||||
for the `warning` class. You can also add a custom title:
|
||||
|
||||
``` markdown
|
||||
!!! warning "Don't try this at home"
|
||||
If you do, you will regret it.
|
||||
```
|
||||
|
||||
This will print:
|
||||
|
||||
!!! warning "Don't try this at home"
|
||||
If you do, you will regret it.
|
||||
|
||||
More colors can be freely defined.
|
||||
[25]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
|
||||
[26]: extensions/admonition.md
|
||||
[27]: extensions/codehilite.md
|
||||
[28]: extensions/footnotes.md
|
||||
[29]: extensions/metadata.md
|
||||
[30]: extensions/permalinks.md
|
||||
[31]: extensions/pymdown.md
|
||||
|
||||
## Full example
|
||||
|
||||
Below is a full example configuration for a mkdocs.yml:
|
||||
Below is a full example configuration for a `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
# Project information
|
||||
site_name: 'My Project'
|
||||
site_description: 'A short description of my project'
|
||||
site_author: 'John Doe'
|
||||
site_url: 'https://my-github-handle.github.io/my-project'
|
||||
site_url: 'https://john-doe.github.io/my-project'
|
||||
|
||||
# Repository
|
||||
repo_name: 'GitHub'
|
||||
repo_url: 'https://github.com/my-github-handle/my-project'
|
||||
repo_name: 'my-github-handle/my-project'
|
||||
repo_url: 'https://github.com/john-doe/my-project'
|
||||
|
||||
# Copyright
|
||||
copyright: 'Copyright (c) 2016 John Doe'
|
||||
copyright: 'Copyright © 2016 - 2017 John Doe'
|
||||
|
||||
# Documentation and theme
|
||||
docs_dir: 'docs'
|
||||
theme: 'material'
|
||||
|
||||
# Options
|
||||
extra:
|
||||
version: '0.1.0'
|
||||
logo: 'images/logo.png'
|
||||
logo: 'images/logo.svg'
|
||||
palette:
|
||||
primary: 'indigo'
|
||||
accent: 'light blue'
|
||||
accent: 'indigo'
|
||||
font:
|
||||
text: 'Roboto'
|
||||
code: 'Roboto Mono'
|
||||
i18n:
|
||||
prev: 'Previous'
|
||||
next: 'Next'
|
||||
author:
|
||||
github: 'my-github-handle'
|
||||
twitter: 'my-twitter-handle'
|
||||
social:
|
||||
- type: 'github'
|
||||
link: 'https://github.com/john-doe'
|
||||
- type: 'twitter'
|
||||
link: 'https://twitter.com/john-doe'
|
||||
- type: 'linkedin'
|
||||
link: 'https://linkedin.com/in/john-doe'
|
||||
|
||||
# Google Analytics
|
||||
google_analytics:
|
||||
@@ -315,20 +557,9 @@ google_analytics:
|
||||
|
||||
# Extensions
|
||||
markdown_extensions:
|
||||
- codehilite(css_class=code)
|
||||
- admonition
|
||||
- codehilite:
|
||||
guess_lang: false
|
||||
- toc:
|
||||
permalink: '#'
|
||||
permalink: true
|
||||
```
|
||||
|
||||
[MkDocs]: http://www.mkdocs.org
|
||||
[color palette]: http://www.materialui.co/colors
|
||||
[Ubuntu font family]: http://font.ubuntu.com
|
||||
[Google Fonts]: https://www.google.com/fonts
|
||||
[Roboto font]: https://www.google.com/fonts/specimen/Roboto
|
||||
[Markdown extensions]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
|
||||
[Pygments]: http://pygments.org
|
||||
[highlight.js]: https://highlightjs.org
|
||||
[extra]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
|
||||
[permalinks]: https://en.wikipedia.org/wiki/Permalink
|
||||
[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html
|
||||
|
Before Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 145 KiB |
@@ -1,66 +1,44 @@
|
||||
# Material for MkDocs
|
||||
# Material <small>for MkDocs</small>
|
||||
|
||||
## Beautiful documentation
|
||||
## Beautiful project documentation
|
||||
|
||||
Material is a theme for [MkDocs][], an excellent static site generator geared
|
||||
towards project documentation. It is built using Google's [material design][]
|
||||
guidelines, full responsive, optimized for touch and pointer devices as well
|
||||
as all sorts of screen sizes.
|
||||
Material is a theme for [MkDocs][1], an excellent static site generator geared
|
||||
towards project documentation. It is built using Google's [Material Design][2]
|
||||
guidelines.
|
||||
|
||||

|
||||
[](images/material.png)
|
||||
|
||||
Material is very lightweight – it is built from scratch using Javascript and
|
||||
CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts
|
||||
and Analytics). Yet, it is highly customizable and degrades gracefully in older
|
||||
browsers.
|
||||
[1]: http://www.mkdocs.org
|
||||
[2]: https://material.io/guidelines/material-design/
|
||||
|
||||
## Quick start
|
||||
|
||||
Install with `pip`:
|
||||
Install the latest version of Material with `pip`:
|
||||
|
||||
``` sh
|
||||
pip install mkdocs-material
|
||||
```
|
||||
|
||||
Add the following line to your `mkdocs.yml`:
|
||||
Append the following line to your project's `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
theme: 'material'
|
||||
```
|
||||
|
||||
## Features
|
||||
## What to expect
|
||||
|
||||
- Beautiful, readable and very user-friendly design based on Google's material
|
||||
design guidelines, packed in a full responsive template with a well-defined
|
||||
and [easily customizable color palette][], great typography, as well as a
|
||||
beautiful search interface and footer.
|
||||
* Responsive design and fluid layout for all kinds of screens and devices,
|
||||
designed to serve your project documentation in a user-friendly way with
|
||||
optimal readability.
|
||||
|
||||
- Well-tested and optimized Javascript and CSS including a cross-browser
|
||||
fixed/sticky header, a drawer that even works without Javascript using
|
||||
the [checkbox hack][] with fallbacks, responsive tables that scroll when
|
||||
the screen is too small and well-defined print styles.
|
||||
* Easily customizable primary and accent color, fonts, favicon and logo;
|
||||
straight forward localization through theme extension; integrated with Google
|
||||
Analytics, Disqus and GitHub.
|
||||
|
||||
- Extra configuration options like a [project logo][], links to the authors
|
||||
[GitHub and Twitter accounts][], display of the amount of stars the
|
||||
project has on GitHub and [Google Analytics integration][].
|
||||
* Well-designed search interface accessible through hotkeys (<kbd>F</kbd> or
|
||||
<kbd>S</kbd>), intelligent grouping of search results, search term
|
||||
highlighting and lazy loading.
|
||||
|
||||
- Easily [extendable and customizable][] due to a well-designed asset pipeline
|
||||
built on-top of [Gulp][] with `npm` and `bower` and modular and abstracted
|
||||
style definitions built with [SASS][].
|
||||
For detailed instructions see the [getting started guide][3].
|
||||
|
||||
- Web application capability on iOS – when the page is saved to the homescreen,
|
||||
it behaves and looks like a native application.
|
||||
|
||||
See the [getting started guide](getting-started.md) for instructions how to get
|
||||
it up and running.
|
||||
|
||||
[MkDocs]: http://www.mkdocs.org
|
||||
[material design]: https://www.google.com/design/spec/material-design
|
||||
[checkbox hack]: http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/
|
||||
[project logo]: getting-started.md#adding-a-logo
|
||||
[easily customizable color palette]: getting-started.md#changing-the-color-palette
|
||||
[GitHub and Twitter accounts]: getting-started.md#adding-a-github-and-twitter-account
|
||||
[Google Analytics integration]: getting-started.md#google-analytics-integration
|
||||
[extendable and customizable]: customization.md
|
||||
[Gulp]: http://gulpjs.com
|
||||
[SASS]: http://sass-lang.com
|
||||
[3]: getting-started.md
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**MIT License**
|
||||
|
||||
Copyright (c) 2016 Martin Donath
|
||||
Copyright © 2016 - 2017 Martin Donath
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
@@ -20,4 +20,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
IN THE SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,432 @@
|
||||
# Release notes
|
||||
|
||||
## Upgrading
|
||||
|
||||
To upgrade Material to the latest version, use pip:
|
||||
|
||||
``` sh
|
||||
pip install --upgrade mkdocs-material
|
||||
```
|
||||
|
||||
To determine the currently installed version, use the following command:
|
||||
|
||||
``` sh
|
||||
pip show mkdocs-material | grep -E ^Version
|
||||
# Version 1.11.0
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1.11.0 <small>_ October 19, 2017</small>
|
||||
|
||||
* Added localization to clipboard
|
||||
* Refactored i18n localization logic
|
||||
|
||||
### 1.10.4 <small>_ October 18, 2017</small>
|
||||
|
||||
* Improved print styles of code blocks
|
||||
* Improved search UX (don't close on enter if no selection)
|
||||
* Fixed [#495][495]: Vertical scrollbar on short pages
|
||||
|
||||
[495]: https://github.com/squidfunk/mkdocs-material/issues/484
|
||||
|
||||
### 1.10.3 <small>_ October 11, 2017</small>
|
||||
|
||||
* Fixed [#484][484]: Vertical scrollbar on some MathJax formulas
|
||||
* Fixed [#483][483]: Footnote backref target offset regression
|
||||
|
||||
[483]: https://github.com/squidfunk/mkdocs-material/issues/483
|
||||
[484]: https://github.com/squidfunk/mkdocs-material/issues/484
|
||||
|
||||
### 1.10.2 <small>_ October 6, 2017</small>
|
||||
|
||||
* Fixed [#468][468]: Sidebar shows scrollbar if content is shorter (in Safari)
|
||||
|
||||
[468]: https://github.com/squidfunk/mkdocs-material/issues/468
|
||||
|
||||
### 1.10.1 <small>_ September 14, 2017</small>
|
||||
|
||||
* Fixed [#455][455]: Bold code blocks rendered with normal font weight
|
||||
|
||||
[455]: https://github.com/squidfunk/mkdocs-material/issues/455
|
||||
|
||||
### 1.10.0 <small>_ September 1, 2017</small>
|
||||
|
||||
* Added support to make logo default icon configurable
|
||||
* Fixed uninitialized overflow scrolling on main pane for iOS
|
||||
* Fixed error in mobile navigation in case JavaScript is not available
|
||||
* Fixed incorrect color transition for nested panes in mobile navigation
|
||||
* Improved checkbox styles for Tasklist from PyMdown Extension package
|
||||
|
||||
### 1.9.0 <small>_ August 29, 2017</small>
|
||||
|
||||
* Added `info` (synonym: `todo`) style for Admonition
|
||||
* Added `question` (synonym: `help`, `faq`) style for Admonition
|
||||
* Added support for Details from PyMdown Extensions package
|
||||
* Improved Admonition styles to match Details
|
||||
* Improved styles for social links in footer
|
||||
* Replaced ligatures with Unicode code points to avoid broken layout
|
||||
* Upgraded PyMdown Extensions package dependency to >= 3.4
|
||||
|
||||
### 1.8.1 <small>_ August 7, 2017</small>
|
||||
|
||||
* Fixed [#421][421]: Missing pagination for GitHub API
|
||||
|
||||
[421]: https://github.com/squidfunk/mkdocs-material/issues/421
|
||||
|
||||
### 1.8.0 <small>_ August 2, 2017</small>
|
||||
|
||||
* Added support for lazy-loading of search results for better performance
|
||||
* Added support for customization of search tokenizer/separator
|
||||
* Fixed [#424][424]: Search doesn't handle capital letters anymore
|
||||
* Fixed [#419][419]: Search doesn't work on whole words
|
||||
|
||||
[419]: https://github.com/squidfunk/mkdocs-material/issues/419
|
||||
[424]: https://github.com/squidfunk/mkdocs-material/issues/424
|
||||
|
||||
### 1.7.5 <small>_ July 25, 2017</small>
|
||||
|
||||
* Fixed [#398][398]: Forms broken due to search shortcuts
|
||||
* Improved search overall user experience
|
||||
* Improved search matching and highlighting
|
||||
* Improved search accessibility
|
||||
|
||||
[398]: https://github.com/squidfunk/mkdocs-material/issues/398
|
||||
|
||||
### 1.7.4 <small>_ June 21, 2017</small>
|
||||
|
||||
* Fixed functional link colors in table of contents for active palette
|
||||
* Fixed [#368][368]: Compatibility issues with IE11
|
||||
|
||||
[368]: https://github.com/squidfunk/mkdocs-material/issues/368
|
||||
|
||||
### 1.7.3 <small>_ June 7, 2017</small>
|
||||
|
||||
* Fixed error when setting language to Japanese for site search
|
||||
|
||||
### 1.7.2 <small>_ June 6, 2017</small>
|
||||
|
||||
* Fixed offset of search box when `repo_url` is not set
|
||||
* Fixed non-disappearing tooltip
|
||||
|
||||
### 1.7.1 <small>_ June 1, 2017</small>
|
||||
|
||||
* Fixed wrong `z-index` order of header, overlay and drawer
|
||||
* Fixed wrong offset of targeted footnote back references
|
||||
|
||||
### 1.7.0 <small>_ June 1, 2017</small>
|
||||
|
||||
* Added "copy to clipboard" buttons to code blocks
|
||||
* Added support for multilingual site search
|
||||
* Fixed search term highlighting for non-latin languages
|
||||
|
||||
### 1.6.4 <small>_ May 24, 2017</small>
|
||||
|
||||
* Fixed [#337][337]: JavaScript error for GitHub organization URLs
|
||||
|
||||
[337]: https://github.com/squidfunk/mkdocs-material/issues/337
|
||||
|
||||
### 1.6.3 <small>_ May 16, 2017</small>
|
||||
|
||||
* Fixed [#329][329]: Broken source stats for private or unknown GitHub repos
|
||||
|
||||
[329]: https://github.com/squidfunk/mkdocs-material/issues/329
|
||||
|
||||
### 1.6.2 <small>_ May 15, 2017</small>
|
||||
|
||||
* Fixed [#316][316]: Fatal error for git clone on Windows
|
||||
* Fixed [#320][320]: Chrome 58 creates double underline for `abbr` tags
|
||||
* Fixed [#323][323]: Ligatures rendered inside code blocks
|
||||
* Fixed miscalculated sidebar height due to missing margin collapse
|
||||
* Changed deprecated MathJax CDN to Cloudflare
|
||||
|
||||
[316]: https://github.com/squidfunk/mkdocs-material/issues/316
|
||||
[320]: https://github.com/squidfunk/mkdocs-material/issues/320
|
||||
[323]: https://github.com/squidfunk/mkdocs-material/issues/323
|
||||
|
||||
### 1.6.1 <small>_ April 23, 2017</small>
|
||||
|
||||
* Fixed following of active/focused element if search input is focused
|
||||
* Fixed layer order of search component elements
|
||||
|
||||
### 1.6.0 <small>_ April 22, 2017</small>
|
||||
|
||||
* Added build test for Docker image on Travis
|
||||
* Added search overlay for better user experience (focus)
|
||||
* Added language from localizations to `html` tag
|
||||
* Fixed [#270][270]: source links broken for absolute URLs
|
||||
* Fixed missing top spacing for first targeted element in content
|
||||
* Fixed too small footnote divider when using larger font sizes
|
||||
|
||||
[270]: https://github.com/squidfunk/mkdocs-material/issues/270
|
||||
|
||||
### 1.5.5 <small>_ April 20, 2017</small>
|
||||
|
||||
* Fixed [#282][282]: Browser search (<kbd>Meta</kbd>+<kbd>F</kbd>) is hijacked
|
||||
|
||||
[282]: https://github.com/squidfunk/mkdocs-material/issues/282
|
||||
|
||||
### 1.5.4 <small>_ April 8, 2017</small>
|
||||
|
||||
* Fixed broken highlighting for two or more search terms
|
||||
* Fixed missing search results when only a `h1` is present
|
||||
* Fixed unresponsive overlay on Android
|
||||
|
||||
### 1.5.3 <small>_ April 7, 2017</small>
|
||||
|
||||
* Fixed deprecated calls for template variables
|
||||
* Fixed wrong palette color for focused search result
|
||||
* Fixed JavaScript errors on 404 page
|
||||
* Fixed missing top spacing on 404 page
|
||||
* Fixed missing right spacing on overflow of source container
|
||||
|
||||
### 1.5.2 <small>_ April 5, 2017</small>
|
||||
|
||||
* Added requirements as explicit dependencies in `setup.py`
|
||||
* Fixed non-synchronized transitions in search form
|
||||
|
||||
### 1.5.1 <small>_ March 30, 2017</small>
|
||||
|
||||
* Fixed rendering and offset of targetted footnotes
|
||||
* Fixed [#238][238]: Link on logo is not set to `site_url`
|
||||
|
||||
[238]: https://github.com/squidfunk/mkdocs-material/issues/238
|
||||
|
||||
### 1.5.0 <small>_ March 24, 2017</small>
|
||||
|
||||
* Added support for localization of search placeholder
|
||||
* Added keyboard events for quick access of search
|
||||
* Added keyboard events for search control
|
||||
* Added opacity on hover for search buttons
|
||||
* Added git hook to skip CI build on non-src changes
|
||||
* Fixed non-resetting search placeholder when input is cleared
|
||||
* Fixed error for unescaped parentheses in search term
|
||||
* Fixed [#229][229]: Button to clear search missing
|
||||
* Fixed [#231][231]: Escape key doesn't exit search
|
||||
* Removed old-style figures from font feature settings
|
||||
|
||||
[229]: https://github.com/squidfunk/mkdocs-material/issues/229
|
||||
[231]: https://github.com/squidfunk/mkdocs-material/issues/231
|
||||
|
||||
### 1.4.1 <small>_ March 16, 2017</small>
|
||||
|
||||
* Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE)
|
||||
|
||||
### 1.4.0 <small>_ March 16, 2017</small>
|
||||
|
||||
* Added support for grouping searched sections by documents
|
||||
* Added support for highlighting of search terms
|
||||
* Added support for localization of search results
|
||||
* Fixed [#216][216]: table of contents icon doesn't show if `h1` is not present
|
||||
* Reworked style and layout of search results for better usability
|
||||
|
||||
[216]: https://github.com/squidfunk/mkdocs-material/issues/216
|
||||
|
||||
### 1.3.0 <small>_ March 11, 2017</small>
|
||||
|
||||
* Added support for page-specific title and description using metadata
|
||||
* Added support for linking source files to documentation
|
||||
* Fixed jitter and offset of sidebar when zooming browser
|
||||
* Fixed incorrectly initialized tablet sidebar height
|
||||
* Fixed regression for [#1][1]: GitHub stars break if `repo_url` ends with a `/`
|
||||
* Fixed undesired white line below copyright footer due to base font scaling
|
||||
* Fixed issue with whitespace in path for scripts
|
||||
* Fixed [#205][205]: support non-fixed (static) header
|
||||
* Refactored footnote references for better visibility
|
||||
* Reduced repaints to a minimum for non-tabs configuration
|
||||
* Reduced contrast of edit button (slightly)
|
||||
|
||||
[205]: https://github.com/squidfunk/mkdocs-material/issues/205
|
||||
|
||||
### 1.2.0 <small>_ March 3, 2017</small>
|
||||
|
||||
* Added `quote` (synonym: `cite`) style for Admonition
|
||||
* Added help message to build pipeline
|
||||
* Fixed wrong navigation link colors when applying palette
|
||||
* Fixed [#197][197]: Link missing in tabs navigation on deeply nested items
|
||||
* Removed unnecessary dev dependencies
|
||||
|
||||
[197]: https://github.com/squidfunk/mkdocs-material/issues/197
|
||||
|
||||
### 1.1.1 <small>_ February 26, 2017</small>
|
||||
|
||||
* Fixed incorrectly displayed nested lists when using tabs
|
||||
|
||||
### 1.1.0 <small>_ February 26, 2017</small>
|
||||
|
||||
* Added tabs navigation feature (optional)
|
||||
* Added Disqus integration (optional)
|
||||
* Added a high resolution Favicon with the new logo
|
||||
* Added static type checking using Facebook's Flow
|
||||
* Fixed [#173][173]: Dictionary elements have no bottom spacing
|
||||
* Fixed [#175][175]: Tables cannot be set to 100% width
|
||||
* Fixed race conditions in build related to asset revisioning
|
||||
* Fixed accidentally re-introduced Permalink on top-level headline
|
||||
* Fixed alignment of logo in drawer on IE11
|
||||
* Refactored styles related to tables
|
||||
* Refactored and automated Docker build and PyPI release
|
||||
* Refactored build scripts
|
||||
|
||||
[173]: https://github.com/squidfunk/mkdocs-material/issues/173
|
||||
[175]: https://github.com/squidfunk/mkdocs-material/issues/175
|
||||
|
||||
### 1.0.5 <small>_ February 18, 2017</small>
|
||||
|
||||
* Fixed [#153][153]: Sidebar flows out of constrained area in Chrome 56
|
||||
* Fixed [#159][159]: Footer jitter due to JavaScript if content is short
|
||||
|
||||
[153]: https://github.com/squidfunk/mkdocs-material/issues/153
|
||||
[159]: https://github.com/squidfunk/mkdocs-material/issues/159
|
||||
|
||||
### 1.0.4 <small>_ February 16, 2017</small>
|
||||
|
||||
* Fixed [#142][142]: Documentation build errors if `h1` is defined as raw HTML
|
||||
* Fixed [#164][164]: PyPI release does not build and install
|
||||
* Fixed offsets of targeted headlines
|
||||
* Increased sidebar font size by `0.12rem`
|
||||
|
||||
[142]: https://github.com/squidfunk/mkdocs-material/issues/142
|
||||
[164]: https://github.com/squidfunk/mkdocs-material/issues/164
|
||||
|
||||
### 1.0.3 <small>_ January 22, 2017</small>
|
||||
|
||||
* Fixed [#117][117]: Table of contents items don't blur on fast scrolling
|
||||
* Refactored sidebar positioning logic
|
||||
* Further reduction of repaints
|
||||
|
||||
[117]: https://github.com/squidfunk/mkdocs-material/issues/117
|
||||
|
||||
### 1.0.2 <small>_ January 15, 2017</small>
|
||||
|
||||
* Fixed [#108][108]: Horizontal scrollbar in content area
|
||||
|
||||
[108]: https://github.com/squidfunk/mkdocs-material/issues/108
|
||||
|
||||
### 1.0.1 <small>_ January 14, 2017</small>
|
||||
|
||||
* Fixed massive repaints happening when scrolling
|
||||
* Fixed footer back reference positions in case of overflow
|
||||
* Fixed header logo from showing when the menu icon is rendered
|
||||
* Changed scrollbar behavior to only show when content overflows
|
||||
|
||||
### 1.0.0 <small>_ January 13, 2017</small>
|
||||
|
||||
* Introduced Webpack for more sophisticated JavaScript bundling
|
||||
* Introduced ESLint and Stylelint for code style checks
|
||||
* Introduced more accurate Material Design colors and shadows
|
||||
* Introduced modular scales for harmonic font sizing
|
||||
* Introduced git-hooks for better development workflow
|
||||
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
|
||||
* Rewrite of JavaScript using ES6 and Babel as a transpiler
|
||||
* Rewrite of Admonition, Permalinks and CodeHilite integration
|
||||
* Rewrite of the complete typographical system
|
||||
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
|
||||
* Removed Bower as a dependency in favor of NPM
|
||||
* Removed custom icon build in favor of the Material Design iconset
|
||||
* Removed `_blank` targets on links due to vulnerability: http://bit.ly/1Mk2Rtw
|
||||
* Removed unversioned assets from build directory
|
||||
* Restructured templates into base templates and partials
|
||||
* Added build and watch scripts in `package.json`
|
||||
* Added support for Metadata and Footnotes Markdown extensions
|
||||
* Added support for PyMdown Extensions package
|
||||
* Added support for collapsible sections in navigation
|
||||
* Added support for separate table of contents
|
||||
* Added support for better accessibility through REM-based layout
|
||||
* Added icons for GitHub, GitLab and BitBucket integrations
|
||||
* Added more detailed documentation on specimen, extensions etc.
|
||||
* Added a `404.html` error page for deployment on GitHub Pages
|
||||
* Fixed live reload chain in watch mode when saving a template
|
||||
* Fixed variable references to work with MkDocs 0.16
|
||||
|
||||
### 0.2.4 <small>_ June 26, 2016</small>
|
||||
|
||||
* Fixed improperly set default favicon
|
||||
* Fixed [#33][33]: Protocol relative URL for webfonts doesn't work with
|
||||
`file://`
|
||||
* Fixed [#34][34]: IE11 on Windows 7 doesn't honor `max-width` on `main` tag
|
||||
* Fixed [#35][35]: Add styling for blockquotes
|
||||
|
||||
[33]: https://github.com/squidfunk/mkdocs-material/issues/25
|
||||
[34]: https://github.com/squidfunk/mkdocs-material/issues/26
|
||||
[35]: https://github.com/squidfunk/mkdocs-material/issues/30
|
||||
|
||||
### 0.2.3 <small>_ May 16, 2016</small>
|
||||
|
||||
* Fixed [#25][25]: Highlight inline fenced blocks
|
||||
* Fixed [#26][26]: Better highlighting for keystrokes
|
||||
* Fixed [#30][30]: Suboptimal syntax highlighting for PHP
|
||||
|
||||
[25]: https://github.com/squidfunk/mkdocs-material/issues/25
|
||||
[26]: https://github.com/squidfunk/mkdocs-material/issues/26
|
||||
[30]: https://github.com/squidfunk/mkdocs-material/issues/30
|
||||
|
||||
### 0.2.2 <small>_ March 20, 2016</small>
|
||||
|
||||
* Fixed [#15][15]: Document Pygments dependency for CodeHilite
|
||||
* Fixed [#16][16]: Favicon could not be set through `mkdocs.yml`
|
||||
* Fixed [#17][17]: Put version into own container for styling
|
||||
* Fixed [#20][20]: Fix rounded borders for tables
|
||||
|
||||
[15]: https://github.com/squidfunk/mkdocs-material/issues/15
|
||||
[16]: https://github.com/squidfunk/mkdocs-material/issues/16
|
||||
[17]: https://github.com/squidfunk/mkdocs-material/issues/17
|
||||
[20]: https://github.com/squidfunk/mkdocs-material/issues/20
|
||||
|
||||
### 0.2.1 <small>_ March 12, 2016</small>
|
||||
|
||||
* Fixed [#10][10]: Invisible header after closing search bar with
|
||||
<kbd>ESC</kbd> key
|
||||
* Fixed [#13][13]: Table cells don't wrap
|
||||
* Fixed empty list in table of contents when no headline is defined
|
||||
* Corrected wrong path for static asset monitoring in Gulpfile.js
|
||||
* Set up tracking of site search for Google Analytics
|
||||
|
||||
[10]: https://github.com/squidfunk/mkdocs-material/issues/10
|
||||
[13]: https://github.com/squidfunk/mkdocs-material/issues/13
|
||||
|
||||
### 0.2.0 <small>_ February 24, 2016</small>
|
||||
|
||||
* Fixed [#6][6]: Include multiple color palettes via `mkdocs.yml`
|
||||
* Fixed [#7][7]: Better colors for links inside admonition notes and warnings
|
||||
* Fixed [#9][9]: Text for prev/next footer navigation should be customizable
|
||||
* Refactored templates (replaced `if`/`else` with modifiers where possible)
|
||||
|
||||
[6]: https://github.com/squidfunk/mkdocs-material/issues/6
|
||||
[7]: https://github.com/squidfunk/mkdocs-material/issues/7
|
||||
[9]: https://github.com/squidfunk/mkdocs-material/issues/9
|
||||
|
||||
### 0.1.3 <small>_ February 21, 2016</small>
|
||||
|
||||
* Fixed [#3][3]: Ordered lists within an unordered list have `::before` content
|
||||
* Fixed [#4][4]: Click on Logo/Title without Github-Repository: `"None"`
|
||||
* Fixed [#5][5]: Page without headlines renders empty list in table of contents
|
||||
* Moved Modernizr to top to ensure basic usability in IE8
|
||||
|
||||
[3]: https://github.com/squidfunk/mkdocs-material/issues/3
|
||||
[4]: https://github.com/squidfunk/mkdocs-material/issues/4
|
||||
[5]: https://github.com/squidfunk/mkdocs-material/issues/5
|
||||
|
||||
### 0.1.2 <small>_ February 16, 2016</small>
|
||||
|
||||
* Fixed styles for deep navigational hierarchies
|
||||
* Fixed webfont delivery problem when hosted in subdirectories
|
||||
* Fixed print styles in mobile/tablet configuration
|
||||
* Added option to configure fonts in `mkdocs.yml` with fallbacks
|
||||
* Changed styles for admonition notes and warnings
|
||||
* Set download link to latest version if available
|
||||
* Set up tracking of outgoing links and actions for Google Analytics
|
||||
|
||||
### 0.1.1 <small>_ February 11, 2016</small>
|
||||
|
||||
* Fixed [#1][1]: GitHub stars don't work if the repo_url ends with a `/`
|
||||
* Updated NPM and Bower dependencies to most recent versions
|
||||
* Changed footer/copyright link to Material theme to GitHub pages
|
||||
* Made MkDocs building/serving in build process optional
|
||||
* Set up continuous integration with [Travis][2]
|
||||
|
||||
[1]: https://github.com/squidfunk/mkdocs-material/issues/1
|
||||
[2]: https://travis-ci.org
|
||||
|
||||
### 0.1.0 <small>_ February 9, 2016</small>
|
||||
|
||||
* Initial release
|
||||
@@ -0,0 +1,246 @@
|
||||
# Specimen
|
||||
|
||||
## Body copy
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras arcu libero,
|
||||
mollis sed massa vel, *ornare viverra ex*. Mauris a ullamcorper lacus. Nullam
|
||||
urna elit, malesuada eget finibus ut, ullamcorper ac tortor. Vestibulum sodales
|
||||
pulvinar nisl, pharetra aliquet est. Quisque volutpat erat ac nisi accumsan
|
||||
tempor.
|
||||
|
||||
**Sed suscipit**, orci non pretium pretium, quam mi gravida metus, vel
|
||||
venenatis justo est condimentum diam. Maecenas non ornare justo. Nam a ipsum
|
||||
eros. [Nulla aliquam](/) orci sit amet nisl posuere malesuada. Proin aliquet
|
||||
nulla velit, quis ultricies orci feugiat et. `Ut tincidunt sollicitudin`
|
||||
tincidunt. Aenean ullamcorper sit amet nulla at interdum.
|
||||
|
||||
## Headings
|
||||
|
||||
### The 3rd level
|
||||
|
||||
#### The 4th level
|
||||
|
||||
##### The 5th level
|
||||
|
||||
###### The 6th level
|
||||
|
||||
## Headings <small>with secondary text</small>
|
||||
|
||||
### The 3rd level <small>with secondary text</small>
|
||||
|
||||
#### The 4th level <small>with secondary text</small>
|
||||
|
||||
##### The 5th level <small>with secondary text</small>
|
||||
|
||||
###### The 6th level <small>with secondary text</small>
|
||||
|
||||
## Blockquotes
|
||||
|
||||
> Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet rutrum.
|
||||
Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Nam vehicula nunc
|
||||
mauris, a ultricies libero efficitur sed. *Class aptent* taciti sociosqu ad
|
||||
litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie
|
||||
imperdiet consectetur.
|
||||
|
||||
### Blockquote nesting
|
||||
|
||||
> **Sed aliquet**, neque at rutrum mollis, neque nisi tincidunt nibh, vitae
|
||||
faucibus lacus nunc at lacus. Nunc scelerisque, quam id cursus sodales, lorem
|
||||
[libero fermentum](/) urna, ut efficitur elit ligula et nunc.
|
||||
|
||||
> > Mauris dictum mi lacus, sit amet pellentesque urna vehicula fringilla.
|
||||
Ut sit amet placerat ante. Proin sed elementum nulla. Nunc vitae sem odio.
|
||||
Suspendisse ac eros arcu. Vivamus orci erat, volutpat a tempor et, rutrum.
|
||||
eu odio.
|
||||
|
||||
> > > `Suspendisse rutrum facilisis risus`, eu posuere neque commodo a.
|
||||
Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed nec leo
|
||||
bibendum, sodales mauris ut, tincidunt massa.
|
||||
|
||||
### Other content blocks
|
||||
|
||||
> Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
|
||||
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
|
||||
sit amet laoreet nibh.
|
||||
``` js hl_lines="8"
|
||||
var _extends = function(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
```
|
||||
|
||||
> > Praesent at `:::js return target`, sodales nibh vel, tempor felis. Fusce
|
||||
vel lacinia lacus. Suspendisse rhoncus nunc non nisi iaculis ultrices.
|
||||
Donec consectetur mauris non neque imperdiet, eget volutpat libero.
|
||||
|
||||
## Lists
|
||||
|
||||
### Unordered lists
|
||||
|
||||
* Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
|
||||
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
|
||||
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
|
||||
|
||||
* Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
|
||||
* Nam vulputate tincidunt fringilla.
|
||||
* Nullam dignissim ultrices urna non auctor.
|
||||
|
||||
* Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin ut
|
||||
eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at aliquam
|
||||
ac, aliquet sed mauris.
|
||||
|
||||
* Nulla et rhoncus turpis. Mauris ultricies elementum leo. Duis efficitur
|
||||
accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh
|
||||
lacinia sed. Aenean in finibus diam.
|
||||
|
||||
### Ordered lists
|
||||
|
||||
1. Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
|
||||
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
|
||||
consectetur feugiat sodales.
|
||||
|
||||
2. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
|
||||
ridiculus mus. Aliquam ornare feugiat quam et egestas. Nunc id erat et quam
|
||||
pellentesque lacinia eu vel odio.
|
||||
|
||||
1. Vivamus venenatis porttitor tortor sit amet rutrum. Pellentesque aliquet
|
||||
quam enim, eu volutpat urna rutrum a. Nam vehicula nunc mauris, a
|
||||
ultricies libero efficitur sed.
|
||||
|
||||
1. Mauris dictum mi lacus
|
||||
2. Ut sit amet placerat ante
|
||||
3. Suspendisse ac eros arcu
|
||||
|
||||
2. Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet
|
||||
rutrum. Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Sed
|
||||
aliquet, neque at rutrum mollis, neque nisi tincidunt nibh.
|
||||
|
||||
3. Pellentesque eget `:::js var _extends` ornare tellus, ut gravida mi.
|
||||
``` js hl_lines="1"
|
||||
var _extends = function(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
```
|
||||
|
||||
3. Vivamus id mi enim. Integer id turpis sapien. Ut condimentum lobortis
|
||||
sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis
|
||||
nulla. Vivamus a pharetra leo.
|
||||
|
||||
### Definition lists
|
||||
|
||||
Lorem ipsum dolor sit amet
|
||||
|
||||
: Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus
|
||||
tellus non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor
|
||||
lobortis orci, at elementum urna sodales vitae. In in vehicula nulla.
|
||||
|
||||
Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
|
||||
Nam vulputate tincidunt fringilla.
|
||||
Nullam dignissim ultrices urna non auctor.
|
||||
|
||||
Cras arcu libero
|
||||
|
||||
: Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin
|
||||
ut eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at
|
||||
aliquam ac, aliquet sed mauris.
|
||||
|
||||
## Code blocks
|
||||
|
||||
### Inline
|
||||
|
||||
Morbi eget `dapibus felis`. Vivamus *`venenatis porttitor`* tortor sit amet
|
||||
rutrum. Class aptent taciti sociosqu ad litora torquent per conubia nostra,
|
||||
per inceptos himenaeos. [`Pellentesque aliquet quam enim`](/), eu volutpat urna
|
||||
rutrum a.
|
||||
|
||||
Nam vehicula nunc `:::js return target` mauris, a ultricies libero efficitur
|
||||
sed. Sed molestie imperdiet consectetur. Vivamus a pharetra leo. Pellentesque
|
||||
eget ornare tellus, ut gravida mi. Fusce vel lacinia lacus.
|
||||
|
||||
### Listing
|
||||
|
||||
#!js hl_lines="8"
|
||||
var _extends = function(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
## Horizontal rules
|
||||
|
||||
Aenean in finibus diam. Duis mollis est eget nibh volutpat, fermentum aliquet
|
||||
dui mollis. Nam vulputate tincidunt fringilla. Nullam dignissim ultrices urna
|
||||
non auctor.
|
||||
|
||||
***
|
||||
|
||||
Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
|
||||
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
|
||||
consectetur feugiat sodales.
|
||||
|
||||
## Data tables
|
||||
|
||||
| Sollicitudo / Pellentesi | consectetur | adipiscing | elit | arcu | sed |
|
||||
| ------------------------ | ----------- | ---------- | ------- | ---- | --- |
|
||||
| Vivamus a pharetra | yes | yes | yes | yes | yes |
|
||||
| Ornare viverra ex | yes | yes | yes | yes | yes |
|
||||
| Mauris a ullamcorper | yes | yes | partial | yes | yes |
|
||||
| Nullam urna elit | yes | yes | yes | yes | yes |
|
||||
| Malesuada eget finibus | yes | yes | yes | yes | yes |
|
||||
| Ullamcorper | yes | yes | yes | yes | yes |
|
||||
| Vestibulum sodales | yes | - | yes | - | yes |
|
||||
| Pulvinar nisl | yes | yes | yes | - | - |
|
||||
| Pharetra aliquet est | yes | yes | yes | yes | yes |
|
||||
| Sed suscipit | yes | yes | yes | yes | yes |
|
||||
| Orci non pretium | yes | partial | - | - | - |
|
||||
|
||||
Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
|
||||
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
|
||||
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
|
||||
|
||||
| Left | Center | Right |
|
||||
| :--------- | :------: | ------: |
|
||||
| Lorem | *dolor* | `amet` |
|
||||
| [ipsum](/) | **sit** | |
|
||||
|
||||
Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
|
||||
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
|
||||
sit amet laoreet nibh.
|
||||
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="30%">
|
||||
<col width="70%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Table</th>
|
||||
<th>with colgroups (Pandoc)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Lorem</td>
|
||||
<td>ipsum dolor sit amet.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sed sagittis</td>
|
||||
<td>eleifend rutrum. Donec vitae suscipit est.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,14 @@
|
||||
# Examples
|
||||
|
||||
To run the example configurations, ensure Python and MkDocs are up and running,
|
||||
change to the respective directory and run `mkdocs serve`. This will print:
|
||||
|
||||
``` sh
|
||||
INFO - Building documentation...
|
||||
INFO - Cleaning site directory
|
||||
[I 170620 18:54:55 server:283] Serving on http://127.0.0.1:8000
|
||||
[I 170620 18:54:55 handlers:60] Start watching changes
|
||||
[I 170620 18:54:55 handlers:62] Start detecting changes
|
||||
```
|
||||
|
||||
Go to http://127.0.0.1:8000 to see the resulting documentation.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Example
|
||||
|
||||
This is a minimal example configuration.
|
||||
@@ -0,0 +1,25 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Project information
|
||||
site_name: Example
|
||||
|
||||
# Theme
|
||||
theme: material
|
||||
@@ -0,0 +1,29 @@
|
||||
# Example
|
||||
|
||||
This example project contains a configuration for the German language. All
|
||||
footer and search labels (or placeholders), as well as link titles have been
|
||||
translated to German. Use this example as a starting point for a project with
|
||||
another language than English.
|
||||
|
||||
The translations can be changed in `theme/partials/language.html`:
|
||||
|
||||
``` jinja
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "de",
|
||||
"clipboard.copy": "In Zwischenablage kopieren",
|
||||
"clipboard.copied": "In Zwischenablage kopiert",
|
||||
"edit.link.title": "Seite editieren",
|
||||
"footer.previous": "Vorherige Seite",
|
||||
"footer.next": "Nächste Seite",
|
||||
"meta.comments": "Kommentare",
|
||||
"meta.source": "Quellcode",
|
||||
"search.languages": "de",
|
||||
"search.placeholder": "Suche",
|
||||
"search.result.placeholder": "Suchbegriff eingeben",
|
||||
"search.result.none": "Keine Suchergebnisse",
|
||||
"search.result.one": "1 Suchergebnis",
|
||||
"search.result.other": "# Suchergebnisse",
|
||||
"source.link.title": "Quellcode",
|
||||
"toc.title": "Inhaltsverzeichnis"
|
||||
}[key] }}{% endmacro %}
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# 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
|
||||
# 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
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Project information
|
||||
site_name: Example
|
||||
|
||||
# Repository
|
||||
repo_name: squidfunk/mkdocs-material
|
||||
repo_url: https://github.com/squidfunk/mkdocs-material
|
||||
|
||||
# Theme and overrides, i.e. language partial
|
||||
theme: material
|
||||
theme_dir: theme
|
||||
@@ -0,0 +1,41 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
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
|
||||
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
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Translations -->
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "de",
|
||||
"clipboard.copy": "In Zwischenablage kopieren",
|
||||
"clipboard.copied": "In Zwischenablage kopiert",
|
||||
"edit.link.title": "Seite editieren",
|
||||
"footer.previous": "Vorherige Seite",
|
||||
"footer.next": "Nächste Seite",
|
||||
"meta.comments": "Kommentare",
|
||||
"meta.source": "Quellcode",
|
||||
"search.languages": "de",
|
||||
"search.placeholder": "Suche",
|
||||
"search.result.placeholder": "Suchbegriff eingeben",
|
||||
"search.result.none": "Keine Suchergebnisse",
|
||||
"search.result.one": "1 Suchergebnis",
|
||||
"search.result.other": "# Suchergebnisse",
|
||||
"source.link.title": "Quellcode",
|
||||
"toc.title": "Inhaltsverzeichnis"
|
||||
}[key] }}{% endmacro %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-invalid-this": 0,
|
||||
"max-params": 0
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -21,48 +21,24 @@
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Drawer typography
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Drawer container
|
||||
*/
|
||||
.drawer {
|
||||
declare module "clipboard" {
|
||||
|
||||
/*
|
||||
* Links to articles
|
||||
*/
|
||||
.toc li a {
|
||||
font-weight: 700;
|
||||
/* Class: Clipboard action */
|
||||
declare class ClipboardAction {
|
||||
trigger: HTMLElement,
|
||||
clearSelection(): void
|
||||
}
|
||||
|
||||
/*
|
||||
* Links to chapters inside the current article
|
||||
*/
|
||||
.toc li.anchor a {
|
||||
font-weight: 400;
|
||||
/* Class: Clipboard */
|
||||
declare class Clipboard {
|
||||
static isSupported(): boolean,
|
||||
constructor(selector: string): void,
|
||||
on(name: string, cb: (action: ClipboardAction) => void): void
|
||||
}
|
||||
|
||||
/*
|
||||
* Main sections
|
||||
*/
|
||||
.section {
|
||||
font-weight: 700;
|
||||
}
|
||||
/* Exports */
|
||||
declare export default typeof Clipboard
|
||||
}
|
||||
|
||||
/*
|
||||
* Repository buttons
|
||||
*/
|
||||
.repo a {
|
||||
text-transform: uppercase;
|
||||
font-weight: 700;
|
||||
|
||||
/*
|
||||
* Stars
|
||||
*/
|
||||
.count {
|
||||
text-transform: none;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
declare module "escape-string-regexp" {
|
||||
declare function exports(value: string): string
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -21,25 +21,16 @@
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Article animation
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Fade color after highlighting
|
||||
*/
|
||||
pre span {
|
||||
transition: color .25s;
|
||||
}
|
||||
declare module "fastclick" {
|
||||
|
||||
/*
|
||||
* Copyright and theme information
|
||||
*/
|
||||
.copyright {
|
||||
|
||||
/*
|
||||
* Animate color on hover
|
||||
*/
|
||||
a {
|
||||
transition: color .25s;
|
||||
/* Type: FastClick */
|
||||
declare type FastClick = {
|
||||
attach(name: HTMLElement): void
|
||||
}
|
||||
}
|
||||
|
||||
/* Exports */
|
||||
declare export default FastClick
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -21,38 +21,23 @@
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Article typography
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Article
|
||||
*/
|
||||
.article {
|
||||
declare module "js-cookie" {
|
||||
|
||||
/*
|
||||
* Third-level headlines should be bold
|
||||
*/
|
||||
h3 {
|
||||
font-weight: 700;
|
||||
/* Type: Options for setting cookie values */
|
||||
declare type Options = {
|
||||
path?: string,
|
||||
expires?: number | string
|
||||
}
|
||||
|
||||
/*
|
||||
* Fourth-level headlines should be italic
|
||||
*/
|
||||
h4 {
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
/* Type: Cookie */
|
||||
declare type Cookie = {
|
||||
getJSON(json: string): Object,
|
||||
set(key: string, value: Array<string>, options?: Options): string
|
||||
}
|
||||
|
||||
/* Exports */
|
||||
declare export default Cookie
|
||||
}
|
||||
|
||||
/*
|
||||
* Permalink support
|
||||
*/
|
||||
.article {
|
||||
h2, h3, h4, h5, h6 {
|
||||
a {
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
declare class Jsx {
|
||||
static createElement(tag: string, properties?: Object,
|
||||
...children?: Array<
|
||||
string | number | { __html?: string } | Array<HTMLElement>
|
||||
>
|
||||
): HTMLElement
|
||||
}
|
||||
|
||||
/* Exports */
|
||||
declare export default Jsx
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -21,27 +21,14 @@
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Palette
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Primary and accent color
|
||||
* Currently, it's not possible to export a function that returns a class type,
|
||||
* as the imports just don't correctly work with flow. As a workaround we
|
||||
* export an object until this error is fixed.
|
||||
*/
|
||||
$primary: $red-400 !default;
|
||||
$accent: $teal-a700 !default;
|
||||
|
||||
/*
|
||||
* Black opacities
|
||||
*/
|
||||
$black: rgba(black, 0.87);
|
||||
$black-light: rgba(black, 0.54);
|
||||
$black-lighter: rgba(black, 0.26);
|
||||
$black-lightest: rgba(black, 0.12);
|
||||
|
||||
/*
|
||||
* White opacities
|
||||
*/
|
||||
$white: rgba(white, 1.00);
|
||||
$white-light: rgba(white, 0.70);
|
||||
$white-lighter: rgba(white, 0.30);
|
||||
$white-lightest: rgba(white, 0.12);
|
||||
declare module "expose-loader?lunr!lunr" {
|
||||
declare function exports(name: () => void): Object
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -20,7 +20,13 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
@import "base/animation";
|
||||
@import "base/appearance";
|
||||
@import "base/layout";
|
||||
@import "base/typography";
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Declarations
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
declare class Modernizr {
|
||||
static addTest(name: string, test: () => boolean): void
|
||||
}
|
||||
|
||||
/* Exports */
|
||||
declare export default Modernizr
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Module
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
export default /* JSX */ {
|
||||
|
||||
/**
|
||||
* Create a native DOM node from JSX's intermediate representation
|
||||
*
|
||||
* @param {string} tag - Tag name
|
||||
* @param {?Object} properties - Properties
|
||||
* @param {Array<string | number | { __html: string } | Array<HTMLElement>>}
|
||||
* children - Child nodes
|
||||
* @return {HTMLElement} Native DOM node
|
||||
*/
|
||||
createElement(tag, properties, ...children) {
|
||||
const el = document.createElement(tag)
|
||||
|
||||
/* Set all properties */
|
||||
if (properties)
|
||||
Array.prototype.forEach.call(Object.keys(properties), attr => {
|
||||
el.setAttribute(attr, properties[attr])
|
||||
})
|
||||
|
||||
/* Iterate child nodes */
|
||||
const iterateChildNodes = nodes => {
|
||||
Array.prototype.forEach.call(nodes, node => {
|
||||
|
||||
/* Directly append text content */
|
||||
if (typeof node === "string" ||
|
||||
typeof node === "number") {
|
||||
el.textContent += node
|
||||
|
||||
/* Recurse, if we got an array */
|
||||
} else if (Array.isArray(node)) {
|
||||
iterateChildNodes(node)
|
||||
|
||||
/* Append raw HTML */
|
||||
} else if (typeof node.__html !== "undefined") {
|
||||
el.innerHTML += node.__html
|
||||
|
||||
/* Append regular nodes */
|
||||
} else if (node instanceof Node) {
|
||||
el.appendChild(node)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* Iterate child nodes and return element */
|
||||
iterateChildNodes(children)
|
||||
return el
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import changed from "gulp-changed"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: clean images generated by build
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/images/**/favicon.*`)
|
||||
.pipe(changed(`${config.assets.build}/images`))
|
||||
.pipe(gulp.dest(`${config.assets.build}/images`))
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -20,69 +20,35 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import changed from "gulp-changed"
|
||||
import gulpif from "gulp-if"
|
||||
import minsvg from "gulp-svgmin"
|
||||
import rev from "gulp-rev"
|
||||
import version from "gulp-rev-replace"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Code highlighter
|
||||
* Task: clean images generated by build
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Code block
|
||||
*/
|
||||
pre {
|
||||
background: rgba($black, 0.05);
|
||||
|
||||
/*
|
||||
* Ensure correct color
|
||||
*/
|
||||
&, code {
|
||||
color: $black;
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/images/**/*.svg`)
|
||||
.pipe(changed(`${config.assets.build}/images`))
|
||||
.pipe(gulpif(args.optimize,
|
||||
minsvg({
|
||||
plugins: [
|
||||
{ cleanupIDs: false }
|
||||
]
|
||||
})))
|
||||
.pipe(gulpif(args.revision, rev()))
|
||||
.pipe(gulpif(args.revision,
|
||||
version({ manifest: gulp.src("manifest.json") })))
|
||||
.pipe(gulp.dest(`${config.assets.build}/images`))
|
||||
.pipe(gulpif(args.revision,
|
||||
rev.manifest("manifest.json", {
|
||||
base: config.assets.build,
|
||||
merge: true
|
||||
})))
|
||||
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Operators and comments
|
||||
*/
|
||||
.o, .c, .c1, .cm {
|
||||
color: $black-light;
|
||||
}
|
||||
|
||||
/*
|
||||
* Keywords
|
||||
*/
|
||||
.k, .kn {
|
||||
color: #A71D5D;
|
||||
}
|
||||
|
||||
/*
|
||||
* Types and functions
|
||||
*/
|
||||
.kt, .kd {
|
||||
color: #0086B3;
|
||||
}
|
||||
|
||||
/*
|
||||
* Function definition
|
||||
*/
|
||||
.nf, .n.f {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
/*
|
||||
* Classes
|
||||
*/
|
||||
.nx {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
/*
|
||||
* Strings
|
||||
*/
|
||||
.s, .s1 {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
/*
|
||||
* Constants and numbers
|
||||
*/
|
||||
.mi, .bp {
|
||||
color: #9575CD;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import clean from "del"
|
||||
import vinyl from "vinyl-paths"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: clean images generated by build
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.build}/images/*`)
|
||||
.pipe(vinyl(clean))
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
@@ -20,62 +20,44 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { transform } from "babel-core"
|
||||
import jsdoc2flow from "flow-jsdoc"
|
||||
import through from "through2"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Drawer animation
|
||||
* Task: annotate JavaScript
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Drawer container
|
||||
*/
|
||||
.drawer {
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
|
||||
|
||||
/* [tablet landscape-]: Hide menu */
|
||||
@include break-to-device(tablet landscape) {
|
||||
transform: translate3d(-262px, 0, 0);
|
||||
transition: transform .25s cubic-bezier(.4, 0, .2, 1);
|
||||
/* Linting */
|
||||
.pipe(
|
||||
through.obj(function(file, enc, done) {
|
||||
if (file.isNull() || file.isStream())
|
||||
return done()
|
||||
|
||||
/*
|
||||
* Just hide drawer, if browser doesn't support 3D transforms
|
||||
*/
|
||||
.no-csstransforms3d & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
/* Perform Babel transformation to resolve JSX calls */
|
||||
const transformed = transform(file.contents.toString(), {
|
||||
plugins: [
|
||||
["transform-react-jsx", {
|
||||
"pragma": "Jsx.createElement"
|
||||
}]
|
||||
]
|
||||
})
|
||||
|
||||
/*
|
||||
* Expanded drawer
|
||||
*/
|
||||
#toggle-drawer:checked ~ .main &,
|
||||
.toggle-drawer & {
|
||||
transform: translate3d(0, 0, 0);
|
||||
/* Annotate contents */
|
||||
file.contents = new Buffer(jsdoc2flow(
|
||||
`/* @flow */\n\n${transformed.code}`
|
||||
).toString())
|
||||
|
||||
/*
|
||||
* Just show drawer, if browser doesn't support 3D transforms
|
||||
*/
|
||||
.no-csstransforms3d & {
|
||||
display: block;
|
||||
}
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
}))
|
||||
|
||||
/* Print errors */
|
||||
.pipe(gulp.dest("tmp/assets/javascripts"))
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* No color transition for project link
|
||||
*/
|
||||
.project {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* Project logo image
|
||||
*/
|
||||
.project .logo img {
|
||||
transition: box-shadow .4s;
|
||||
}
|
||||
|
||||
/*
|
||||
* Repository buttons
|
||||
*/
|
||||
.repo a {
|
||||
transition: box-shadow .4s,
|
||||
opacity .4s;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import gulpif from "gulp-if"
|
||||
import path from "path"
|
||||
import rev from "gulp-rev"
|
||||
import stream from "webpack-stream"
|
||||
import version from "gulp-rev-replace"
|
||||
import webpack from "webpack"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: build application logic
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
|
||||
|
||||
/* Build with webpack */
|
||||
.pipe(
|
||||
stream({
|
||||
entry: [
|
||||
|
||||
/* Polyfills */
|
||||
"core-js/fn/promise",
|
||||
"custom-event-polyfill",
|
||||
"whatwg-fetch",
|
||||
|
||||
/* Main entry point */
|
||||
"application.js"
|
||||
],
|
||||
output: {
|
||||
filename: "application.js",
|
||||
library: "app",
|
||||
libraryTarget: "window"
|
||||
},
|
||||
module: {
|
||||
|
||||
/* Transpile ES6 to ES5 with Babel */
|
||||
rules: [
|
||||
{
|
||||
loader: "babel-loader",
|
||||
test: /\.jsx?$/
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
|
||||
/* Don't emit assets that include errors */
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
/* Provide JSX helper */
|
||||
new webpack.ProvidePlugin({
|
||||
Jsx: path.join(process.cwd(), `${config.lib}/providers/jsx.js`)
|
||||
})
|
||||
].concat(
|
||||
|
||||
/* Minify sources */
|
||||
args.optimize ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false,
|
||||
screw_ie8: true, // eslint-disable-line camelcase
|
||||
conditionals: true,
|
||||
unused: true,
|
||||
comparisons: true,
|
||||
sequences: true,
|
||||
dead_code: true, // eslint-disable-line camelcase
|
||||
evaluate: true,
|
||||
if_return: true, // eslint-disable-line camelcase
|
||||
join_vars: true // eslint-disable-line camelcase
|
||||
},
|
||||
output: {
|
||||
comments: false
|
||||
}
|
||||
})
|
||||
] : []),
|
||||
|
||||
/* Module resolver */
|
||||
resolve: {
|
||||
modules: [
|
||||
"src/assets/javascripts",
|
||||
"node_modules"
|
||||
],
|
||||
extensions: [
|
||||
".js",
|
||||
".jsx"
|
||||
]
|
||||
},
|
||||
|
||||
/* Webpack commandline output */
|
||||
stats: {
|
||||
colors: true
|
||||
},
|
||||
|
||||
/* Sourcemap support */
|
||||
devtool: args.sourcemaps ? "inline-source-map" : ""
|
||||
}, webpack))
|
||||
|
||||
/* Revisioning */
|
||||
.pipe(gulpif(args.revision, rev()))
|
||||
.pipe(gulpif(args.revision,
|
||||
version({ manifest: gulp.src("manifest.json") })))
|
||||
.pipe(gulp.dest(`${config.assets.build}/javascripts`))
|
||||
.pipe(gulpif(args.revision,
|
||||
rev.manifest("manifest.json", {
|
||||
base: config.assets.build,
|
||||
merge: true
|
||||
})))
|
||||
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import gulpif from "gulp-if"
|
||||
import uglify from "gulp-uglify"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: build search language support files
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
return gulp.src("node_modules/lunr-languages/*.js")
|
||||
.pipe(gulpif(args.optimize, uglify()))
|
||||
.pipe(gulp.dest(`${config.assets.build}/javascripts/lunr`))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import concat from "gulp-concat"
|
||||
import gulpif from "gulp-if"
|
||||
import modernizr from "gulp-modernizr"
|
||||
import uglify from "gulp-uglify"
|
||||
import rev from "gulp-rev"
|
||||
import version from "gulp-rev-replace"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: build custom modernizr
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.build}/stylesheets/*.css`)
|
||||
|
||||
/* Build custom modernizr */
|
||||
.pipe(
|
||||
modernizr({
|
||||
options: [
|
||||
"addTest", /* Add custom tests */
|
||||
"setClasses" /* Add CSS classes to root tag */
|
||||
]
|
||||
}))
|
||||
.pipe(concat("modernizr.js"))
|
||||
|
||||
/* Minify sources */
|
||||
.pipe(gulpif(args.optimize, uglify()))
|
||||
|
||||
/* Revisioning */
|
||||
.pipe(gulpif(args.revision, rev()))
|
||||
.pipe(gulpif(args.revision,
|
||||
version({ manifest: gulp.src("manifest.json") })))
|
||||
.pipe(gulp.dest(`${config.assets.build}/javascripts`))
|
||||
.pipe(gulpif(args.revision,
|
||||
rev.manifest("manifest.json", {
|
||||
base: config.assets.build,
|
||||
merge: true
|
||||
})))
|
||||
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import clean from "del"
|
||||
import vinyl from "vinyl-paths"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: clean JavaScript generated by build
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.build}/javascripts/*`)
|
||||
.pipe(vinyl(clean))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import path from "path"
|
||||
import through from "through2"
|
||||
import util from "gulp-util"
|
||||
|
||||
import { CLIEngine } from "eslint"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Locals
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
const eslint = new CLIEngine
|
||||
const format = eslint.getFormatter()
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: lint JavaScript
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
|
||||
|
||||
/* Linting */
|
||||
.pipe(
|
||||
through.obj(function(file, enc, done) {
|
||||
if (file.isNull() || file.isStream())
|
||||
return done()
|
||||
|
||||
/* Lint file using .eslintrc */
|
||||
file.eslint = eslint.executeOnText(
|
||||
file.contents.toString())
|
||||
|
||||
/* Correct file path */
|
||||
file.eslint.results[0].filePath =
|
||||
path.relative(process.cwd(), file.path)
|
||||
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
}))
|
||||
|
||||
/* Print errors */
|
||||
.pipe(
|
||||
through.obj(function(file, enc, done) {
|
||||
if (file.eslint.errorCount || file.eslint.warningCount) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(format(file.eslint.results))
|
||||
}
|
||||
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
}))
|
||||
|
||||
/* Terminate on error */
|
||||
.pipe(
|
||||
(() => {
|
||||
const errors = []
|
||||
|
||||
/* Gather errors */
|
||||
return through.obj(function(file, enc, done) {
|
||||
const results = file.eslint
|
||||
|
||||
/* Consider warnings as errors */
|
||||
if (results.errorCount || results.warningCount)
|
||||
errors.push(file)
|
||||
|
||||
/* Push file to next stage */
|
||||
this.push(file)
|
||||
done()
|
||||
|
||||
/* Format errors and terminate */
|
||||
}, function(done) {
|
||||
if (errors.length > 0) {
|
||||
const message = errors.map(file => {
|
||||
return file.relative
|
||||
}).join(", ")
|
||||
|
||||
/* Emit error */
|
||||
this.emit("error", new util.PluginError("eslint",
|
||||
`Terminated with errors in files: ${message}`))
|
||||
}
|
||||
done()
|
||||
})
|
||||
})())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import autoprefixer from "autoprefixer"
|
||||
import gulpif from "gulp-if"
|
||||
import mincss from "gulp-cssnano"
|
||||
import mqpacker from "css-mqpacker"
|
||||
import postcss from "gulp-postcss"
|
||||
import pseudoclasses from "postcss-pseudo-classes"
|
||||
import rev from "gulp-rev"
|
||||
import sass from "gulp-sass"
|
||||
import sourcemaps from "gulp-sourcemaps"
|
||||
import version from "gulp-rev-replace"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: build stylesheets from SASS source
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/stylesheets/*.scss`)
|
||||
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
|
||||
|
||||
/* Compile SASS sources */
|
||||
.pipe(
|
||||
sass({
|
||||
includePaths: [
|
||||
"node_modules/modularscale-sass/stylesheets",
|
||||
"node_modules/material-design-color",
|
||||
"node_modules/material-shadows"
|
||||
]
|
||||
}))
|
||||
|
||||
/* Apply PostCSS plugins */
|
||||
.pipe(
|
||||
postcss([
|
||||
autoprefixer(),
|
||||
mqpacker
|
||||
].concat(!args.optimize ? [
|
||||
pseudoclasses({
|
||||
"restrictTo": ["hover", "focus"]
|
||||
})
|
||||
] : [])))
|
||||
|
||||
/* Minify sources */
|
||||
.pipe(gulpif(args.optimize, mincss()))
|
||||
|
||||
/* Revisioning */
|
||||
.pipe(gulpif(args.revision, rev()))
|
||||
.pipe(gulpif(args.revision,
|
||||
version({ manifest: gulp.src("manifest.json") })))
|
||||
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
|
||||
.pipe(gulp.dest(`${config.assets.build}/stylesheets`))
|
||||
.pipe(gulpif(args.revision,
|
||||
rev.manifest("manifest.json", {
|
||||
base: config.assets.build,
|
||||
merge: true
|
||||
})))
|
||||
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import clean from "del"
|
||||
import vinyl from "vinyl-paths"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: clean stylesheets generated by build
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.build}/stylesheets/*`)
|
||||
.pipe(vinyl(clean))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import stylelint from "gulp-stylelint"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: lint SASS sources
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.assets.src}/stylesheets/**/*.scss`)
|
||||
.pipe(
|
||||
stylelint({
|
||||
reporters: [
|
||||
{ formatter: "string", console: true }
|
||||
]
|
||||
}))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import child from "child_process"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: build documentation
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default () => {
|
||||
return () => {
|
||||
const proc = child.spawnSync("mkdocs", ["build"])
|
||||
if (proc.status)
|
||||
throw new Error(`MkDocs error:\n${proc.stderr.toString()}`)
|
||||
return proc
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import clean from "del"
|
||||
import vinyl from "vinyl-paths"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: clean documentation build
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default gulp => {
|
||||
return () => {
|
||||
return gulp.src("site")
|
||||
.pipe(vinyl(clean))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import child from "child_process"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Locals
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* MkDocs server */
|
||||
let server = null
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: serve documentation
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default () => {
|
||||
return () => {
|
||||
if (server)
|
||||
server.kill()
|
||||
|
||||
/* Spawn MkDocs server */
|
||||
server = child.spawn("mkdocs", ["serve", "--dev-addr", "0.0.0.0:8000"], {
|
||||
stdio: "inherit"
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import changed from "gulp-changed"
|
||||
import compact from "gulp-remove-empty-lines"
|
||||
import gulpif from "gulp-if"
|
||||
import minhtml from "gulp-htmlmin"
|
||||
import path from "path"
|
||||
import replace from "gulp-replace"
|
||||
import version from "gulp-rev-replace"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: minify views
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config, args) => {
|
||||
return () => {
|
||||
const metadata = require(path.join(process.cwd(), "./package.json"))
|
||||
return gulp.src(`${config.views.src}/**/*.{html,py}`)
|
||||
.pipe(changed(config.views.build))
|
||||
.pipe(
|
||||
minhtml({
|
||||
collapseBooleanAttributes: true,
|
||||
customAttrCollapse: /(content)/,
|
||||
includeAutoGeneratedTags: false,
|
||||
minifyCSS: true,
|
||||
minifyJS: true,
|
||||
removeComments: true,
|
||||
removeScriptTypeAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true
|
||||
}))
|
||||
.pipe(replace("$md-name$", metadata.name))
|
||||
.pipe(replace("$md-version$", metadata.version))
|
||||
.pipe(compact())
|
||||
.pipe(gulpif(args.revision,
|
||||
version({ manifest: gulp.src("manifest.json") })))
|
||||
.pipe(gulp.dest(config.views.build))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* 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
|
||||
* 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
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import clean from "del"
|
||||
import vinyl from "vinyl-paths"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Task: clean views
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
export default (gulp, config) => {
|
||||
return () => {
|
||||
return gulp.src(`${config.views.build}/**/*.{html,py}`)
|
||||
.pipe(vinyl(clean))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>404 - Not found</h1>
|
||||
{% endblock %}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="search" d="M661.333 341.334h-33.92l-11.733 11.733c41.813 48.427 66.987 111.36 66.987 180.267 0 153.173-124.16 277.333-277.333 277.333s-277.333-124.16-277.333-277.333 124.16-277.333 277.333-277.333c68.907 0 131.84 25.173 180.267 66.773l11.733-11.733v-33.707l213.333-212.907 63.573 63.573-212.907 213.333zM405.333 341.334c-106.027 0-192 85.973-192 192s85.973 192 192 192 192-85.973 192-192-85.973-192-192-192z" />
|
||||
<glyph unicode="" glyph-name="arrow-back" d="M853.333 469.334h-519.253l238.293 238.293-60.373 60.373-341.333-341.333 341.333-341.333 60.373 60.373-238.293 238.293h519.253v85.333z" />
|
||||
<glyph unicode="" glyph-name="chevron-right" d="M426.667 682.667l-60.373-60.373 195.627-195.627-195.627-195.627 60.373-60.373 256 256z" />
|
||||
<glyph unicode="" glyph-name="close" d="M810.667 664.96l-60.373 60.373-238.293-238.293-238.293 238.293-60.373-60.373 238.293-238.293-238.293-238.293 60.373-60.373 238.293 238.293 238.293-238.293 60.373 60.373-238.293 238.293z" />
|
||||
<glyph unicode="" glyph-name="menu" d="M128 170.667h768v85.333h-768v-85.333zM128 384h768v85.333h-768v-85.333zM128 682.667v-85.333h768v85.333h-768z" />
|
||||
<glyph unicode="" glyph-name="arrow-forward" d="M512 768l-60.373-60.373 238.293-238.293h-519.253v-85.333h519.253l-238.293-238.293 60.373-60.373 341.333 341.333z" />
|
||||
<glyph unicode="" glyph-name="twitter" d="M1024 744.249c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
|
||||
<glyph unicode="" glyph-name="github" d="M512.008 926.025c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
|
||||
<glyph unicode="" glyph-name="download" d="M810.667 554.667h-170.667v256h-256v-256h-170.667l298.667-298.667 298.667 298.667zM213.333 170.667v-85.333h597.333v85.333h-597.333z" />
|
||||
<glyph unicode="" glyph-name="star" d="M512 201.814l263.68-159.147-69.973 299.947 232.96 201.813-306.773 26.027-119.893 282.88-119.893-282.88-306.773-26.027 232.96-201.813-69.973-299.947z" />
|
||||
<glyph unicode="" glyph-name="warning" d="M554 340.667v172h-84v-172h84zM554 170.667v86h-84v-86h84zM42 42.667l470 810 470-810h-940z" />
|
||||
<glyph unicode="" glyph-name="hint" d="M614 682.667h240v-426h-300l-16 84h-240v-298h-84v726h384z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448" viewBox="0 0 352 448" id="bitbucket"><path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875 1.5q-9.75-4.25-13.375-14.5t-.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 6.875 16.875zm27.75-5.25q-3.5-26.75-28.25-41T154 165.25q-15.75 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 38-21t12.5-42zM291.25 74q-5-6.75-14-11.125t-14.5-5.5T245 54.25q-72.75-11.75-141.5.5-10.75 1.75-16.5 3t-13.75 5.5T60.75 74q7.5 7 19 11.375t18.375 5.5T120 93.75Q177 101 232 94q15.75-2 22.375-3t18.125-5.375T291.25 74zm14.25 258.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5T88.75 412 70.5 401.125t-13-15.375q-6.25-24-14.25-73l1.5-4 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 10T291.75 288q-63 31.5-152.5 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875T25 232.75q-2.25-12.5-6.625-37.5t-7-40.375T5.5 118 0 78.5Q.75 72 4.375 66.375T12.25 57t11.25-7.5T35 43.875t12-4.625q31.25-11.5 78.25-16 94.75-9.25 169 12.5Q333 47.25 348 66.25q4 5 4.125 12.75t-1.375 13.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 991 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500" id="gitlab"><path fill="currentColor" d="M93.667 473.347l90.684-279.097H2.983l90.684 279.097z" transform="translate(156.198 1.16)"/><path fill="currentColor" d="M221.333 473.345L130.649 194.25H3.557l217.776 279.095z" transform="translate(28.531 1.16)" opacity=".7"/><path fill="currentColor" d="M32 195.155L4.441 279.97a18.773 18.773 0 0 0 6.821 20.99l238.514 173.29L32 195.155z" transform="translate(.089 .256)" opacity=".5"/><path fill="currentColor" d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856 0L2.667-84.844z" transform="translate(29.422 280.256)"/><path fill="currentColor" d="M2.667 473.345L93.351 194.25h127.092L2.667 473.345z" transform="translate(247.198 1.16)" opacity=".7"/><path fill="currentColor" d="M221.334 195.155l27.559 84.815a18.772 18.772 0 0 1-6.821 20.99L3.557 474.25l217.777-279.095z" transform="translate(246.307 .256)" opacity=".5"/><path fill="currentColor" d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649 15.047-8.649 17.856 0l54.618 168.098z" transform="translate(336.974 280.256)"/></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=function(){var r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){function e(){var e,r=f.cursor+3;if(d=f.limit,0<=r&&r<=f.limit){for(a=r;;){if(e=f.cursor,f.in_grouping(w,97,248)){f.cursor=e;break}if(f.cursor=e,e>=f.limit)return;f.cursor++}for(;!f.out_grouping(w,97,248);){if(f.cursor>=f.limit)return;f.cursor++}(d=f.cursor)<a&&(d=a)}}function n(){var e,r;if(f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(c,32),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del();break;case 2:f.in_grouping_b(p,97,229)&&f.slice_del()}}function t(){var e,r=f.limit-f.cursor;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.find_among_b(l,4)?(f.bra=f.cursor,f.limit_backward=e,f.cursor=f.limit-r,f.cursor>f.limit_backward&&(f.cursor--,f.bra=f.cursor,f.slice_del())):f.limit_backward=e)}function s(){var e,r,i,n=f.limit-f.cursor;if(f.ket=f.cursor,f.eq_s_b(2,"st")&&(f.bra=f.cursor,f.eq_s_b(2,"ig")&&f.slice_del()),f.cursor=f.limit-n,f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(m,5),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del(),i=f.limit-f.cursor,t(),f.cursor=f.limit-i;break;case 2:f.slice_from("løs")}}function o(){var e;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.out_grouping_b(w,97,248)?(f.bra=f.cursor,u=f.slice_to(u),f.limit_backward=e,f.eq_v_b(u)&&f.slice_del()):f.limit_backward=e)}var a,d,u,c=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],l=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],w=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],p=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],f=new i;this.setCurrent=function(e){f.setCurrent(e)},this.getCurrent=function(){return f.getCurrent()},this.stem=function(){var r=f.cursor;return e(),f.limit_backward=r,f.cursor=f.limit,n(),f.cursor=f.limit,t(),f.cursor=f.limit,s(),f.cursor=f.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}}(),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(){return function(e){return e}}(),e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var i=Array.prototype.slice.call(arguments),t=i.join("-"),r="",n=[],s=[],p=0;p<i.length;++p)"en"==i[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[i[p]].wordCharacters,n.unshift(e[i[p]].stopWordFilter),n.push(e[i[p]].stemmer),s.push(e[i[p]].stemmer));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+t),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}});
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=function(){var r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){function e(){var e,r=w.cursor+3;if(a=w.limit,0<=r||r<=w.limit){for(s=r;;){if(e=w.cursor,w.in_grouping(d,97,248)){w.cursor=e;break}if(e>=w.limit)return;w.cursor=e+1}for(;!w.out_grouping(d,97,248);){if(w.cursor>=w.limit)return;w.cursor++}(a=w.cursor)<s&&(a=s)}}function i(){var e,r,n;if(w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,e=w.find_among_b(m,29),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:n=w.limit-w.cursor,w.in_grouping_b(c,98,122)?w.slice_del():(w.cursor=w.limit-n,w.eq_s_b(1,"k")&&w.out_grouping_b(d,97,248)&&w.slice_del());break;case 3:w.slice_from("er")}}function t(){var e,r=w.limit-w.cursor;w.cursor>=a&&(e=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,w.find_among_b(u,2)?(w.bra=w.cursor,w.limit_backward=e,w.cursor=w.limit-r,w.cursor>w.limit_backward&&(w.cursor--,w.bra=w.cursor,w.slice_del())):w.limit_backward=e)}function o(){var e,r;w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,(e=w.find_among_b(l,11))?(w.bra=w.cursor,w.limit_backward=r,1==e&&w.slice_del()):w.limit_backward=r)}var s,a,m=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],u=[new r("dt",-1,-1),new r("vt",-1,-1)],l=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],c=[119,125,149,1],w=new n;this.setCurrent=function(e){w.setCurrent(e)},this.getCurrent=function(){return w.getCurrent()},this.stem=function(){var r=w.cursor;return e(),w.limit_backward=r,w.cursor=w.limit,i(),w.cursor=w.limit,t(),w.cursor=w.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}}(),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});
|
||||