Compare commits
732 commits
php-thames
...
main
Author | SHA1 | Date | |
---|---|---|---|
79fcd69ab6 | |||
b33edd649f | |||
d3e70b9754 | |||
ad3af7d318 | |||
3d0c221599 | |||
db2c860d4e | |||
086b4a8c52 | |||
f204491923 | |||
66a7f44c1e | |||
c1a2e361de | |||
d8ae557445 | |||
3fceb4c2b4 | |||
fc8813a5c9 | |||
feff81c15d | |||
a42a904f0d | |||
593af57cea | |||
c935231fe9 | |||
d34019b2bc | |||
8923500c4a | |||
60d3cfc742 | |||
863f0bac8c | |||
40f4352cd7 | |||
6ec0007820 | |||
7cc2622551 | |||
c3abf150a2 | |||
e89bee6191 | |||
b3d22ce6f4 | |||
6ccaead857 | |||
1d401246d2 | |||
0ccc967ca8 | |||
695d8b0299 | |||
a365987e61 | |||
c6ba52f454 | |||
92cba01aa5 | |||
0c1d5d02e1 | |||
ba2bf10bea | |||
e85167d5eb | |||
8b2fabb6b7 | |||
6a249ef924 | |||
6d27fa23ac | |||
638f0cc20f | |||
2604bce65d | |||
27399cd4d1 | |||
8447b33ec8 | |||
d5a5a9e5c7 | |||
87437b684a | |||
39acad502c | |||
6891a7517a | |||
34a2740106 | |||
b6facbcbf9 | |||
bfb67e4010 | |||
b2803aac2d | |||
d509e167da | |||
7a7604d330 | |||
8f6c432f86 | |||
9bb0b58dfd | |||
1fe424eb29 | |||
96d5a66001 | |||
a2d09e114b | |||
a4415a9c90 | |||
e24d2df83f | |||
68869f59e7 | |||
2094b1ba2e | |||
6f98c753c2 | |||
e80aee1deb | |||
ff651197b8 | |||
0db961b741 | |||
cdd7a466d2 | |||
eae47a9c87 | |||
fa691746f0 | |||
5036f657b3 | |||
![]() |
4006603e3c | ||
![]() |
5b6ccc01d0 | ||
5b41902ec6 | |||
d7e55e84cc | |||
70be1348db | |||
43b8fdfd9c | |||
d2530a138a | |||
5cab3659f4 | |||
a679fe98dd | |||
24e3e387b1 | |||
6f53f8c026 | |||
cb4b396577 | |||
ad467a8700 | |||
4de38d0276 | |||
4f888eb6ec | |||
179e27f1b7 | |||
7fdeffb1af | |||
d814d86808 | |||
9f10128230 | |||
8b47c24889 | |||
ea3fcd0704 | |||
4f6ca80035 | |||
6ef6c8359d | |||
9f15e2389f | |||
d3c7984925 | |||
72118c1903 | |||
5e443e3d6e | |||
28391c1296 | |||
72b22b41a8 | |||
fa99025778 | |||
c5e1da11f7 | |||
70d330aa1b | |||
6d8f1db01f | |||
17951f1fc9 | |||
3279719cfe | |||
d55df5ca18 | |||
51c5f5759d | |||
675e89e9d1 | |||
6cf7d0fee4 | |||
1f271a2655 | |||
d9f3cae654 | |||
1586971eea | |||
596684a71d | |||
9692827603 | |||
12863a4f92 | |||
8b18e05fbc | |||
63bf55b978 | |||
639de3a234 | |||
de6303e55a | |||
7dd48f3880 | |||
e392af7acf | |||
3da19375f6 | |||
0ad2dafa89 | |||
9a3353b8a2 | |||
7a762182ef | |||
6640ded8c3 | |||
9b9d15a0e0 | |||
3f3260764e | |||
260d2d6c58 | |||
![]() |
e796a6e2a9 | ||
017713a063 | |||
c7fb60a2cf | |||
78e3b999e0 | |||
d754089b17 | |||
6246c137b4 | |||
26ceec5f20 | |||
3847f56beb | |||
0506194323 | |||
17e8f767e8 | |||
bec52af3ca | |||
6e6fedee5d | |||
8a14bec664 | |||
2db13e1287 | |||
26c18bfaf6 | |||
da534d3210 | |||
6881587450 | |||
9d3b6c6885 | |||
7e21321c2f | |||
78e1ccbd03 | |||
a266b46fc1 | |||
241752034a | |||
8c4b0632da | |||
484f4da191 | |||
37172b421e | |||
a9772edc5d | |||
7febcd03dc | |||
69d30df11e | |||
ed7d6ad172 | |||
6f32c87345 | |||
45f9c443c6 | |||
340339df4b | |||
6d941cbe48 | |||
9738028448 | |||
05dbcb55fe | |||
50a24fe305 | |||
4a82640271 | |||
0da8b14a52 | |||
204a5f931b | |||
5f6f7bdb4a | |||
6bd1f864ba | |||
acac7e6ec1 | |||
a024466201 | |||
5ddcc845b3 | |||
25a071e456 | |||
ab8e3e1342 | |||
237d1ce590 | |||
033276f85a | |||
b97482c642 | |||
97d4382dd3 | |||
8dee798782 | |||
cb8ad1178a | |||
b032e99b31 | |||
0ca58316c0 | |||
a5dff0b493 | |||
4014f12395 | |||
d6a5af062a | |||
11705f7a4c | |||
d8a1616481 | |||
f764004f89 | |||
be9513edc6 | |||
7e82c2fd7e | |||
b032798d69 | |||
ad40ba6d2d | |||
aeb066e94c | |||
cb5ed1f0b8 | |||
5fda89278d | |||
38aa5d5d59 | |||
1b30b42829 | |||
18aab27851 | |||
726386e976 | |||
9f3226aec5 | |||
a5bee4685a | |||
fdd5b3138f | |||
398fa3c547 | |||
d409742cfe | |||
c78138b63d | |||
6cf5e862ad | |||
64dc136483 | |||
8ebbad1a85 | |||
cc6f7a3557 | |||
b84764c013 | |||
93df801f13 | |||
6d17643b19 | |||
d38acd6876 | |||
4018f9a6db | |||
b047ea3e4e | |||
d7d778096e | |||
7499a8817d | |||
97925b0456 | |||
91cee26e71 | |||
702b755319 | |||
5a2df50e90 | |||
36a4eb2d92 | |||
5fadbbccd0 | |||
641c61dd47 | |||
cb79277374 | |||
cdb0e67eb3 | |||
559ed8e908 | |||
ca1886b0df | |||
b2dccb925e | |||
354fbe4128 | |||
91aed1b171 | |||
0a1da40788 | |||
0c6fa6e60f | |||
4be8e02246 | |||
655c854a80 | |||
8f8218260b | |||
bd68420fc1 | |||
0b4c648ac6 | |||
61664cb263 | |||
1fe7119b5d | |||
07ad4dc2b1 | |||
cbd0176c37 | |||
259f077f61 | |||
9aec327945 | |||
290c8fbcba | |||
91f7d094e7 | |||
e925409f5f | |||
a540f4ad32 | |||
2cae42ba3a | |||
910af32309 | |||
1be8440519 | |||
40228b36f4 | |||
3723a0af0e | |||
b53cfec4dd | |||
48c2724736 | |||
9b7d9b3feb | |||
80a1f88b2c | |||
4dbb334a6f | |||
f38f21fdc8 | |||
f194015f30 | |||
a6a2ad22e4 | |||
699122e83a | |||
3e46173860 | |||
48ab1c9209 | |||
9484d924a1 | |||
ef1e960f91 | |||
4583075a3e | |||
782648fef2 | |||
c7ef94c0d5 | |||
151803382e | |||
9df597c965 | |||
7e0a0c3762 | |||
fd921d3e4c | |||
2dafec2f67 | |||
e859418cbd | |||
fbf2171d25 | |||
fb06cce56c | |||
1baead38fd | |||
e1e137f55e | |||
a029e6223c | |||
fa44d26bde | |||
077631bd32 | |||
f9bf333977 | |||
646fe86d15 | |||
ccd5b423f6 | |||
712f2805d2 | |||
8f5254045f | |||
c4148c07d5 | |||
986ba5097d | |||
123bdd494d | |||
869c6b2dca | |||
da08c2cc15 | |||
7c3c7d453e | |||
3eb0842da9 | |||
536857c6f3 | |||
17cabdc791 | |||
74d5ee2eba | |||
fa8ea3bcad | |||
36cf281907 | |||
9777514811 | |||
f45a16ef64 | |||
d46e091e98 | |||
26a4ca66ef | |||
08d28544e0 | |||
7a4f3cdf4a | |||
7dce492d27 | |||
6ba5810dbc | |||
eb0f90f479 | |||
7ebe1c52a4 | |||
f26c3fbd7d | |||
317d95a56c | |||
2933a74013 | |||
9a820ecf4f | |||
![]() |
e5b86c7f39 | ||
![]() |
80ccac2d43 | ||
![]() |
66c6e5617a | ||
![]() |
0d5e034487 | ||
![]() |
4c0756d9aa | ||
4fd639507c | |||
![]() |
6c960de854 | ||
![]() |
b722d71ca9 | ||
![]() |
68ca1f63fe | ||
![]() |
92f3e99e33 | ||
026ac7928f | |||
7cad32c9ef | |||
a13636a2f2 | |||
a1529f22d7 | |||
f38ca67efb | |||
33e92bbb1f | |||
b6507ffd0e | |||
a03ec1360b | |||
9e3d3fd7ef | |||
ee1d9beb82 | |||
04a19ec0fa | |||
714644a18c | |||
![]() |
81640d24ed | ||
49b98d0681 | |||
ad22d86a2e | |||
![]() |
602a01f0c7 | ||
e4444b405a | |||
44b7fb9842 | |||
54d4e2d87e | |||
![]() |
2b7874e280 | ||
c39e2a9789 | |||
e1517ecd9d | |||
bf1fce2a52 | |||
8d0c16dd8e | |||
dcab1aca9a | |||
52f13fcac8 | |||
d1b22efc0e | |||
9ce5f1c1f0 | |||
fce230f798 | |||
15985541ba | |||
0fb0dd693e | |||
623a1052c4 | |||
9aac99e723 | |||
083ed945ad | |||
99407f2b72 | |||
9ab929a7c0 | |||
274afa40ed | |||
23fcf88ad9 | |||
bbb4a9c666 | |||
9fa87d4133 | |||
e5cc2a7ea7 | |||
7e7a61214d | |||
e231a2e3f8 | |||
![]() |
a5f598deff | ||
![]() |
fa56833672 | ||
49e2ffbd8d | |||
f447aaccc0 | |||
![]() |
bff2e2da7f | ||
![]() |
3b52712db6 | ||
![]() |
397da22b90 | ||
![]() |
76e0a83dd8 | ||
![]() |
cf9c0a5c59 | ||
![]() |
f1f8afc115 | ||
3996891f12 | |||
![]() |
ad331dbfff | ||
b104522020 | |||
7549d7e842 | |||
![]() |
a299d919c9 | ||
7971235aec | |||
![]() |
fff50a03b1 | ||
78175aa087 | |||
![]() |
8d03688a9f | ||
2ab5191de7 | |||
3632326f77 | |||
99e1560548 | |||
bee3f669e9 | |||
![]() |
5745580fa9 | ||
![]() |
4b9f4ab85d | ||
![]() |
d0ebbf2382 | ||
![]() |
3f1fdb184b | ||
f25324335b | |||
![]() |
ed6b741992 | ||
1d8b46251d | |||
002dca6e52 | |||
1b37bafd14 | |||
eedc2d5dcd | |||
ac2403ff39 | |||
8e325b84f7 | |||
![]() |
56bb39c7c0 | ||
0fd5114e75 | |||
![]() |
836b0637ba | ||
![]() |
3f21c779f8 | ||
![]() |
b430a5551d | ||
![]() |
ea6140a60f | ||
![]() |
d1f39da25f | ||
260c1317e9 | |||
ea16b2c9c5 | |||
31d53a1502 | |||
0efd71c860 | |||
04ff2c0398 | |||
fecbe9a8a4 | |||
![]() |
27e26c0dde | ||
![]() |
35fd11e080 | ||
![]() |
89169cb7b0 | ||
![]() |
92c97b51fc | ||
42abb9957f | |||
![]() |
456938c18d | ||
f5861641f0 | |||
9336a14107 | |||
![]() |
2542b49367 | ||
![]() |
09fc011ba8 | ||
6725c58b80 | |||
24a0ed9cb8 | |||
a1deab3330 | |||
bfe73f8e22 | |||
2da4ecc893 | |||
45f8a6a2ab | |||
6ce41c0f0b | |||
4c70965332 | |||
ca58883d23 | |||
e65b8823ed | |||
7d4c7fe5f3 | |||
a39497e8d4 | |||
15e921239e | |||
73d4584f0a | |||
6acd746ce9 | |||
80c38777dc | |||
d7958deef1 | |||
80f9b51fe0 | |||
cd74805817 | |||
8a1069961d | |||
6ed0abf6a3 | |||
1e3ac16676 | |||
748acda5a6 | |||
5573102fda | |||
c56cfd40b8 | |||
f9be621fff | |||
b292a34b81 | |||
6a78346e1e | |||
db130a7edf | |||
44ad7ebcb7 | |||
4147b13e6f | |||
e385fa570f | |||
8c7752cf43 | |||
d634b835f8 | |||
dbeee034e2 | |||
08f29acf5c | |||
985060a0a6 | |||
623b9aa501 | |||
9a16e78869 | |||
10ff5e82ee | |||
4bb39011f3 | |||
c00b769d67 | |||
d7c864b63b | |||
a4b018204d | |||
726a0b535f | |||
7417eb6c25 | |||
6b689ea52f | |||
28537b87e5 | |||
e311e438ce | |||
ff992c9115 | |||
6fd12c0a98 | |||
c9e6f5e614 | |||
37e1338d79 | |||
4e939fb9a6 | |||
0bc9d45d0a | |||
c58ebd1751 | |||
8454dcaf73 | |||
b901bf14cd | |||
43e05e8438 | |||
988748899e | |||
2ed3ca469a | |||
fa9ca37fb4 | |||
e0cf0d07ae | |||
1102229d84 | |||
150c0f7de1 | |||
496d96e10e | |||
def19c539b | |||
9bf6b45f09 | |||
2142da75ff | |||
7a262d4b76 | |||
ed1c57a5b6 | |||
d08d6b8c7c | |||
5b1c769a27 | |||
a96e168eb7 | |||
3e5569546f | |||
964b7f519f | |||
77a956ecee | |||
74269608d1 | |||
d1e1b08feb | |||
15b093f94e | |||
fe720708cd | |||
577280d634 | |||
f369cbb7d3 | |||
e5016c2fcc | |||
7b1b1d6b22 | |||
7176baeb20 | |||
7152740458 | |||
07f0045241 | |||
a150cdff87 | |||
ef7bd514c2 | |||
07c3afb735 | |||
91c182947c | |||
5b2cb83068 | |||
0424d05ada | |||
6fd62571ea | |||
2947b1c45e | |||
5a83ba9b9e | |||
46d405f276 | |||
9febb0c22b | |||
c7e427d866 | |||
2ae21aa31e | |||
aa3ea3a662 | |||
025cd37016 | |||
8b3a5fbdb1 | |||
86a87c6d51 | |||
a8cd84fa6e | |||
584aa32a2a | |||
026e8e11d2 | |||
087aefffdc | |||
168d1a5ee7 | |||
e00f87f2f5 | |||
489b5a5914 | |||
4685f23861 | |||
5ac2052215 | |||
a8f7d99e62 | |||
9e3334c3fa | |||
d2e7ef9b30 | |||
4307391c93 | |||
984bd339d8 | |||
37617f36cb | |||
1e90c3333a | |||
13ed3fd86c | |||
c1720b90ec | |||
7ae5d67f93 | |||
29a9ee748c | |||
d7de23fbd2 | |||
4ca9cd8a47 | |||
bc99494ae9 | |||
c78600536e | |||
1551ca80d5 | |||
db85fe78e8 | |||
d8ec72e3a7 | |||
1fb77fc4ff | |||
10a4713229 | |||
a3ee110ed9 | |||
d5a9fb078b | |||
7fe8c5fa3f | |||
91cdf824f2 | |||
6acc6b22a5 | |||
e70b21e517 | |||
f59152c352 | |||
a0ae6a465c | |||
7915befdf3 | |||
193d4dacae | |||
61c93972f0 | |||
2b69e03ab4 | |||
601b18c0df | |||
3b4412efb2 | |||
c00c91f5a5 | |||
444fb277de | |||
4f8773d4b5 | |||
0f26e509b3 | |||
b56359bf73 | |||
20efc93406 | |||
619403d57f | |||
ceb21b007e | |||
0038bcd6e1 | |||
b8445625e4 | |||
cee2a38161 | |||
dd7b79f395 | |||
585d907279 | |||
9b65f4ca99 | |||
3a872882ad | |||
984f598834 | |||
fa2a90319e | |||
ab2a5d41de | |||
7e637dbafe | |||
b9684fbc94 | |||
301d10b0f6 | |||
320e98fcd8 | |||
05ba91b472 | |||
750ae735ef | |||
e4ee2453c9 | |||
9b480b46d1 | |||
bc422f6a62 | |||
63b08a341f | |||
c43085122b | |||
dc12d046e0 | |||
79acd3e540 | |||
ccd0e8927f | |||
8d53b7932c | |||
1568cdeaf1 | |||
a2a488972a | |||
30befc2487 | |||
ade2956ba3 | |||
0e3a35adca | |||
a39514e646 | |||
e556db68e4 | |||
458691cc67 | |||
f743259b76 | |||
b5b27875b5 | |||
12e8fd1682 | |||
42bab3c176 | |||
cc8259cc24 | |||
e0f36fc463 | |||
8860d9cb2d | |||
ec6e285b9a | |||
7fcab1a956 | |||
148eeb0328 | |||
dbb8324418 | |||
f014c06343 | |||
960015e26b | |||
ed523ab0b1 | |||
43bab4a5ce | |||
7c72478cf0 | |||
c15e911769 | |||
f26a8af215 | |||
ff6f6c80cd | |||
fa9e60e6cd | |||
242410f8c0 | |||
772d3d31b0 | |||
c975651e9c | |||
a1365bcbb7 | |||
87c761c2e6 | |||
4644f4e6d1 | |||
9b5dee653b | |||
bc46e54697 | |||
9bedce9bb1 | |||
ccaa426a38 | |||
5f4814d48d | |||
![]() |
5be880e496 | ||
18f3bafe3e | |||
3e7fd512e9 | |||
e74e3dccde | |||
ab762dd7e3 | |||
![]() |
9b39ec0f23 | ||
![]() |
dccc8f1875 | ||
![]() |
f8a864b6cc | ||
![]() |
41bcbb50ab | ||
![]() |
442ec19bc1 | ||
![]() |
d8cb50130e | ||
![]() |
071c4bc963 | ||
![]() |
4ec57cdf2e | ||
![]() |
38314a0ed2 | ||
![]() |
f150b1706b | ||
![]() |
6d3e971a56 | ||
![]() |
964c9ff2d8 | ||
![]() |
d87e29e5fd | ||
![]() |
65c7611654 | ||
![]() |
238dd8fb68 | ||
![]() |
4238580d66 | ||
![]() |
349ec8f965 | ||
![]() |
a3c3b4a642 | ||
![]() |
1eb0caaa91 | ||
![]() |
96747eaff6 | ||
![]() |
00ca4fda09 | ||
![]() |
b9e80e3fbc | ||
![]() |
2cec8b9d5b | ||
![]() |
f365e1d8b5 | ||
![]() |
53b6bc307c | ||
![]() |
b546bc655f | ||
![]() |
e9a8c8c7b5 | ||
a96889353f | |||
![]() |
be3c09d3a8 | ||
137bbb1b2d | |||
b381a2394d | |||
![]() |
ac7cc17aa5 | ||
8c10325e52 | |||
81cb121a99 | |||
ab524316b6 | |||
97d1f11263 | |||
d39f10203f | |||
be6902c91c | |||
eb5465c5a6 | |||
5a1df13dcd | |||
af09babd7a | |||
5574c5ee9a | |||
5ead634ab2 | |||
66389b7a21 | |||
81af444a97 | |||
461e66bf53 | |||
992390b803 | |||
fc8eb51bdf | |||
569d4a80dc | |||
f6d572211f | |||
744556a681 | |||
88a0399f39 | |||
a104767e10 | |||
f713d225bf | |||
dfda72bcd7 | |||
7c611e4a8a | |||
51d91feb46 | |||
f16b0df762 | |||
05cd5901d5 | |||
4c49bde2bf | |||
bbbb8279d7 | |||
14781d3d6f | |||
75533b91a8 | |||
![]() |
7f208f2e55 | ||
1998246cec | |||
7f0069fd84 | |||
6165e4a372 | |||
45ee78b607 | |||
3c7fe2b997 | |||
f9ff7f1e62 | |||
2a478283c2 | |||
4e3d533720 | |||
97da76d6b5 | |||
6a64544e13 | |||
1407e61bba | |||
4cc60ff4d6 | |||
76674130d4 | |||
c79d949569 | |||
f3cddf05a1 | |||
f33406ffe2 | |||
2d20969ccf |
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
2
.git-blame-ignore-revs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Move source files into an `src` directory.
|
||||||
|
51c5f5759d667821fc94b9ed170de9a43dfbc848
|
8
.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Nix.
|
||||||
|
/.direnv/
|
||||||
|
/result
|
||||||
|
|
||||||
|
# pdfpc.
|
||||||
|
/**/*.pdfpc
|
||||||
|
|
||||||
|
/**/*.pdf
|
5
.nvim.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
vim.keymap.set("n", "<leader>ta", '_iTextAnnotation "<Esc>A"<Esc>j')
|
||||||
|
vim.keymap.set("v", "<leader>ta", ':norm ITextAnnotation "<Esc>gv:norm A"<Esc>')
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Left>", "gT")
|
||||||
|
vim.keymap.set("n", "<Right>", "gt")
|
4
README.rst
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Talks and Presentations by Oliver Davies
|
||||||
|
########################################
|
||||||
|
|
||||||
|
The source files for `my presentation slides <https://www.oliverdavies.uk/presentations>`_, written in reStructuredText and compiled using `rst2pdf <https://rst2pdf.org>`_.
|
0
building-build-configs/code/generating-files.txt
Normal file
BIN
building-build-configs/diagram.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
building-build-configs/example.mp4
Normal file
27
building-build-configs/sections/conclusion.rst
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
Result
|
||||||
|
======
|
||||||
|
|
||||||
|
- Easier and faster to create and onboard projects.
|
||||||
|
- One canonical source of truth.
|
||||||
|
- Easy to add new features and fixes for all projects.
|
||||||
|
- Automation is easier due to consistency (e.g. Docker Compose service names).
|
||||||
|
|
||||||
|
Thanks!
|
||||||
|
=======
|
||||||
|
|
||||||
|
References:
|
||||||
|
|
||||||
|
- https://opdavi.es/build-configs
|
||||||
|
- https://github.com/opdavies/docker-example-drupal
|
||||||
|
- https://github.com/opdavies/docker-example-drupal-commerce-kickstart
|
||||||
|
- https://github.com/opdavies/docker-example-drupal-localgov
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
Me:
|
||||||
|
|
||||||
|
- https://www.oliverdavies.uk
|
52
building-build-configs/sections/customisation.rst
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
Overriding Values
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
php:
|
||||||
|
version: 8.1-fpm-bullseye
|
||||||
|
# Disable PHPCS, PHPStan and PHPUnit.
|
||||||
|
phpcs: false
|
||||||
|
phpstan: false
|
||||||
|
phpunit: false
|
||||||
|
|
||||||
|
# Ignore more directories from Git.
|
||||||
|
git:
|
||||||
|
ignore:
|
||||||
|
- /bin/
|
||||||
|
- /libraries/
|
||||||
|
- /web/profiles/contrib/
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Drupal Commerce Kickstart demo. No custom modules to test, and additional paths to ignore from Git."
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
dockerfile:
|
||||||
|
stages:
|
||||||
|
build:
|
||||||
|
# What additional directories do we need?
|
||||||
|
extra_directories:
|
||||||
|
- config
|
||||||
|
- patches
|
||||||
|
- scripts
|
||||||
|
|
||||||
|
commands:
|
||||||
|
- composer validate --strict
|
||||||
|
- composer install
|
||||||
|
|
||||||
|
# What additional PHP extensions do we need?
|
||||||
|
extensions:
|
||||||
|
install: [bcmath]
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Extra directories and PHP extensions that need to be added".
|
||||||
|
|
92
building-build-configs/sections/example.rst
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
Example
|
||||||
|
=======
|
||||||
|
|
||||||
|
build.yaml:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
name: my-example-project
|
||||||
|
type: drupal
|
||||||
|
language: php
|
||||||
|
|
||||||
|
php:
|
||||||
|
version: 8.1-fpm-bullseye
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
Dockerfile:
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Abstract the project-specific values and configuration into this file."
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
FROM php:8.1-fpm-bullseye AS base
|
||||||
|
|
||||||
|
Configuring a Project
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
php:
|
||||||
|
version: 8.1-fpm-bullseye
|
||||||
|
|
||||||
|
# Which PHPCS standards should be used and on which paths?
|
||||||
|
phpcs:
|
||||||
|
paths: [web/modules/custom]
|
||||||
|
standards: [Drupal, DrupalPractice]
|
||||||
|
|
||||||
|
# What level should PHPStan run and on what paths?
|
||||||
|
phpstan:
|
||||||
|
level: max
|
||||||
|
paths: [web/modules/custom]
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
docker-compose:
|
||||||
|
# Which Docker Compose services do we need?
|
||||||
|
services:
|
||||||
|
- database
|
||||||
|
- php
|
||||||
|
- web
|
||||||
|
|
||||||
|
dockerfile:
|
||||||
|
stages:
|
||||||
|
build:
|
||||||
|
# What commands do we need to run?
|
||||||
|
commands:
|
||||||
|
- composer validate --strict
|
||||||
|
- composer install
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
web:
|
||||||
|
type: nginx # nginx, apache, caddy
|
||||||
|
|
||||||
|
database:
|
||||||
|
type: mariadb # mariadb, mysql
|
||||||
|
version: 10
|
||||||
|
|
||||||
|
# Where is Drupal located?
|
||||||
|
drupal:
|
||||||
|
docroot: web # web, docroot, null
|
||||||
|
|
||||||
|
experimental:
|
||||||
|
createGitHubActionsConfiguration: true
|
||||||
|
runGitHooksBeforePush: true
|
||||||
|
useNewDatabaseCredentials: true
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Experimental opt-in features that I want to trial on certain projects or to disable non-applicable features - e.g. GitHub Actions on Bitbucket."
|
||||||
|
|
||||||
|
PageBreak
|
300
building-build-configs/sections/internals.rst
Normal file
|
@ -0,0 +1,300 @@
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak titlePage
|
||||||
|
|
||||||
|
.. class:: centredtitle
|
||||||
|
|
||||||
|
Build Configs internals
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
src/
|
||||||
|
Action/
|
||||||
|
CreateFinalConfigurationData.php
|
||||||
|
CreateListOfFilesToGenerate.php
|
||||||
|
GenerateConfigurationFiles.php
|
||||||
|
ValidateConfigurationData.php
|
||||||
|
Command/
|
||||||
|
GenerateCommand.php
|
||||||
|
InitCommand.php
|
||||||
|
DataTransferObject/
|
||||||
|
ConfigDto.php
|
||||||
|
TemplateFile.php
|
||||||
|
Enum/
|
||||||
|
Language.php
|
||||||
|
ProjectType.php
|
||||||
|
WebServer.php
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
protected function configure(): void
|
||||||
|
$this
|
||||||
|
->addOption(
|
||||||
|
name: 'config-file',
|
||||||
|
shortcut: ['c'],
|
||||||
|
mode: InputOption::VALUE_REQUIRED,
|
||||||
|
description: 'The path to the project\'s build.yaml file',
|
||||||
|
default: 'build.yaml',
|
||||||
|
)
|
||||||
|
->addOption(
|
||||||
|
name: 'output-dir',
|
||||||
|
shortcut: ['o'],
|
||||||
|
mode: InputOption::VALUE_REQUIRED,
|
||||||
|
description: 'The directory to create files in',
|
||||||
|
default: '.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
$io = new SymfonyStyle($input, $output);
|
||||||
|
|
||||||
|
$configFile = $input->getOption(name: 'config-file');
|
||||||
|
$outputDir = $input->getOption(name: 'output-dir');
|
||||||
|
}
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
$pipelines = [
|
||||||
|
new CreateFinalConfigurationData(),
|
||||||
|
|
||||||
|
new ValidateConfigurationData(),
|
||||||
|
|
||||||
|
new CreateListOfFilesToGenerate(),
|
||||||
|
|
||||||
|
new GenerateConfigurationFiles(
|
||||||
|
$this->filesystem,
|
||||||
|
$this->twig,
|
||||||
|
$outputDir,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int,TemplateFile> $generatedFiles
|
||||||
|
* @var ConfigDto $configurationData
|
||||||
|
*/
|
||||||
|
[$configurationData, $generatedFiles] = (new Pipeline())
|
||||||
|
->send($configFile)
|
||||||
|
->through($pipelines)
|
||||||
|
->thenReturn();
|
||||||
|
|
||||||
|
$io->info("Building configuration for {$configurationData->name}.");
|
||||||
|
|
||||||
|
$io->write('Generated files:');
|
||||||
|
$io->listing(static::getListOfFiles(filesToGenerate: $generatedFiles)->toArray());
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
// CreateFinalConfigurationData.php
|
||||||
|
|
||||||
|
public function handle(string $configFile, \Closure $next) {
|
||||||
|
{
|
||||||
|
$configurationData = Yaml::parseFile(filename: $configFile);
|
||||||
|
|
||||||
|
$configurationData = array_replace_recursive(
|
||||||
|
Yaml::parseFile(filename: __DIR__ . '/../../resources/build.defaults.yaml'),
|
||||||
|
$configurationData,
|
||||||
|
);
|
||||||
|
|
||||||
|
// ...
|
||||||
|
|
||||||
|
return $next($configurationData);
|
||||||
|
}
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
// ValidateConfigurationData.php
|
||||||
|
|
||||||
|
public function handle(array $configurationData, \Closure $next)
|
||||||
|
{
|
||||||
|
// Convert the input to a configuration data object.
|
||||||
|
$normalizer = new ObjectNormalizer(null, new CamelCaseToSnakeCaseNameConverter());
|
||||||
|
$serializer = new Serializer([$normalizer], [new JsonEncoder()]);
|
||||||
|
|
||||||
|
$configurationDataDto = $serializer->deserialize(
|
||||||
|
json_encode($configurationData),
|
||||||
|
ConfigDto::class,
|
||||||
|
'json',
|
||||||
|
);
|
||||||
|
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
// ValidateConfigurationData.php
|
||||||
|
|
||||||
|
public function handle(array $configurationData, \Closure $next)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
$validator = Validation::createValidatorBuilder()
|
||||||
|
->enableAnnotationMapping()
|
||||||
|
->getValidator();
|
||||||
|
$violations = $validator->validate($configurationDataDto);
|
||||||
|
|
||||||
|
if (0 < $violations->count()) {
|
||||||
|
throw new \RuntimeException('Configuration is invalid.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next([$configurationData, $configurationDataDto]);
|
||||||
|
}
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
// ConfigDto.php
|
||||||
|
|
||||||
|
#[Assert\Collection(
|
||||||
|
allowExtraFields: false,
|
||||||
|
fields: ['docroot' => new Assert\Choice([null, 'web', 'docroot'])],
|
||||||
|
)]
|
||||||
|
public array $drupal;
|
||||||
|
|
||||||
|
#[Assert\Collection([
|
||||||
|
'ignore' => new Assert\Optional([
|
||||||
|
new Assert\All([
|
||||||
|
new Assert\Type('string'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
])]
|
||||||
|
public array $git;
|
||||||
|
|
||||||
|
#[Assert\Choice(choices: ['javascript', 'php', 'typescript'])]
|
||||||
|
public string $language;
|
||||||
|
|
||||||
|
#[Assert\NotBlank]
|
||||||
|
#[Assert\Type('string')]
|
||||||
|
public string $name;
|
||||||
|
|
||||||
|
#[Assert\Type('string')]
|
||||||
|
public string $projectRoot;
|
||||||
|
|
||||||
|
#[Assert\Choice(choices: [
|
||||||
|
'drupal',
|
||||||
|
'fractal',
|
||||||
|
'php-library',
|
||||||
|
'symfony',
|
||||||
|
])]
|
||||||
|
public string $type;
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:startinline: true
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
// CreateListOfFilesToGenerate.php
|
||||||
|
|
||||||
|
public function handle(array $configurationDataAndDto, \Closure $next)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ConfigDto $configDto,
|
||||||
|
* @var array<string,mixed> $configurationData
|
||||||
|
*/
|
||||||
|
[$configurationData, $configDto] = $configurationDataAndDto;
|
||||||
|
|
||||||
|
/** @var Collection<int, TemplateFile> */
|
||||||
|
$filesToGenerate = collect();
|
||||||
|
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:startinline: true
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
// CreateListOfFilesToGenerate.php
|
||||||
|
|
||||||
|
public function handle(array $configurationDataAndDto, \Closure $next)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
if (!isset($configDto->php['phpunit']) || $configDto->php['phpunit'] !== false) {
|
||||||
|
|
||||||
|
$filesToGenerate->push(
|
||||||
|
new TemplateFile(
|
||||||
|
data: 'drupal/phpunit.xml.dist',
|
||||||
|
name: 'phpunit.xml.dist',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ...
|
||||||
|
|
||||||
|
return $next([$configurationData, $configDto, $filesToGenerate]);
|
||||||
|
}
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:linenos:
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
// GenerateConfigurationFiles.php
|
||||||
|
|
||||||
|
public function handle(array $filesToGenerateAndConfigurationData, \Closure $next)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
$filesToGenerate->each(function(TemplateFile $templateFile) use ($configurationData): void {
|
||||||
|
if ($templateFile->path !== null) {
|
||||||
|
if (!$this->filesystem->exists($templateFile->path)) {
|
||||||
|
$this->filesystem->mkdir("{$this->outputDir}/{$templateFile->path}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sourceFile = "{$templateFile->data}.twig";
|
||||||
|
|
||||||
|
$outputFile = collect([$this->outputDir, $templateFile->path, $templateFile->name])
|
||||||
|
->filter()->implode('/');
|
||||||
|
|
||||||
|
$this->filesystem->dumpFile($outputFile, $this->twig->render($sourceFile, $configurationData));
|
||||||
|
});
|
||||||
|
|
||||||
|
return $next([$configurationDataDto, $filesToGenerate]);
|
||||||
|
}
|
||||||
|
|
55
building-build-configs/sections/intro.rst
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
What is "Build Configs"?
|
||||||
|
========================
|
||||||
|
|
||||||
|
- Command-line tool.
|
||||||
|
- Inspired by Workspace, name from the TheAltF4Stream.
|
||||||
|
- Built with Symfony.
|
||||||
|
- Creates and manages build configuration files.
|
||||||
|
- Customisable per-project.
|
||||||
|
- Drupal, PHP library, Fractal (TypeScript).
|
||||||
|
- "Sprint zero in a box".
|
||||||
|
|
||||||
|
What Problem Does it Solve?
|
||||||
|
===========================
|
||||||
|
|
||||||
|
- I work on multiple similar projects.
|
||||||
|
- Different configuration values - e.g. ``web`` vs. ``docroot``.
|
||||||
|
- Different versions of PHP, node, etc.
|
||||||
|
- Different Docker Compose (``fpm`` vs. ``apache`` images).
|
||||||
|
- Each project was separate.
|
||||||
|
- Difficult to add new features and fix bugs across all projects.
|
||||||
|
- Inconsistencies across projects.
|
||||||
|
- Out of the box solutions didn't seem like the best fit.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Multiple projects with similar but different configurations."
|
||||||
|
TextAnnotation ""
|
||||||
|
TextAnnotation "Out of the box solutions tend to focus on one technology, could be hard to customise, and usually had more than I nedeed."
|
||||||
|
TextAnnotation ""
|
||||||
|
TextAnnotation "Start small and build up instead of removing additional things."
|
||||||
|
TextAnnotation ""
|
||||||
|
TextAnnotation "More opportunities to learn the underlying technologies."
|
||||||
|
|
||||||
|
How Does it Work?
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. image:: diagram.png
|
||||||
|
:width: 18cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Canonical templates and project-specific configuration goes in, templates come out."
|
||||||
|
|
||||||
|
What Files Does it Generate?
|
||||||
|
============================
|
||||||
|
|
||||||
|
- Dockerfile, Docker Compose, Nix Flake, php.ini, NGINX default.conf.
|
||||||
|
- ``run`` file.
|
||||||
|
- PHPUnit, PHPCS, PHPStan.
|
||||||
|
- GitHub Actions workflow.
|
||||||
|
- Git hooks.
|
117
building-build-configs/sections/templates.rst
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
Dockerfile.twig
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
FROM php:{{ php.version }} AS base
|
||||||
|
|
||||||
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
|
RUN which composer && composer -V
|
||||||
|
|
||||||
|
ARG DOCKER_UID=1000
|
||||||
|
ENV DOCKER_UID="${DOCKER_UID}"
|
||||||
|
|
||||||
|
WORKDIR {{ project_root }}
|
||||||
|
|
||||||
|
RUN adduser --disabled-password --uid "${DOCKER_UID}" app \
|
||||||
|
&& chown app:app -R {{ project_root }}
|
||||||
|
|
||||||
|
Dockerfile.twig
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
{% if dockerfile.stages.build.extensions.install %}
|
||||||
|
RUN docker-php-ext-install
|
||||||
|
{{ dockerfile.stages.build.extensions.install|join(' ') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
COPY --chown=app:app phpunit.xml* ./
|
||||||
|
|
||||||
|
{% if dockerfile.stages.build.extra_files %}
|
||||||
|
COPY --chown=app:app {{ dockerfile.stages.build.extra_files|join(" ") }} ./
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for directory in dockerfile.stages.build.extra_directories %}
|
||||||
|
COPY --chown=app:app {{ directory }} {{ directory }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
docker-compose.yaml.twig
|
||||||
|
========================
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
services:
|
||||||
|
{% if "web" in dockerCompose.services %}
|
||||||
|
web:
|
||||||
|
<<: [*default-proxy, *default-app]
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
target: web
|
||||||
|
depends_on:
|
||||||
|
- php
|
||||||
|
profiles: [web]
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
phpstan.neon.dist.twig
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
level: {{ php.phpstan.level }}
|
||||||
|
excludePaths:
|
||||||
|
- *Test.php
|
||||||
|
- *TestBase.php
|
||||||
|
paths:
|
||||||
|
{% for path in php.phpstan.paths -%}
|
||||||
|
- {{ path }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
{% if php.phpstan.baseline %}
|
||||||
|
includes:
|
||||||
|
- phpstan-baseline.neon
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
phpunit.xml.dist.twig
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
<phpunit
|
||||||
|
beStrictAboutChangesToGlobalState="true"
|
||||||
|
beStrictAboutOutputDuringTests="false"
|
||||||
|
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||||
|
bootstrap="{{ drupal.docroot }}/core/tests/bootstrap.php"
|
||||||
|
cacheResult="false"
|
||||||
|
colors="true"
|
||||||
|
failOnWarning="true"
|
||||||
|
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter"
|
||||||
|
>
|
||||||
|
|
||||||
|
phpunit.xml.dist.twig
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="functional">
|
||||||
|
<directory>./{{ drupal.docroot }}/modules/custom/**/tests/**/Functional</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="kernel">
|
||||||
|
<directory>./{{ drupal.docroot }}/modules/custom/**/tests/**/Kernel</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="unit">
|
||||||
|
<directory>./{{ drupal.docroot }}/modules/custom/**/tests/**/Unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
29
building-build-configs/slides.rst
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
.. footer:: @opdavies
|
||||||
|
|
||||||
|
Building "Build Configs"
|
||||||
|
########################
|
||||||
|
|
||||||
|
.. class:: titleslideinfo
|
||||||
|
|
||||||
|
Oliver Davies (@opdavies)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. class:: titleslideinfo
|
||||||
|
|
||||||
|
https://opdavi.es/bco
|
||||||
|
|
||||||
|
.. include:: ./sections/intro.rst
|
||||||
|
.. include:: ./sections/example.rst
|
||||||
|
.. include:: ./sections/customisation.rst
|
||||||
|
.. include:: ./sections/templates.rst
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak titlePage
|
||||||
|
|
||||||
|
.. class:: centredtitle
|
||||||
|
|
||||||
|
Demo
|
||||||
|
|
||||||
|
.. include:: ./sections/conclusion.rst
|
4
building-presenting-slide-decks-rst2pdf/README.rst
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Building and presenting slide decks with rst2pdf
|
||||||
|
################################################
|
||||||
|
|
||||||
|
https://www.oliverdavies.uk/talks/building-presenting-slide-decks-rst2pdf
|
12
building-presenting-slide-decks-rst2pdf/code/building.txt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
rst2pdf slides.rst
|
||||||
|
|
||||||
|
|
||||||
|
rst2pdf slides.rst --break-level 1 --stylesheets main
|
||||||
|
|
||||||
|
|
||||||
|
rst2pdf slides.rst \
|
||||||
|
--output slides.pdf \
|
||||||
|
--stylesheets main \
|
||||||
|
--break-level 1 \
|
||||||
|
--fit-background-mode scale \
|
||||||
|
--extension-module preprocess
|
|
@ -0,0 +1,4 @@
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: code/additional-config-options.txt
|
||||||
|
:hl_lines: 2 3 4
|
||||||
|
:linenos:
|
|
@ -0,0 +1 @@
|
||||||
|
.. include:: sections/intro.rst
|
|
@ -0,0 +1,3 @@
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
|
@ -0,0 +1,6 @@
|
||||||
|
pageTemplates:
|
||||||
|
standardPage:
|
||||||
|
frames: []
|
||||||
|
[3%, 3%, 92%, 92%]
|
||||||
|
showFooter: true
|
||||||
|
showHeader: false
|
29
building-presenting-slide-decks-rst2pdf/code/styling.txt
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
linkColor: #24608a
|
||||||
|
|
||||||
|
styles:
|
||||||
|
normal:
|
||||||
|
fontSize: 24
|
||||||
|
leading: 32
|
||||||
|
textColor: #383745
|
||||||
|
|
||||||
|
bodytext:
|
||||||
|
alignment: TA_LEFT
|
||||||
|
|
||||||
|
heading:
|
||||||
|
fontSize: 20
|
||||||
|
spaceAfter: 16
|
||||||
|
textColor: #24608a
|
||||||
|
|
||||||
|
title:
|
||||||
|
fontSize: 300%
|
||||||
|
parent: heading
|
||||||
|
textColor: white
|
||||||
|
|
||||||
|
bullet-list:
|
||||||
|
commands: []
|
||||||
|
[LEFTPADDING, [0, 0], [1, -1], 10]
|
||||||
|
[RIGHTPADDING, [0, 0], [1, -1], 0]
|
||||||
|
[VALIGN, [0, 0], [-1, -1], TOP]
|
||||||
|
colWidths: ["20", null]
|
||||||
|
textColor: #aaaaaa
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
Building and presenting slide decks with rst2pdf
|
||||||
|
################################################
|
||||||
|
|
||||||
|
.. class:: titleslideinfo
|
||||||
|
|
||||||
|
Oliver Davies (@opdavies)
|
||||||
|
|
||||||
|
|
||||||
|
What is rst2pdf?
|
||||||
|
================
|
||||||
|
|
||||||
|
* "Use a text editor. Make a PDF."
|
||||||
|
* reStructuredText to PDF
|
||||||
|
* Each slide is a page
|
|
@ -0,0 +1,14 @@
|
||||||
|
.. image:: images/editing.png
|
||||||
|
:width: 20cm
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:startinline: true
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
echo 'Hello world!';
|
||||||
|
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "This is a speaker note."
|
|
@ -0,0 +1,8 @@
|
||||||
|
nodemon --ext rst,style,txt --exec "
|
||||||
|
rst2pdf slides.rst \
|
||||||
|
--output slides.pdf \
|
||||||
|
--stylesheets main \
|
||||||
|
--break-level 1 \
|
||||||
|
--fit-background-mode scale \
|
||||||
|
--extension-module preprocess
|
||||||
|
"
|
BIN
building-presenting-slide-decks-rst2pdf/images/editing.png
Normal file
After Width: | Height: | Size: 225 KiB |
BIN
building-presenting-slide-decks-rst2pdf/images/pdfpc-1.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
building-presenting-slide-decks-rst2pdf/images/pdfpc-2.png
Normal file
After Width: | Height: | Size: 119 KiB |
169
building-presenting-slide-decks-rst2pdf/slides.rst
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
.. footer:: @opdavies
|
||||||
|
|
||||||
|
Building and presenting slide decks with rst2pdf
|
||||||
|
################################################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. class:: titleslideinfo
|
||||||
|
|
||||||
|
Oliver Davies (@opdavies)
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Gave my first talk in 2012."
|
||||||
|
TextAnnotation "A talk about a tool (rst2pdf) that I've been using for the last couple of talks."
|
||||||
|
|
||||||
|
.. page:: standardPage
|
||||||
|
|
||||||
|
What have I used before?
|
||||||
|
========================
|
||||||
|
|
||||||
|
* **UI based:** Keynote, Google Slides, slides.com
|
||||||
|
* **HTML/JavaScript:** reveal.js
|
||||||
|
* **Markdown:** Deckset, Marp, reveal-md
|
||||||
|
|
||||||
|
What is rst2pdf?
|
||||||
|
================
|
||||||
|
|
||||||
|
* "Use a text editor. Make a PDF."
|
||||||
|
* reStructuredText to PDF
|
||||||
|
* Each slide is a page
|
||||||
|
* Page templates for layouts
|
||||||
|
* Not just for slide decks
|
||||||
|
* Table of contents, page numbers, headers, footers
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Use the tools you're familiar with."
|
||||||
|
TextAnnotation "Similar to Markdown."
|
||||||
|
TextAnnotation "Primarily used for technical documentation within the Python community."
|
||||||
|
TextAnnotation "Now maintained by PHPers Rob Allen and Lorna Jane Mitchell."
|
||||||
|
TextAnnotation "Breaks at titles automatically, or you can add manual page breaks."
|
||||||
|
|
||||||
|
Advantages
|
||||||
|
==========
|
||||||
|
|
||||||
|
* Easy to start a new presentation, or update an existing one
|
||||||
|
* Version controllable
|
||||||
|
* Portable
|
||||||
|
* Content is searchable
|
||||||
|
* Easy to re-use content and/or styling
|
||||||
|
* Slides uploaded to SpeakerDeck straight away
|
||||||
|
|
||||||
|
.. page:: imagePage
|
||||||
|
|
||||||
|
.. image:: images/editing.png
|
||||||
|
:width: 23cm
|
||||||
|
|
||||||
|
.. page:: standardPage
|
||||||
|
|
||||||
|
Useful reStructuredText
|
||||||
|
=======================
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
:include: code/useful-rst-1.txt
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
Useful reStructuredText
|
||||||
|
=======================
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
:include: code/useful-rst-2.txt
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
Page Templates
|
||||||
|
==============
|
||||||
|
|
||||||
|
main.style:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: code/page-templates-style.txt
|
||||||
|
|
||||||
|
slides.rst:
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
:include: code/page-templates-rst.txt
|
||||||
|
|
||||||
|
Keeping things organised
|
||||||
|
========================
|
||||||
|
|
||||||
|
Split slides into different sections:
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
:include: code/includes-sections.txt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
Including code snippets from separate files:
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
:include: code/includes-code.txt
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Includes!"
|
||||||
|
|
||||||
|
Styling
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: code/styling.txt
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
Building
|
||||||
|
========
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
:include: code/building.txt
|
||||||
|
|
||||||
|
Watching
|
||||||
|
========
|
||||||
|
|
||||||
|
Re-compiling when something changes.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: code/watching.txt
|
||||||
|
|
||||||
|
Presenting
|
||||||
|
==========
|
||||||
|
|
||||||
|
``pdfpc`` - PDF presenter console
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
pdfpc slides.pdf
|
||||||
|
|
||||||
|
.. page:: imagePage
|
||||||
|
|
||||||
|
.. image:: images/pdfpc-1.png
|
||||||
|
:width: 23cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. image:: images/pdfpc-2.png
|
||||||
|
:width: 23cm
|
||||||
|
|
||||||
|
.. page:: standardPage
|
||||||
|
|
||||||
|
Thanks!
|
||||||
|
=======
|
||||||
|
|
||||||
|
References:
|
||||||
|
|
||||||
|
* https://rst2pdf.org
|
||||||
|
* https://github.com/rst2pdf/rst2pdf
|
||||||
|
* https://github.com/opdavies/talks
|
||||||
|
* https://oliverdavies.link/lorna-rst2pdf-talk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
Me:
|
||||||
|
|
||||||
|
* https://www.oliverdavies.uk
|
20
building-static-websites-sculpin/demo/.gitignore
vendored
|
@ -1,18 +1,10 @@
|
||||||
/.phpunit.result.cache
|
|
||||||
/output_*/
|
/output_*/
|
||||||
/vendor/
|
|
||||||
|
|
||||||
|
/.phpunit.cache
|
||||||
|
/.phpunit.result.cache
|
||||||
|
|
||||||
|
# Nix
|
||||||
/.direnv/
|
/.direnv/
|
||||||
|
|
||||||
/source/build/*
|
# Composer
|
||||||
!/source/build/.keep
|
/vendor/
|
||||||
|
|
||||||
# Devenv
|
|
||||||
.devenv*
|
|
||||||
devenv.local.nix
|
|
||||||
|
|
||||||
# direnv
|
|
||||||
.direnv
|
|
||||||
|
|
||||||
# pre-commit
|
|
||||||
.pre-commit-config.yaml
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
sculpin_content_types:
|
sculpin_content_types:
|
||||||
speakers:
|
# speakers:
|
||||||
permalink: /speakers/:basename/
|
# permalink: /speakers/:basename/
|
||||||
talks:
|
# talks:
|
||||||
permalink: /talks/:basename/
|
# permalink: /talks/:basename/
|
||||||
posts:
|
posts:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
name: 'PHP Thames Valley'
|
name: 'My New Sculpin Site'
|
||||||
locale: en
|
locale: en
|
||||||
|
|
7
building-static-websites-sculpin/demo/build
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
export PATH="$PATH:./vendor/bin"
|
||||||
|
|
||||||
|
sculpin generate "$@"
|
3
building-static-websites-sculpin/demo/build-configs.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
name: demo
|
||||||
|
template: php-sculpin
|
5
building-static-websites-sculpin/demo/clean
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
rm -rfv output_* vendor
|
|
@ -1,22 +1,26 @@
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
outputs =
|
outputs = inputs:
|
||||||
{ nixpkgs, ... }:
|
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.${system}.default =
|
devShells.${system}.default =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
mkShell {
|
mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
php83
|
nodePackages.browser-sync
|
||||||
|
|
||||||
|
(php83.buildEnv {
|
||||||
|
extraConfig = ''
|
||||||
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
|
||||||
php83Packages.composer
|
php83Packages.composer
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
formatters.${system} = pkgs.nixfmt-rfc-style;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,18 +2,4 @@
|
||||||
|
|
||||||
{% block content_wrapper %}
|
{% block content_wrapper %}
|
||||||
<h1>{{ page.name }}</h1>
|
<h1>{{ page.name }}</h1>
|
||||||
|
|
||||||
<img style="height: 50px; width: 50px;" src="{{ page.imageUrl }}"/>
|
|
||||||
|
|
||||||
{% block content %}{% endblock %}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
{% for talk in data.talks if talk.speakers.0 == page.name %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ talk.url }}">
|
|
||||||
{{ talk.title }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -2,10 +2,4 @@
|
||||||
|
|
||||||
{% block content_wrapper %}
|
{% block content_wrapper %}
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
|
|
||||||
{{ page.date|date('jS F Y') }}
|
|
||||||
|
|
||||||
{% for speaker in page.speakers %}
|
|
||||||
{{ speaker }}
|
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
---
|
---
|
||||||
name: Dan Leech
|
name: Dan Leech
|
||||||
imageUrl: /images/highres_257208698.jpeg
|
imageUrl: /images/highres_257208698.jpeg
|
||||||
layout: speaker
|
|
||||||
use: [talks]
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,15 +1,4 @@
|
||||||
---
|
---
|
||||||
layout: base
|
layout: base
|
||||||
title: Hello, PHP Thames Valley!
|
title: Hello, World!
|
||||||
use: [talks]
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<ul>
|
|
||||||
{% for talk in data.talks %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ talk.url }}">
|
|
||||||
{{ talk.title }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
7
building-static-websites-sculpin/demo/watch
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
export PATH="$PATH:./vendor/bin"
|
||||||
|
|
||||||
|
sculpin generate --server --watch "$@"
|
4
building-static-websites-sculpin/slides/README.rst
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Building static websites with Sculpin
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
https://www.oliverdavies.uk/talks/building-static-websites-sculpin
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
name: oliverdavies.uk
|
||||||
|
menu_links:
|
||||||
|
- { title: Home, href: / }
|
||||||
|
- { title: About, href: /about }
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: My Daily Email Archive
|
||||||
|
layout: default
|
||||||
|
use:
|
||||||
|
- daily_email
|
||||||
|
---
|
||||||
|
|
||||||
|
{% for email in data.daily_emails %}
|
||||||
|
<p>{{ email.title }}</p>
|
||||||
|
{% endfor %}
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
...
|
||||||
|
testimonials:
|
||||||
|
- { name: ..., role: ..., text: ..., url: ... }
|
||||||
|
- { name: ..., role: ..., text: ..., url: ... }
|
||||||
|
- { name: ..., role: ..., text: ..., url: ... }
|
||||||
|
---
|
||||||
|
|
||||||
|
{% for testimonial in page.testimonials %}
|
||||||
|
<h2>{{ testimonial.name }} - {{ testimonial.role }}</h2>
|
||||||
|
<p>{{ testimonial.text }}</p>
|
||||||
|
{% endfor %}
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: New blog post
|
||||||
|
draft: yes
|
||||||
|
---
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Hello!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Hello, World!</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Hello!
|
||||||
|
---
|
||||||
|
|
||||||
|
Hello, World!
|
11
building-static-websites-sculpin/slides/code/layout-base.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{# source/_layouts/base.html.twig #}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ site.locale|default('en') }}">
|
||||||
|
<head>
|
||||||
|
<title>{{ site.name|default('Sculpin Skeleton') }}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{% block body %}{% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,7 @@
|
||||||
|
{# source/_layouts/page.html.twig #}
|
||||||
|
|
||||||
|
{% extends 'base' %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1,13 @@
|
||||||
|
app/
|
||||||
|
config/
|
||||||
|
sculpin_kernel.yml
|
||||||
|
sculpin_site.yml
|
||||||
|
composer.json
|
||||||
|
composer.lock
|
||||||
|
output_dev/
|
||||||
|
output_prod/
|
||||||
|
source/
|
||||||
|
_includes/
|
||||||
|
_templates/
|
||||||
|
index.md
|
||||||
|
vendor/
|
8
building-static-websites-sculpin/slides/code/twig-1.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{{ 'today' }}
|
||||||
|
|
||||||
|
{{ 'today'|date }}
|
||||||
|
|
||||||
|
{{ 'today'|date('Y') }}
|
||||||
|
|
||||||
|
{{ 'today'|date('Y') - 2007 }} # 18 (years of experience)
|
||||||
|
|
24
building-static-websites-sculpin/slides/code/twig-2.txt
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
title: Building Static Websites with Sculpin
|
||||||
|
events:
|
||||||
|
- name: PHP Berkshire
|
||||||
|
date: 2024-08-28
|
||||||
|
location: Reading, UK
|
||||||
|
url: https://www.meetup.com/php-berkshire/events/301850284
|
||||||
|
- name: BrumPHP
|
||||||
|
date: 2024-05-23
|
||||||
|
location: Birmingham, UK
|
||||||
|
url: https://www.eventbrite.com/e/brumphp-23rd-may-2024-tickets-803037766577
|
||||||
|
---
|
||||||
|
// end yaml
|
||||||
|
|
||||||
|
// start twig
|
||||||
|
{% set talkCount = 0 %}
|
||||||
|
|
||||||
|
{% for talk in data.talks %}
|
||||||
|
{% for event in talk.events if 'today'|date('U') >= event.date|date('U') %}
|
||||||
|
{% set talkCount = talkCount + 1 %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<p>I have given {{ talkCount }} talks.</p>
|
15
building-static-websites-sculpin/slides/code/twig-3.txt
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{% set talks = site.talks|filter(talk => talk.speaker == page.name) %}
|
||||||
|
|
||||||
|
{% if talks is not empty %}
|
||||||
|
<section>
|
||||||
|
<h2>Talks by {{ page.name }}</h2>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
{% for talk in talks %}
|
||||||
|
<li><a href="#0">{{ talk.title }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
8
building-static-websites-sculpin/slides/demo.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- Adding a new page (`/talks`)
|
||||||
|
- Adding a new menu link
|
||||||
|
- Adding a new content type (talks)
|
||||||
|
- Add a new talk
|
||||||
|
- Show how to use page-level variables, adding events to a talk
|
||||||
|
- Adding the talks page to the menu
|
||||||
|
- Active menu link styling?
|
||||||
|
- Generating a production version of the site
|
BIN
building-static-websites-sculpin/slides/images/druplicon.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
building-static-websites-sculpin/slides/images/packagist.png
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
building-static-websites-sculpin/slides/images/sculpin.png
Normal file
After Width: | Height: | Size: 135 KiB |
723
building-static-websites-sculpin/slides/slides.rst
Normal file
|
@ -0,0 +1,723 @@
|
||||||
|
Building static websites with Sculpin
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. class:: titleslideinfo
|
||||||
|
|
||||||
|
Oliver Davies
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak imagePage
|
||||||
|
|
||||||
|
.. image:: images/druplicon.png
|
||||||
|
:width: 10cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
TextAnnotation "I primarily work with Drupal and have been a Drupal developer since 2007/8."
|
||||||
|
TextAnnotation "Drupal, WordPress, etc need PHP and a database to run."
|
||||||
|
TextAnnotation "Difficult for new Developers."
|
||||||
|
TextAnnotation "Complex for personal projects."
|
||||||
|
TextAnnotation "Hosting can be expensive."
|
||||||
|
|
||||||
|
.. image:: images/sculpin.png
|
||||||
|
:width: 10cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Sculpin - a static site generator written in PHP."
|
||||||
|
TextAnnotation "Not a Sculpin vs. x talk, but I'll make comparisons and comments based on my own experience."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
What is a static website?
|
||||||
|
=========================
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
.htaccess
|
||||||
|
assets/images/od-logo.jpg
|
||||||
|
bco/index.html
|
||||||
|
build/tailwind.css
|
||||||
|
call/index.html
|
||||||
|
daily/2024/03/18/automated-drupal-11-compatibility-fixes/index.html
|
||||||
|
drupal-upgrade/index.html
|
||||||
|
favicon.ico
|
||||||
|
index.html
|
||||||
|
podcast/19-sam-mortenson/index.html
|
||||||
|
pricing/index.html
|
||||||
|
talks/taking-flight-with-tailwind-css/index.html
|
||||||
|
talks/tdd-test-driven-drupal/index.html
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Before I talk about static site generators, let's talk about static websites."
|
||||||
|
TextAnnotation "Some of the files from my website."
|
||||||
|
TextAnnotation "HTML, CSS, JS. No PHP or server-side code."
|
||||||
|
TextAnnotation "How I started building websites."
|
||||||
|
TextAnnotation "The things you usually have a CMS or framework generate."
|
||||||
|
|
||||||
|
What is Sculpin?
|
||||||
|
================
|
||||||
|
|
||||||
|
* Static site generator.
|
||||||
|
* Developed by Beau Simensen.
|
||||||
|
* Maintained by Kevin Boyd (beryllium).
|
||||||
|
* CLI tool.
|
||||||
|
* Built on Symfony components.
|
||||||
|
* Markdown + Twig = Static HTML.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Uses various Symfony components - Console, config, DI, Filesystem, Finder, HttpKernel, YAML."
|
||||||
|
TextAnnotation "Uses Twig - Symfony's templating language."
|
||||||
|
TextAnnotation ""
|
||||||
|
TextAnnotation "Transforms markdown files and Twig templates into static HTML websites, 'generates' a static website that can easily be deployed."
|
||||||
|
|
||||||
|
Why use a static site generator?
|
||||||
|
================================
|
||||||
|
|
||||||
|
- Rapid development.
|
||||||
|
- Templating.
|
||||||
|
- Security.
|
||||||
|
- Performance.
|
||||||
|
- Easy and cheap to host.
|
||||||
|
- Fun vs. work.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Leveraging templating features, such as conditionals, loops, partials and includes, template inheritance."
|
||||||
|
TextAnnotation "Static websites are fast and secure as they don't have a database and only need a simple hosting environment with a basic web server."
|
||||||
|
TextAnnotation "Works with a simple Apache, Nginx or Caddy server, or with services like Vercel and Netlify."
|
||||||
|
|
||||||
|
What do I use it for?
|
||||||
|
=====================
|
||||||
|
|
||||||
|
* My personal website.
|
||||||
|
* Some client websites.
|
||||||
|
* HTML prototypes and testing.
|
||||||
|
* Learning YAML and Twig (and some Symfony).
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
``composer require sculpin/sculpin``
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
``composer create-project sculpin/blog-skeleton my-blog``
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
``composer create-project opdavies/sculpin-skeleton my-site``
|
||||||
|
|
||||||
|
Using Sculpin
|
||||||
|
=============
|
||||||
|
|
||||||
|
* Configuration in ``app/config``
|
||||||
|
* Source files in ``source``.
|
||||||
|
|
||||||
|
* Templates in ``source/_templates`` or ``source/_layouts``.
|
||||||
|
* Includes in ``source/_includes`` or ``source/_partials``.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
:include: ./code/project-structure.txt
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "The file structure of a Sculpin project."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/project-structure.txt
|
||||||
|
:hl_lines: 5,6,13
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "PHP-based project."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/project-structure.txt
|
||||||
|
:hl_lines: 1,2,3,4
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Configuration."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
:include: ./code/project-structure.txt
|
||||||
|
:hl_lines: 9,10,11,12
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Source files."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/project-structure.txt
|
||||||
|
:hl_lines: 7,8
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Output directories with generated files."
|
||||||
|
|
||||||
|
Generate a site
|
||||||
|
===============
|
||||||
|
|
||||||
|
* ``vendor/bin/sculpin generate``
|
||||||
|
* ``--server``
|
||||||
|
* ``--watch``
|
||||||
|
* ``--env``
|
||||||
|
|
||||||
|
source/index.md
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
:include: code/index.md.txt
|
||||||
|
|
||||||
|
|
||||||
|
source/index.md
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: code/index.md.txt
|
||||||
|
:hl_lines: 1,2,3,4
|
||||||
|
|
||||||
|
source/index.md
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: code/index.md.txt
|
||||||
|
:hl_lines: 2
|
||||||
|
|
||||||
|
source/index.md
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: code/index.md.txt
|
||||||
|
:hl_lines: 3
|
||||||
|
|
||||||
|
source/index.md
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: code/index.md.txt
|
||||||
|
:hl_lines: 6
|
||||||
|
|
||||||
|
output_dev/index.html
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. code-block:: html
|
||||||
|
:include: ./code/index.html.txt
|
||||||
|
|
||||||
|
output_dev/index.html
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. code-block:: html
|
||||||
|
:include: ./code/index.html.txt
|
||||||
|
:hl_lines: 4
|
||||||
|
|
||||||
|
output_dev/index.html
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. code-block:: html
|
||||||
|
:include: ./code/index.html.txt
|
||||||
|
:hl_lines: 7
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
- Stored in ``app/config``
|
||||||
|
|
||||||
|
- ``sculpin_site.yml``
|
||||||
|
- ``sculpin_site_{env}.yml``
|
||||||
|
|
||||||
|
- Key-value pairs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: code/configuration.txt
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: html
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{{ site.name }}</title>
|
||||||
|
</head>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
YAML front matter
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/front-matter1.txt
|
||||||
|
|
||||||
|
YAML front matter
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/front-matter1.txt
|
||||||
|
:hl_lines: 2
|
||||||
|
|
||||||
|
YAML front matter
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/front-matter1.txt
|
||||||
|
:hl_lines: 3
|
||||||
|
|
||||||
|
YAML front matter
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/front-matter1.txt
|
||||||
|
:hl_lines: 4
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Draft pages aren't generated when env=prod".
|
||||||
|
|
||||||
|
More front matter
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:hl_lines: 5,6,7,8
|
||||||
|
|
||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: New blog post
|
||||||
|
draft: yes
|
||||||
|
tags:
|
||||||
|
- drupal
|
||||||
|
- php
|
||||||
|
- sculpin
|
||||||
|
---
|
||||||
|
|
||||||
|
Even more front matter
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:hl_lines: 9,10
|
||||||
|
|
||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: New blog post
|
||||||
|
draft: yes
|
||||||
|
tags:
|
||||||
|
- drupal
|
||||||
|
- php
|
||||||
|
- sculpin
|
||||||
|
tweets: yes
|
||||||
|
foo: bar
|
||||||
|
---
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/front-matter-on-pages.txt
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/front-matter-on-pages.txt
|
||||||
|
:hl_lines: 3
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/front-matter-on-pages.txt
|
||||||
|
:hl_lines: 4,5,6
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/front-matter-on-pages.txt
|
||||||
|
:hl_lines: 9,12
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/front-matter-on-pages.txt
|
||||||
|
:hl_lines: 10
|
||||||
|
|
||||||
|
Using on pages
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:include: ./code/front-matter-on-pages.txt
|
||||||
|
:hl_lines: 11
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "`page.` instead of `site.`."
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-base.txt
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-base.txt
|
||||||
|
:hl_lines: 4,6
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-base.txt
|
||||||
|
:hl_lines: 9
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-page.txt
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-page.txt
|
||||||
|
:hl_lines: 3
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-page.txt
|
||||||
|
:hl_lines: 5,7
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/layout-page.txt
|
||||||
|
:hl_lines: 6
|
||||||
|
|
||||||
|
Includes
|
||||||
|
========
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
|
||||||
|
{% include 'about-author' with {
|
||||||
|
avatar: site.avatar,
|
||||||
|
work: site.work,
|
||||||
|
} only %}
|
||||||
|
|
||||||
|
{% for link in links %}
|
||||||
|
{% include 'menu-link' with { link } only %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
Content types
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# app/config/sculpin_kernel.yml
|
||||||
|
|
||||||
|
sculpin_content_types:
|
||||||
|
daily_emails:
|
||||||
|
permalink: daily/:slug_title/
|
||||||
|
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "A way to segregate content into different types - e.g. pages, talks, daily emails. Something that was familiar from working with Drupal."
|
||||||
|
|
||||||
|
Accessing custom content types
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/content-types.txt
|
||||||
|
|
||||||
|
Accessing custom content types
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/content-types.txt
|
||||||
|
:hl_lines: 4,5
|
||||||
|
|
||||||
|
Accessing custom content types
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:include: ./code/content-types.txt
|
||||||
|
:hl_lines: 8,9,10
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak titlePage
|
||||||
|
|
||||||
|
.. class:: centredtitle
|
||||||
|
|
||||||
|
Making things more dynamic
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-1.txt
|
||||||
|
:hl_lines: 1
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "'today' as a string."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-1.txt
|
||||||
|
:hl_lines: 3
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Current date as a string."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-1.txt
|
||||||
|
:hl_lines: 5
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Current year."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-1.txt
|
||||||
|
:hl_lines: 7
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
|
||||||
|
---
|
||||||
|
title: Daily Email Archive
|
||||||
|
use: [daily_emails]
|
||||||
|
---
|
||||||
|
|
||||||
|
This is an archive of the {{ data.daily_emails|length }}
|
||||||
|
email messages I have sent to my daily email list
|
||||||
|
since the 12th of August, 2022.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
||||||
|
This is an archive of the 775 email messages I have sent to my daily email list since the 12th of August, 2022.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Get the emails via their content type and use the `length` filter to get the number of emails."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:end-before: // end yaml
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:start-after: // start twig
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:start-after: // start twig
|
||||||
|
:hl_lines: 1
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:hl_lines: 3,7
|
||||||
|
:start-after: // start twig
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Get each talk from the talk content type."
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:start-after: // start twig
|
||||||
|
:hl_lines: 4,6
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:start-after: // start twig
|
||||||
|
:hl_lines: 5
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: twig
|
||||||
|
:include: ./code/twig-2.txt
|
||||||
|
:start-after: // start twig
|
||||||
|
:hl_lines: 9
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
:hl_lines: 1,3,15
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
:hl_lines: 5
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
:hl_lines: 9,11
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
:hl_lines: 10
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak titlePage
|
||||||
|
|
||||||
|
.. class:: centredtitle
|
||||||
|
|
||||||
|
Demo
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
Extending Sculpin
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# app/config/sculpin_kernel.yml
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
services:
|
||||||
|
App\TwigExtension\TalkExtension:
|
||||||
|
tags:
|
||||||
|
- { name: twig.extension }
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak imagePage
|
||||||
|
|
||||||
|
.. image:: images/packagist.png
|
||||||
|
:width: 22cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
:startinline: true
|
||||||
|
|
||||||
|
// app/SculpinKernel.php
|
||||||
|
|
||||||
|
use Opdavies\Sculpin\Bundle\TwigMarkdownBundle\SculpinTwigMarkdownBundle;
|
||||||
|
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
|
||||||
|
|
||||||
|
final class SculpinKernel extends AbstractKernel
|
||||||
|
{
|
||||||
|
protected function getAdditionalSculpinBundles(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
SculpinTwigMarkdownBundle::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Thanks!
|
||||||
|
=======
|
||||||
|
|
||||||
|
References:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
* https://sculpin.io
|
||||||
|
* https://github.com/sculpin/sculpin
|
||||||
|
* https://code.oliverdavies.uk/opdavies/sculpin-demo
|
||||||
|
* https://code.oliverdavies.uk/opdavies/oliverdavies.uk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
Me:
|
||||||
|
|
||||||
|
* https://www.oliverdavies.uk
|
||||||
|
* ``@opdavies@mastodon.social``
|
0
communities-and-contribution/code/.keep
Normal file
BIN
communities-and-contribution/images/bg-dark.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
communities-and-contribution/images/drupal-core1.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
communities-and-contribution/images/drupal-core2.png
Normal file
After Width: | Height: | Size: 383 KiB |
BIN
communities-and-contribution/images/drupalcon-barcelona.jpeg
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
communities-and-contribution/images/drupalcon-los-angeles.jpeg
Normal file
After Width: | Height: | Size: 2 MiB |
BIN
communities-and-contribution/images/drupalcon-prague.jpeg
Normal file
After Width: | Height: | Size: 4.6 MiB |
BIN
communities-and-contribution/images/forum-post.png
Normal file
After Width: | Height: | Size: 169 KiB |
BIN
communities-and-contribution/images/gabor.png
Normal file
After Width: | Height: | Size: 248 KiB |
BIN
communities-and-contribution/images/linux-journal1.png
Normal file
After Width: | Height: | Size: 383 KiB |
BIN
communities-and-contribution/images/linux-journal2.png
Normal file
After Width: | Height: | Size: 266 KiB |
After Width: | Height: | Size: 216 KiB |
BIN
communities-and-contribution/images/timmillwood-ono.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
communities-and-contribution/images/unified-diff.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
0
communities-and-contribution/sections/.keep
Normal file
212
communities-and-contribution/slides.rst
Normal file
|
@ -0,0 +1,212 @@
|
||||||
|
.. footer::
|
||||||
|
|
||||||
|
@opdavies
|
||||||
|
|
||||||
|
Communities and Contribution
|
||||||
|
############################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. class:: titleslideinfo
|
||||||
|
|
||||||
|
Oliver Davies (@opdavies)
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
About Me
|
||||||
|
========
|
||||||
|
|
||||||
|
* Self-taught software developer (started in 2007).
|
||||||
|
* Full Stack Software Consultant.
|
||||||
|
* Web Development Manager at Transport for Wales.
|
||||||
|
* PHP and Drupal specialist.
|
||||||
|
* Open-source software maintainer and contributor.
|
||||||
|
* Meetup and conference organiser.
|
||||||
|
* School of Code mentor (BC14 and BC15).
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "I'm a self-saught Software Developer. I started learning in 2007 and went full-time in 2010."
|
||||||
|
TextAnnotation "Started at Transport for Wales as Lead Software Developer and I'm currently the Web Development Manager."
|
||||||
|
TextAnnotation "T-shaped Developer."
|
||||||
|
TextAnnotation "Used to organise Drupal and PHP meetups, DrupalCamp Bristol and I've been on the speaker selection committee for DrupalCon."
|
||||||
|
|
||||||
|
How I Started
|
||||||
|
=============
|
||||||
|
|
||||||
|
* Built a website for a Tae Kwon-Do school (HTML and CSS) in 2007.
|
||||||
|
* Learning from online resources like blogs, forums, YouTube, Lynda.com and Total Training.
|
||||||
|
* Learned more as the project developed, including PHP.
|
||||||
|
* Introduced to Drupal in an answer to a forum post.
|
||||||
|
* Started some freelance work and went full-time in 2010.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "This became my playground project."
|
||||||
|
TextAnnotation "Started with HTML and CSS to build the first version and learned more as I needed to, e.g. adding a dynamic news section, instead of trying to learn everything upfront."
|
||||||
|
TextAnnotation ""
|
||||||
|
TextAnnotation "Getting time in the saddle and gaining experience."
|
||||||
|
|
||||||
|
PageBreak imagePage
|
||||||
|
|
||||||
|
.. image:: images/forum-post.png
|
||||||
|
:width: 20cm
|
||||||
|
|
||||||
|
.. image:: images/timmillwood-ono.png
|
||||||
|
:width: 22cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "A few years later, I took an opportunity to maintain a popular Drupal module."
|
||||||
|
|
||||||
|
.. image:: images/override-node-options-usage.png
|
||||||
|
:width: 26cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Used on just over 9,000 websites in April 2012."
|
||||||
|
TextAnnotation "Currently used on 36,000 active Drupal websites."
|
||||||
|
|
||||||
|
My first talk
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. image:: images/unified-diff.png
|
||||||
|
:width: 22cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "September 2012."
|
||||||
|
TextAnnotation "I've since given 92 talks at meetups and conferences, including this one."
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
Writing for Linux Journal
|
||||||
|
=========================
|
||||||
|
|
||||||
|
.. image:: images/linux-journal2.png
|
||||||
|
:height: 12cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "September 2012 as well?"
|
||||||
|
TextAnnotation "Writing an article for Linux Journal as part of their special Drupal edition."
|
||||||
|
|
||||||
|
Attending DrupalCon
|
||||||
|
===================
|
||||||
|
|
||||||
|
.. image:: images/drupalcon-prague.jpeg
|
||||||
|
:width: 18cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "DrupalCon Prague 2013."
|
||||||
|
TextAnnotation "1,800 attendees. ~2,000 for Europe and ~3,000 for U.S."
|
||||||
|
TextAnnotation "Spoken at DrupalCon in 2019 and 2020."
|
||||||
|
TextAnnotation "Worked for the Drupal Association as a Developer on Drupal.org."
|
||||||
|
|
||||||
|
Mentoring at DrupalCon
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. image:: images/drupalcon-barcelona.jpeg
|
||||||
|
:width: 18cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Mentoring new contributors at contribution days at DrupalCons."
|
||||||
|
TextAnnotation ""
|
||||||
|
TextAnnotation "I was interested in contributing but was asked to join as a mentor."
|
||||||
|
TextAnnotation "3-6 people per table, working on their first contributions to Drupal core."
|
||||||
|
|
||||||
|
Mentoring at DrupalCon
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. image:: images/drupalcon-los-angeles.jpeg
|
||||||
|
:width: 22cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Prague, Amsterdam, Los Angeles, Barcelona, Vienna, Amsterdam."
|
||||||
|
|
||||||
|
PageBreak imagePage
|
||||||
|
|
||||||
|
.. image:: images/gabor.png
|
||||||
|
:width: 24cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak standardPage
|
||||||
|
|
||||||
|
Contributing to Drupal core
|
||||||
|
===========================
|
||||||
|
|
||||||
|
.. image:: images/drupal-core1.png
|
||||||
|
:width: 22cm
|
||||||
|
|
||||||
|
.. image:: images/drupal-core2.png
|
||||||
|
:width: 22cm
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Later, I got my own commits to Drupal core."
|
||||||
|
TextAnnotation "First was a documentation fix, the second was adding a new function."
|
||||||
|
|
||||||
|
Communities
|
||||||
|
===========
|
||||||
|
|
||||||
|
* Drupal and PHP
|
||||||
|
* JavaScript
|
||||||
|
* Linux and DevOps
|
||||||
|
* Tailwind CSS
|
||||||
|
* Neovim
|
||||||
|
* Accessibility and security
|
||||||
|
* School of Code (students and mentors)
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "I found out about School of Code at a meetup!"
|
||||||
|
TextAnnotation "Communities exist online and offline with mailing lists, forums, Slack and Discord groups, in-person and remote meetups and conferences."
|
||||||
|
TextAnnotation "Communities and sub-communities e.g. PHP/Drupal, Linux/Nix."
|
||||||
|
TextAnnotation "Mini-communities such as rst2pdf."
|
||||||
|
|
||||||
|
Why?
|
||||||
|
====
|
||||||
|
|
||||||
|
* Paying it forward.
|
||||||
|
* Giving something back.
|
||||||
|
* Helping me and others learn.
|
||||||
|
* Developing a personal brand.
|
||||||
|
* Building and growing a network.
|
||||||
|
* Improving opportunities.
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "If I make money with free software, I can at least contribute back."
|
||||||
|
TextAnnotation "Helping others helps me, and helping others to learn helps me learn."
|
||||||
|
TextAnnotation "Developing 'soft/interpersonal skills'."
|
||||||
|
TextAnnotation "Better career and work opportunities."
|
||||||
|
|
||||||
|
Summary
|
||||||
|
=======
|
||||||
|
|
||||||
|
* Software is not just about code.
|
||||||
|
* Communities are great for getting experience, learning and networking.
|
||||||
|
* Open-source, public speaking, blogging, mentoring look good on a CV.
|
||||||
|
|
||||||
|
Thanks!
|
||||||
|
=======
|
||||||
|
|
||||||
|
References:
|
||||||
|
|
||||||
|
* https://www.oliverdavies.uk/talks
|
||||||
|
* https://www.drupal.org
|
||||||
|
* https://meetup.com
|
||||||
|
* https://www.phpconference.co.uk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
Me:
|
||||||
|
|
||||||
|
* https://www.oliverdavies.uk
|
||||||
|
* @opdavies
|
23
decoupling-drupal-vuejs/demo/blue-conf/README.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Blue Conf 2019
|
||||||
|
|
||||||
|
The code for my Blue Conf 2019 talk - [Decoupling Drupal with Vue.js](https://www.oliverdavies.uk/talks/decoupling-drupal-vuejs).
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Clone the repository
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/opdavies/blue-conf-2019
|
||||||
|
cd blue-conf-2019
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Follow the instructions for [setting up the Drupal back-end][drupal].
|
||||||
|
|
||||||
|
1. Follow the instructions for [setting up the Vue.js front-end][vuejs].
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
[Oliver Davies](https://www.oliverdavies.uk)
|
||||||
|
|
||||||
|
[drupal]: /docs/setting-up-drupal.md
|
||||||
|
[vuejs]: /docs/setting-up-vue-js.md
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Setting up the Back-End Drupal Application
|
||||||
|
|
||||||
|
The Drupal back-end for my Blue Conf 2019 talk - [Decoupling Drupal with Vue.js](https://www.oliverdavies.uk/talks/decoupling-drupal-vuejs). This was used alongside the Vue.js front-end application for viewing and submitting fictional talk proposals that were stored in Drupal.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
* [Docksal](https://docksal.io)
|
||||||
|
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (can be changed to use Docker natively)
|
||||||
|
|
||||||
|
## Setup instructions
|
||||||
|
|
||||||
|
1. Run `fin init` to initialise the project, including installing all of the Composer dependencies, installing Drupal and importing the original configuration and creating some test content.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd drupal
|
||||||
|
|
||||||
|
fin init
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Visit `http://blueconf.docksal` to view the Drupal website, or run `fin drush status` to ensure that everything is running.
|
||||||
|
|
||||||
|
1. Run `fin drush uli` to generate a one-time login link in order to access the site.
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Setting up the Front-End Vue.js Application
|
||||||
|
|
||||||
|
The Vue.js front-end for my Blue Conf 2019 talk - [Decoupling Drupal with Vue.js](https://www.oliverdavies.uk/talks/decoupling-drupal-vuejs). It is a [Vue CLI](https://cli.vuejs.org) application, and uses [Tailwind CSS](https://tailwindcss.com) for styling.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
* [npm](https://docs.npmjs.com/cli/npm)
|
||||||
|
* [yarn](https://yarnpkg.com) (optional)
|
||||||
|
|
||||||
|
## Setup instructions
|
||||||
|
|
||||||
|
1. Install the npm dependencies using either `npm` or `yarn`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd vuejs
|
||||||
|
|
||||||
|
# Using npm
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# Using yarn
|
||||||
|
yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Change the URL to the Drupal back-end if needed in `.env`.
|
||||||
|
|
||||||
|
1. Use `yarn serve` to start a local web server.
|
||||||
|
|
||||||
|
1. Visit the URL (usually `http://localhost:8080`) to view the front-end application.
|
1
decoupling-drupal-vuejs/demo/blue-conf/drupal/.docksal/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/docksal-local.*
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#: exec_target = cli
|
||||||
|
|
||||||
|
## Creates a phpunit.xml file and runs PHPUnit tests in Drupal 8
|
||||||
|
##
|
||||||
|
## Usage: fin phpunit <args>
|
||||||
|
##
|
||||||
|
## This first ensures that a `core/phpunit.xml` file exists, either by copying a
|
||||||
|
## stub from `.docksal/drupal/core/phpunit.xml` if that exists, or copying and
|
||||||
|
## renaming `core/phpunit.xml.dist`.
|
||||||
|
##
|
||||||
|
## If `core/phpunit.xml` exists, the phpunit command with then be run, appending
|
||||||
|
## any optional arguments such as the directory path (run `fin phpunit -h`) to
|
||||||
|
## see a full list of options.
|
||||||
|
|
||||||
|
DOCROOT_PATH="${PROJECT_ROOT}/${DOCROOT}"
|
||||||
|
DRUPAL_CORE_PATH="${DOCROOT_PATH}/core"
|
||||||
|
|
||||||
|
run_tests() {
|
||||||
|
${PROJECT_ROOT}/vendor/bin/phpunit -c ${DRUPAL_CORE_PATH} "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -e ${DRUPAL_CORE_PATH}/phpunit.xml ]; then
|
||||||
|
if [ -e "${PROJECT_ROOT}/.docksal/drupal/core/phpunit.xml" ]; then
|
||||||
|
echo "Copying ${PROJECT_ROOT}/.docksal/drupal/core/phpunit.xml to ${DRUPAL_CORE_PATH}/phpunit.xml"
|
||||||
|
cp "${PROJECT_ROOT}/.docksal/drupal/core/phpunit.xml" ${DRUPAL_CORE_PATH}/phpunit.xml
|
||||||
|
run_tests "$@"
|
||||||
|
else
|
||||||
|
echo "Copying phpunit.xml.dist to phpunit.xml."
|
||||||
|
echo "Please edit it's values as needed and re-run 'fin phpunit'."
|
||||||
|
cp ${DRUPAL_CORE_PATH}/phpunit.xml.dist ${DRUPAL_CORE_PATH}/phpunit.xml
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
run_tests "$@"
|
||||||
|
fi
|
|
@ -0,0 +1,67 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Opens SequelPro
|
||||||
|
##
|
||||||
|
## Usage: fin sequelpro
|
||||||
|
|
||||||
|
# Abort if anything fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
container_port=$(docker ps --all --filter 'label=com.docker.compose.service=db' --filter "label=com.docker.compose.project=${COMPOSE_PROJECT_NAME}" --format '{{.Ports}}' | sed 's/.*0.0.0.0://g'|sed 's/->.*//g')
|
||||||
|
HOST=${VIRTUAL_HOST}
|
||||||
|
DB=${MYSQL_DATABASE:-default}
|
||||||
|
USER=${MYSQL_USER:-user}
|
||||||
|
PASS=${MYSQL_PASSWORD:-user}
|
||||||
|
NAME=${COMPOSE_PROJECT_NAME}
|
||||||
|
|
||||||
|
PORT=${PORT:-$container_port}
|
||||||
|
|
||||||
|
FILENAME=/tmp/docksal-sequelpro-${RANDOM}.spf
|
||||||
|
cat <<EOT >> $FILENAME
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>ContentFilters</key>
|
||||||
|
<dict/>
|
||||||
|
<key>auto_connect</key>
|
||||||
|
<true/>
|
||||||
|
<key>data</key>
|
||||||
|
<dict>
|
||||||
|
<key>connection</key>
|
||||||
|
<dict>
|
||||||
|
<key>database</key>
|
||||||
|
<string>${DB}</string>
|
||||||
|
<key>host</key>
|
||||||
|
<string>${HOST}</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>${NAME}</string>
|
||||||
|
<key>user</key>
|
||||||
|
<string>${USER}</string>
|
||||||
|
<key>password</key>
|
||||||
|
<string>${PASS}</string>
|
||||||
|
<key>port</key>
|
||||||
|
<integer>${PORT}</integer>
|
||||||
|
<key>rdbms_type</key>
|
||||||
|
<string>mysql</string>
|
||||||
|
</dict>
|
||||||
|
<key>session</key>
|
||||||
|
<dict/>
|
||||||
|
</dict>
|
||||||
|
<key>encrypted</key>
|
||||||
|
<false/>
|
||||||
|
<key>format</key>
|
||||||
|
<string>connection</string>
|
||||||
|
<key>queryFavorites</key>
|
||||||
|
<array/>
|
||||||
|
<key>queryHistory</key>
|
||||||
|
<array/>
|
||||||
|
<key>rdbms_type</key>
|
||||||
|
<string>mysql</string>
|
||||||
|
<key>version</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
EOT
|
||||||
|
|
||||||
|
open $FILENAME
|
49
decoupling-drupal-vuejs/demo/blue-conf/drupal/.docksal/addons/uli/uli
Executable file
|
@ -0,0 +1,49 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
die ()
|
||||||
|
{
|
||||||
|
echo "$1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
## Generate one time user login link. Add -s to use https in url.
|
||||||
|
## Usage fin uli @drushalias -s
|
||||||
|
## The drush alias and -s flags are optional.
|
||||||
|
|
||||||
|
cd "$PROJECT_ROOT/$DOCROOT" || die "Could not change dir to $PROJECT_ROOT/$DOCROOT"
|
||||||
|
|
||||||
|
https=0 # Default to not use https
|
||||||
|
|
||||||
|
# Check the first two options / arguments given on the the command line for
|
||||||
|
# what looks like a Drush site alias or the -s option to use https in the url.
|
||||||
|
count=2
|
||||||
|
while [ $count -ne 0 ]; do
|
||||||
|
if [[ $1 == @* ]]; then
|
||||||
|
drushalias=$1
|
||||||
|
shift 1
|
||||||
|
elif [[ $1 == "-s" ]]; then
|
||||||
|
https=1
|
||||||
|
shift 1
|
||||||
|
fi
|
||||||
|
count=$[$count-1]
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $https -eq 0 ]; then
|
||||||
|
uli=$(fin drush $drushalias uli "$@" 2>&1 | sed "s/default/$VIRTUAL_HOST/")
|
||||||
|
elif [ $https -eq 1 ]; then
|
||||||
|
uli=$(fin drush $drushalias uli "$@" 2>&1 | sed "s/default/$VIRTUAL_HOST/" | sed "s/http\:/https:/")
|
||||||
|
else
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
echo "$uli"
|
||||||
|
[[ "$uli" == *"Error"* ]] && exit 1
|
||||||
|
|
||||||
|
# Mac OSX copy uli to clipboard with pbcopy
|
||||||
|
( which pbcopy >/dev/null 2>&1 ) &&
|
||||||
|
echo "$uli" | pbcopy &&
|
||||||
|
echo "[+] Copied to clipboard"
|
||||||
|
|
||||||
|
# Linux copy uli to both the selection buffer and clipboard with xclip.
|
||||||
|
( which xclip >/dev/null 2>&1 ) &&
|
||||||
|
echo "$uli" | xclip -i -sel c -f |xclip -i -sel p &&
|
||||||
|
echo "[+] Copied to clipboard and selection buffer"
|
37
decoupling-drupal-vuejs/demo/blue-conf/drupal/.docksal/commands/init
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Initialize stack and site (full reset)
|
||||||
|
##
|
||||||
|
## Usage: fin init
|
||||||
|
|
||||||
|
# Abort if anything fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#-------------------------- Helper functions --------------------------------
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
red='\033[0;31m'
|
||||||
|
green='\033[0;32m'
|
||||||
|
green_bg='\033[1;97;42m'
|
||||||
|
yellow='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo-red () { echo -e "${red}$1${NC}"; }
|
||||||
|
echo-green () { echo -e "${green}$1${NC}"; }
|
||||||
|
echo-green-bg () { echo -e "${green_bg}$1${NC}"; }
|
||||||
|
echo-yellow () { echo -e "${yellow}$1${NC}"; }
|
||||||
|
|
||||||
|
#-------------------------- Execution --------------------------------
|
||||||
|
|
||||||
|
# Stack initialization
|
||||||
|
echo -e "${green_bg} Step 1 ${NC}${green} Initializing stack...${NC}"
|
||||||
|
fin project reset -f
|
||||||
|
|
||||||
|
# Site initialization
|
||||||
|
echo -e "${green_bg} Step 2 ${NC}${green} Initializing site...${NC}"
|
||||||
|
# This runs inside cli using http://docs.docksal.io/en/v1.4.0/fin/custom-commands/#executing-commands-inside-cli
|
||||||
|
fin init-site
|
||||||
|
|
||||||
|
echo -e "${green_bg} DONE! ${NC}${green} Completed all initialization steps.${NC}"
|
||||||
|
|
||||||
|
#-------------------------- END: Execution --------------------------------
|
85
decoupling-drupal-vuejs/demo/blue-conf/drupal/.docksal/commands/init-site
Executable file
|
@ -0,0 +1,85 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#: exec_target = cli
|
||||||
|
|
||||||
|
## Initialize/reinstall site
|
||||||
|
##
|
||||||
|
## Usage: fin init-site
|
||||||
|
|
||||||
|
# Abort if anything fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#-------------------------- Helper functions --------------------------------
|
||||||
|
|
||||||
|
copy_settings_file() {
|
||||||
|
local source="$1"
|
||||||
|
local dest="$2"
|
||||||
|
|
||||||
|
echo "Copying ${dest}..."
|
||||||
|
cp $source $dest
|
||||||
|
}
|
||||||
|
|
||||||
|
composer_install() {
|
||||||
|
echo "Installing Composer dependencies..."
|
||||||
|
composer install
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------- END: Helper functions --------------------------------
|
||||||
|
|
||||||
|
#-------------------------- END: Functions --------------------------------
|
||||||
|
|
||||||
|
init_settings() {
|
||||||
|
copy_settings_file ../files/settings.php ../../web/sites/default
|
||||||
|
}
|
||||||
|
|
||||||
|
site_install() {
|
||||||
|
composer_install
|
||||||
|
|
||||||
|
echo "Installing Drupal..."
|
||||||
|
drush site:install -y
|
||||||
|
}
|
||||||
|
|
||||||
|
import_config() {
|
||||||
|
drush config:set -y system.site uuid de7ba5dc-5795-4cb5-9d38-1edcc27be491
|
||||||
|
|
||||||
|
drush config:delete -y shortcut.set.default uuid
|
||||||
|
|
||||||
|
echo "Importing configuration..."
|
||||||
|
drush config:import -y --source=../config/sync
|
||||||
|
}
|
||||||
|
|
||||||
|
import_content() {
|
||||||
|
echo "Importing speakers from CSV..."
|
||||||
|
drush php:eval '\Drupal::service("Drupal\dtc_import\Service\Importer\CsvSpeakerImporter")->import()'
|
||||||
|
|
||||||
|
echo "Importing sessions from CSV..."
|
||||||
|
drush php:eval '\Drupal::service("Drupal\dtc_import\Service\Importer\CsvSessionImporter")->import()'
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_users() {
|
||||||
|
echo "Creating the API user..."
|
||||||
|
drush user:create api --password=api
|
||||||
|
drush user:role:add api_user api
|
||||||
|
|
||||||
|
echo "Resetting uuid for the admin user..."
|
||||||
|
drush sql:query "UPDATE users SET uuid = '11dad4c2-baa8-4fb2-97c6-12e1ce925806' WHERE uid = 1"
|
||||||
|
|
||||||
|
echo "Resetting uuid for the API user..."
|
||||||
|
drush sql:query "UPDATE users SET uuid = '63936126-87cd-4166-9cb4-63b61a210632' WHERE uid = 7"
|
||||||
|
|
||||||
|
echo "Rebuilding cache..."
|
||||||
|
drush cache:rebuild
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------- END: Functions --------------------------------
|
||||||
|
|
||||||
|
#-------------------------- Execution --------------------------------
|
||||||
|
|
||||||
|
site_install
|
||||||
|
import_config
|
||||||
|
import_content
|
||||||
|
setup_users
|
||||||
|
|
||||||
|
echo -e "Open ${yellow}http://${VIRTUAL_HOST}${NC} in your browser to verify the setup."
|
||||||
|
|
||||||
|
#-------------------------- END: Execution --------------------------------
|
|
@ -0,0 +1,6 @@
|
||||||
|
COMPOSE_PROJECT_NAME="blueconf"
|
||||||
|
DOCKSAL_STACK=default
|
||||||
|
DOCROOT="web"
|
||||||
|
MYSQL_DATABASE=default
|
||||||
|
MYSQL_PASSWORD=user
|
||||||
|
MYSQL_USER=user
|
|
@ -0,0 +1,8 @@
|
||||||
|
version: "2.1"
|
||||||
|
services:
|
||||||
|
cli:
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE
|
||||||
|
- MYSQL_PASSWORD
|
||||||
|
- MYSQL_USER
|
||||||
|
|
17
decoupling-drupal-vuejs/demo/blue-conf/drupal/.editorconfig
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Drupal editor configuration normalization
|
||||||
|
# @see http://editorconfig.org/
|
||||||
|
|
||||||
|
# This is the top-most .editorconfig file; do not search in parent directories.
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# All files.
|
||||||
|
[*]
|
||||||
|
end_of_line = LF
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[composer.{json,lock}]
|
||||||
|
indent_size = 4
|
27
decoupling-drupal-vuejs/demo/blue-conf/drupal/.env.example
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#
|
||||||
|
# Copy and rename this file to .env at root of this project.
|
||||||
|
#
|
||||||
|
|
||||||
|
# A common use case is to supply database creds via the environment. Edit settings.php
|
||||||
|
# like so:
|
||||||
|
#
|
||||||
|
# $databases['default']['default'] = [
|
||||||
|
# 'database' => getenv('MYSQL_DATABASE'),
|
||||||
|
# 'driver' => 'mysql',
|
||||||
|
# 'host' => getenv('MYSQL_HOSTNAME'),
|
||||||
|
# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
|
||||||
|
# 'password' => getenv('MYSQL_PASSWORD'),
|
||||||
|
# 'port' => getenv('MYSQL_PORT'),
|
||||||
|
# 'prefix' => '',
|
||||||
|
# 'username' => getenv('MYSQL_USER'),
|
||||||
|
# ];
|
||||||
|
#
|
||||||
|
# Uncomment and populate as needed.
|
||||||
|
# MYSQL_DATABASE=
|
||||||
|
# MYSQL_HOSTNAME=
|
||||||
|
# MYSQL_PASSWORD=
|
||||||
|
# MYSQL_PORT=
|
||||||
|
# MYSQL_USER=
|
||||||
|
|
||||||
|
# Another common use case is to set Drush's --uri via environment.
|
||||||
|
# DRUSH_OPTIONS_URI=http://example.com
|
61
decoupling-drupal-vuejs/demo/blue-conf/drupal/.gitattributes
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# Drupal git normalization
|
||||||
|
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
|
||||||
|
# @see https://www.drupal.org/node/1542048
|
||||||
|
|
||||||
|
# Normally these settings would be done with macro attributes for improved
|
||||||
|
# readability and easier maintenance. However macros can only be defined at the
|
||||||
|
# repository root directory. Drupal avoids making any assumptions about where it
|
||||||
|
# is installed.
|
||||||
|
|
||||||
|
# Define text file attributes.
|
||||||
|
# - Treat them as text.
|
||||||
|
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
|
||||||
|
# - Detect whitespace errors.
|
||||||
|
# - Exposed by default in `git diff --color` on the CLI.
|
||||||
|
# - Validate with `git diff --check`.
|
||||||
|
# - Deny applying with `git apply --whitespace=error-all`.
|
||||||
|
# - Fix automatically with `git apply --whitespace=fix`.
|
||||||
|
|
||||||
|
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
|
||||||
|
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||||
|
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||||
|
|
||||||
|
# Define binary file attributes.
|
||||||
|
# - Do not treat them as text.
|
||||||
|
# - Include binary diff in patches instead of "binary files differ."
|
||||||
|
*.eot -text diff
|
||||||
|
*.exe -text diff
|
||||||
|
*.gif -text diff
|
||||||
|
*.gz -text diff
|
||||||
|
*.ico -text diff
|
||||||
|
*.jpeg -text diff
|
||||||
|
*.jpg -text diff
|
||||||
|
*.otf -text diff
|
||||||
|
*.phar -text diff
|
||||||
|
*.png -text diff
|
||||||
|
*.svgz -text diff
|
||||||
|
*.ttf -text diff
|
||||||
|
*.woff -text diff
|
||||||
|
*.woff2 -text diff
|
42
decoupling-drupal-vuejs/demo/blue-conf/drupal/.gitignore
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# Ignore directories generated by Composer
|
||||||
|
/drush/contrib/
|
||||||
|
/vendor/
|
||||||
|
/web/core/
|
||||||
|
/web/modules/contrib/
|
||||||
|
/web/themes/contrib/
|
||||||
|
/web/profiles/contrib/
|
||||||
|
/web/libraries/
|
||||||
|
|
||||||
|
# Ignore sensitive information
|
||||||
|
/web/sites/*/settings.php
|
||||||
|
/web/sites/*/settings.local.php
|
||||||
|
|
||||||
|
# Ignore Drupal's file directory
|
||||||
|
/web/sites/*/files/
|
||||||
|
|
||||||
|
# Ignore SimpleTest multi-site environment.
|
||||||
|
/web/sites/simpletest
|
||||||
|
|
||||||
|
# Ignore files generated by PhpStorm
|
||||||
|
/.idea/
|
||||||
|
|
||||||
|
# Ignore .env files as they are personal
|
||||||
|
/.env
|
||||||
|
|
||||||
|
# Ignore Drupal Scaffold files
|
||||||
|
/web/.csslintrc
|
||||||
|
/web/.editorconfig
|
||||||
|
/web/.eslintignore
|
||||||
|
/web/.eslintrc.json
|
||||||
|
/web/.gitattributes
|
||||||
|
/web/.ht.router.php
|
||||||
|
/web/.htaccess
|
||||||
|
/web/index.php
|
||||||
|
/web/robots.txt
|
||||||
|
/web/sites/default/default.settings.php
|
||||||
|
/web/sites/default/default.services.yml
|
||||||
|
/web/sites/development.services.yml
|
||||||
|
/web/sites/example.settings.local.php
|
||||||
|
/web/sites/example.sites.php
|
||||||
|
/web/update.php
|
||||||
|
/web/web.config
|
33
decoupling-drupal-vuejs/demo/blue-conf/drupal/.gitlab-ci.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
test:
|
||||||
|
image: php:7.2
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- vendor/
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- apt-get update -yqq
|
||||||
|
- apt-get install git wget unzip zip -yqq
|
||||||
|
|
||||||
|
# Add additonal extensions that are required by Drupal.
|
||||||
|
- apt-get install libpng-dev -y
|
||||||
|
- docker-php-ext-install gd
|
||||||
|
|
||||||
|
# Install Composer.
|
||||||
|
- wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
|
||||||
|
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
|
- php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||||
|
- php composer-setup.php
|
||||||
|
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
|
||||||
|
- php composer.phar install
|
||||||
|
|
||||||
|
# Start a server for web tests.
|
||||||
|
- php -S localhost:9000 -t web 2>&1 &
|
||||||
|
|
||||||
|
variables:
|
||||||
|
SIMPLETEST_BASE_URL: http://localhost:9000
|
||||||
|
SIMPLETEST_DB: 'sqlite://localhost:9000//tmp/test.sqlite'
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd web
|
||||||
|
- ../vendor/bin/phpunit -c core modules/custom
|
51
decoupling-drupal-vuejs/demo/blue-conf/drupal/.travis.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
language: php
|
||||||
|
dist: trusty
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
php:
|
||||||
|
- 5.6
|
||||||
|
- 7.0
|
||||||
|
- 7.1
|
||||||
|
- 7.2
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
|
||||||
|
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
|
||||||
|
matrix:
|
||||||
|
- RELEASE=stable COMPOSER_CHANNEL=stable
|
||||||
|
- RELEASE=dev COMPOSER_CHANNEL=stable
|
||||||
|
- RELEASE=stable COMPOSER_CHANNEL=snapshot
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
exclude:
|
||||||
|
- php: 5.6
|
||||||
|
env: RELEASE=dev COMPOSER_CHANNEL=stable
|
||||||
|
- php: 5.6
|
||||||
|
env: RELEASE=stable COMPOSER_CHANNEL=snapshot
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then export COMPOSER_MEMORY_LIMIT=-1; fi;
|
||||||
|
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||||
|
- phpenv config-rm xdebug.ini
|
||||||
|
- composer --verbose self-update --$COMPOSER_CHANNEL
|
||||||
|
- composer --version
|
||||||
|
|
||||||
|
install:
|
||||||
|
- composer --verbose validate
|
||||||
|
- composer --verbose install
|
||||||
|
|
||||||
|
script:
|
||||||
|
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
|
||||||
|
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.7.x-dev webflo/drupal-core-require-dev:8.7.x-dev; fi;
|
||||||
|
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
|
||||||
|
- cd $TRAVIS_BUILD_DIR/web
|
||||||
|
- ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
|
||||||
|
- ./../vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
|
||||||
|
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
|
||||||
|
# Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json
|
||||||
|
# Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673
|
||||||
|
# Ignore Setup group temporarily, @see https://www.drupal.org/node/2962157
|
||||||
|
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache,Setup
|
||||||
|
- ./../vendor/bin/drush
|
||||||
|
- if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi;
|
339
decoupling-drupal-vuejs/demo/blue-conf/drupal/LICENSE
Normal file
|
@ -0,0 +1,339 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
{description}
|
||||||
|
Copyright (C) {year} {fullname}
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
{signature of Ty Coon}, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
88
decoupling-drupal-vuejs/demo/blue-conf/drupal/composer.json
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
"name": "opdavies/blue-conf-2019-drupal",
|
||||||
|
"description": "Project template for Drupal 8 projects with composer",
|
||||||
|
"type": "project",
|
||||||
|
"license": "GPL-2.0-or-later",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"role": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://packages.drupal.org/8"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1",
|
||||||
|
"composer/installers": "^1.2",
|
||||||
|
"cweagans/composer-patches": "^1.6.5",
|
||||||
|
"drupal-composer/drupal-scaffold": "^2.5",
|
||||||
|
"drupal/admin_toolbar": "^1.26",
|
||||||
|
"drupal/console": "^1.0.2",
|
||||||
|
"drupal/core": "^8.7.0",
|
||||||
|
"drush/drush": "^9.0.0",
|
||||||
|
"josephlavin/tap": "^1.0",
|
||||||
|
"tightenco/collect": "^6.2",
|
||||||
|
"vlucas/phpdotenv": "^2.4",
|
||||||
|
"webflo/drupal-finder": "^1.0.0",
|
||||||
|
"webmozart/path-util": "^2.3",
|
||||||
|
"zaporylie/composer-drupal-optimizations": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"webflo/drupal-core-require-dev": "^8.7.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"drupal/drupal": "*"
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"scripts/composer/ScriptHandler.php"
|
||||||
|
],
|
||||||
|
"files": ["load.environment.php"]
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
|
||||||
|
"pre-install-cmd": [
|
||||||
|
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
|
||||||
|
],
|
||||||
|
"pre-update-cmd": [
|
||||||
|
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
|
||||||
|
],
|
||||||
|
"post-install-cmd": [
|
||||||
|
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
|
||||||
|
"@drupal-scaffold"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
|
||||||
|
"@drupal-scaffold"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"composer-exit-on-patch-failure": true,
|
||||||
|
"patchLevel": {
|
||||||
|
"drupal/core": "-p2"
|
||||||
|
},
|
||||||
|
"installer-paths": {
|
||||||
|
"web/core": ["type:drupal-core"],
|
||||||
|
"web/libraries/{$name}": ["type:drupal-library"],
|
||||||
|
"web/modules/contrib/{$name}": ["type:drupal-module"],
|
||||||
|
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
|
||||||
|
"web/themes/contrib/{$name}": ["type:drupal-theme"],
|
||||||
|
"drush/Commands/{$name}": ["type:drupal-drush"]
|
||||||
|
},
|
||||||
|
"drupal-scaffold": {
|
||||||
|
"initial": {
|
||||||
|
".editorconfig": "../.editorconfig",
|
||||||
|
".gitattributes": "../.gitattributes"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8656
decoupling-drupal-vuejs/demo/blue-conf/drupal/composer.lock
generated
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Deny all requests from Apache 2.4+.
|
||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
Require all denied
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Deny all requests from Apache 2.0-2.2.
|
||||||
|
<IfModule !mod_authz_core.c>
|
||||||
|
Deny from all
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Turn off all options we don't need.
|
||||||
|
Options -Indexes -ExecCGI -Includes -MultiViews
|
||||||
|
|
||||||
|
# Set the catch-all handler to prevent scripts from being executed.
|
||||||
|
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
|
||||||
|
<Files *>
|
||||||
|
# Override the handler again if we're run later in the evaluation list.
|
||||||
|
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
# If we know how to do it safely, disable the PHP engine entirely.
|
||||||
|
<IfModule mod_php5.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
|
@ -0,0 +1 @@
|
||||||
|
This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync. For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config
|
|
@ -0,0 +1,3 @@
|
||||||
|
interval: 10800
|
||||||
|
_core:
|
||||||
|
default_config_hash: fUksROt4FfkAU9BV4hV2XvhTBSS2nTNrZS4U7S-tKrs
|
|
@ -0,0 +1,27 @@
|
||||||
|
uuid: 893e2320-dcd8-4cde-97f0-adfe0bb1688f
|
||||||
|
langcode: en
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
config:
|
||||||
|
- system.menu.account
|
||||||
|
module:
|
||||||
|
- system
|
||||||
|
theme:
|
||||||
|
- bartik
|
||||||
|
_core:
|
||||||
|
default_config_hash: 8a31Ywc1t2zlddGd3bmDrFMefWqgSK2E02ceFdr-bfc
|
||||||
|
id: bartik_account_menu
|
||||||
|
theme: bartik
|
||||||
|
region: secondary_menu
|
||||||
|
weight: 0
|
||||||
|
provider: null
|
||||||
|
plugin: 'system_menu_block:account'
|
||||||
|
settings:
|
||||||
|
id: 'system_menu_block:account'
|
||||||
|
label: 'User account menu'
|
||||||
|
provider: system
|
||||||
|
label_display: '0'
|
||||||
|
level: 1
|
||||||
|
depth: 1
|
||||||
|
expand_all_items: false
|
||||||
|
visibility: { }
|