Compare commits
657 Commits
dev
...
03e84836ca
| Author | SHA1 | Date | |
|---|---|---|---|
| 03e84836ca | |||
| b862ff9755 | |||
| 073d157231 | |||
| b31aa7550b | |||
| b258482ca3 | |||
| 010160ce46 | |||
| 3fee48d521 | |||
| a9d9ca717b | |||
| 5ed57ac818 | |||
| a665235b9f | |||
| 89ca57e44d | |||
| fb9d9fd091 | |||
| 60f17b420a | |||
| f5d8a0d9d1 | |||
| 02b4261ae8 | |||
| db5ea82536 | |||
| 7d393c4029 | |||
|
|
ccabec3b70 | ||
| 495d5737cd | |||
|
|
4251ccaac6 | ||
| 2a523ef76c | |||
| 7664dae54d | |||
|
|
ddf23d2c29 | ||
|
|
5ffb5636b2 | ||
|
|
3d87ce1f6a | ||
|
|
cf25bcd20f | ||
|
|
20d1d07c21 | ||
|
|
afbebbe816 | ||
|
|
9864d7cf36 | ||
|
|
da70c86f5e | ||
|
|
9ecea45705 | ||
|
|
86864166f9 | ||
|
|
c8a7dcdf05 | ||
|
|
b134d39172 | ||
|
|
194ab5af52 | ||
|
|
3012d2875c | ||
|
|
be72015657 | ||
|
|
5948da928d | ||
|
|
2f2d67fb7f | ||
|
|
8cc24bab95 | ||
|
|
24bb08f02e | ||
|
|
9ec39fb246 | ||
|
|
677d658ecb | ||
|
|
77eda834d4 | ||
|
|
57cf6ab817 | ||
|
|
f6385cd4a3 | ||
|
|
1e9790c37d | ||
|
|
0656c7ba68 | ||
|
|
8d81e1ba3e | ||
|
|
a3b9e82240 | ||
|
|
464e977d5a | ||
|
|
47a48480bd | ||
|
|
6012bf1886 | ||
|
|
04b2404e47 | ||
|
|
8c91368c4f | ||
|
|
a9fa2433a5 | ||
|
|
7d3bbd2122 | ||
|
|
487716a1ac | ||
|
|
723506daba | ||
|
|
8d5a1ac4f4 | ||
|
|
3f808812dd | ||
|
|
37e3773d88 | ||
|
|
2ff215a3df | ||
|
|
0755a90847 | ||
|
|
e5f46df7bc | ||
|
|
41e232bcdd | ||
|
|
713594d768 | ||
|
|
0957f59fcd | ||
|
|
9362ba6c26 | ||
|
|
fbb87394f3 | ||
|
|
89e5ebcd55 | ||
|
|
e7a87f09c5 | ||
|
|
25ef858d58 | ||
|
|
256128b0cc | ||
|
|
a969be597c | ||
|
|
a482791397 | ||
|
|
bc60adb1b5 | ||
|
|
b26907ad79 | ||
|
|
586da211df | ||
|
|
b81a59e682 | ||
|
|
33d0146a4c | ||
|
|
c437137134 | ||
|
|
93d9838cbd | ||
|
|
feebb7c94a | ||
|
|
d0733bfc01 | ||
|
|
6cd48fdd31 | ||
|
|
2204d6691c | ||
|
|
3bfd6c6c9d | ||
|
|
c85142272e | ||
|
|
d203a49bab | ||
|
|
c6a21c4611 | ||
|
|
a31f120492 | ||
|
|
f1b9646655 | ||
|
|
d58fcc7976 | ||
|
|
56a121182d | ||
|
|
5693139abc | ||
|
|
081782f05e | ||
|
|
308cc20859 | ||
|
|
a86946e39f | ||
|
|
3932435866 | ||
|
|
947831ac1c | ||
|
|
4ff19c77ca | ||
|
|
0fe7047fa3 | ||
|
|
f0c5224112 | ||
|
|
c6ff21662b | ||
|
|
68898723a1 | ||
|
|
2e17f81c5d | ||
|
|
0365fb2515 | ||
|
|
c841a02361 | ||
|
|
8bbc14e781 | ||
|
|
e5b06d37d9 | ||
|
|
c72f14c68d | ||
|
|
ad93e8b8c7 | ||
|
|
e27af6282b | ||
|
|
a3807c7e94 | ||
|
|
4301b2827a | ||
|
|
f44d6b8c72 | ||
|
|
bf4c7759ba | ||
|
|
eccb8ba90e | ||
|
|
cca3ffaed1 | ||
|
|
6bb5325f66 | ||
|
|
f57d9aab30 | ||
|
|
6f46605b83 | ||
|
|
5b07f46c2c | ||
|
|
94a1787838 | ||
|
|
5cd2c43847 | ||
|
|
66a39822ee | ||
|
|
3c07fae355 | ||
|
|
aa2d27699b | ||
|
|
b94e545e82 | ||
|
|
dd114a4798 | ||
|
|
588297f063 | ||
|
|
8109f7d039 | ||
|
|
f53aee2c1f | ||
|
|
4495474c9f | ||
|
|
2208c11c62 | ||
|
|
00691cbeac | ||
|
|
285a273030 | ||
|
|
be5281cdd1 | ||
|
|
be730d90df | ||
|
|
806993d4f9 | ||
|
|
14f2f9ade4 | ||
|
|
c6e9191686 | ||
|
|
3c366a8f3d | ||
|
|
b123a6bf58 | ||
|
|
b022da215c | ||
|
|
1bbd32b6ad | ||
|
|
c0d3dd87f7 | ||
|
|
3159cadabb | ||
|
|
27a63ecacd | ||
|
|
505c310d1f | ||
|
|
a2c29f4949 | ||
|
|
cc94b1bc47 | ||
|
|
102778abcf | ||
|
|
fe34ad86d0 | ||
|
|
46e0a8407a | ||
|
|
41c7f2c508 | ||
|
|
d6e6e21339 | ||
|
|
d1e1c8ea90 | ||
|
|
d22e3935cb | ||
|
|
e99867daca | ||
|
|
eb41bd8c63 | ||
|
|
40dedd67a5 | ||
|
|
7129b9b4df | ||
|
|
07f28076ca | ||
|
|
51d60f9c43 | ||
|
|
d5f5fbef27 | ||
|
|
03386f06ab | ||
|
|
523c99c4ec | ||
|
|
3b4b261e3e | ||
|
|
e0f9f7cd1c | ||
|
|
6f2b46dbae | ||
|
|
9aa9c00f0b | ||
|
|
353a60711d | ||
|
|
d644887612 | ||
|
|
7eb78a0789 | ||
|
|
cd5285864d | ||
|
|
4c9308983f | ||
|
|
8e310aeed6 | ||
|
|
b63f8773a6 | ||
|
|
d23fcfb5a4 | ||
|
|
fce1ab7da6 | ||
|
|
0f0fd6995a | ||
|
|
fe2885dd9e | ||
|
|
f4474ecb00 | ||
|
|
8865b86bef | ||
|
|
8a62486cdf | ||
|
|
009298f1c0 | ||
|
|
c7d5324d89 | ||
|
|
2aef9a2b40 | ||
|
|
fd72d7a21e | ||
|
|
3d767ac76b | ||
|
|
026e1e58c4 | ||
|
|
20f92ebe64 | ||
|
|
6235f2fc53 | ||
|
|
b0adc8b781 | ||
|
|
05be790280 | ||
|
|
634e1f3182 | ||
|
|
c326d50595 | ||
|
|
3d7dc7a128 | ||
|
|
2e05b35205 | ||
|
|
1b79a949c4 | ||
|
|
b063fa030d | ||
|
|
74bad62814 | ||
|
|
8e37498eaa | ||
|
|
a2bd26a4af | ||
|
|
fb8de9a301 | ||
|
|
972f4cd55c | ||
|
|
7332184315 | ||
|
|
5544c50bc6 | ||
|
|
dec43c4d37 | ||
|
|
7bafa7c89a | ||
|
|
7f45932ce1 | ||
|
|
15e81e5a7a | ||
|
|
034d18ed6a | ||
|
|
3540877dd0 | ||
|
|
46babd52df | ||
|
|
76efb28b63 | ||
|
|
bc73bebdf7 | ||
|
|
fd674fa18b | ||
|
|
9838a8e4c1 | ||
|
|
cce6f19292 | ||
|
|
108a7fd671 | ||
|
|
d488b670c0 | ||
|
|
8192a15e50 | ||
|
|
16d99623a9 | ||
|
|
8b0df45311 | ||
|
|
830ceaf3f2 | ||
|
|
b04dc3fae6 | ||
|
|
b73f3a8fdd | ||
|
|
d6f53f5e3c | ||
|
|
03921768f3 | ||
|
|
112bec8628 | ||
|
|
828e5709e9 | ||
|
|
0ccb907838 | ||
|
|
90a1680639 | ||
|
|
bd97fb26a8 | ||
|
|
a2e21df741 | ||
|
|
82ad056fae | ||
|
|
7abdb7490c | ||
|
|
a6f1c8c49f | ||
|
|
9eb1b7af41 | ||
|
|
ef6913f286 | ||
|
|
614d47f0d9 | ||
|
|
9df7a7ccb4 | ||
|
|
9e6d73fdca | ||
|
|
6b5789c05c | ||
|
|
019506d69a | ||
|
|
2dc6fe908b | ||
|
|
8035e1d49d | ||
|
|
12eb244d03 | ||
|
|
2494f6d73b | ||
|
|
2d05b855ca | ||
|
|
93ea049113 | ||
|
|
d76b6c93c2 | ||
|
|
74709f31e0 | ||
|
|
500b3e4c8b | ||
|
|
eb85b33f69 | ||
|
|
ed89b07f4c | ||
|
|
ffd3f94701 | ||
|
|
8f109a9261 | ||
|
|
260672b786 | ||
|
|
8b4031a029 | ||
|
|
cf2dc5430a | ||
|
|
7a89349347 | ||
|
|
f04d35f717 | ||
|
|
67805292e2 | ||
|
|
f297df0942 | ||
|
|
fc93185a7a | ||
|
|
5a95a6200c | ||
|
|
c51960bada | ||
|
|
42f4344a91 | ||
|
|
7900dd3748 | ||
|
|
52add4944d | ||
|
|
c630a224d0 | ||
|
|
cd1e3af50f | ||
|
|
0bd1f42982 | ||
|
|
9fad6e758d | ||
|
|
5c7587f8d6 | ||
|
|
7080c225a6 | ||
|
|
b1d291e63f | ||
|
|
9857121ed0 | ||
|
|
85366aeb06 | ||
|
|
258d1f9675 | ||
|
|
60e4c24d97 | ||
|
|
f63033ef3a | ||
|
|
c036636022 | ||
|
|
c26b7691ee | ||
|
|
ea4da9c211 | ||
|
|
4281ffff90 | ||
|
|
90c9fe1da8 | ||
|
|
16f3330a4a | ||
|
|
fc53cf18b8 | ||
|
|
21491ce84f | ||
|
|
489fd5af6b | ||
|
|
1d3d60ba0a | ||
|
|
fee03bf186 | ||
|
|
7b427c42e0 | ||
|
|
7a66350da9 | ||
|
|
443e493161 | ||
|
|
0eeda78340 | ||
|
|
339e718806 | ||
|
|
6523ebccb7 | ||
|
|
ee889edf16 | ||
|
|
0cea0c3c86 | ||
|
|
f1adf08902 | ||
|
|
ed8a80c052 | ||
|
|
85db9c25ca | ||
|
|
a2f8e0242e | ||
|
|
0eae57f278 | ||
|
|
1274cbcafc | ||
|
|
27f565a63a | ||
|
|
a870896df9 | ||
|
|
358ae364d7 | ||
|
|
c74afa4789 | ||
|
|
09234d21f0 | ||
|
|
83ced2339c | ||
|
|
0bc00b0907 | ||
|
|
0af9543b6b | ||
|
|
bb8e4be381 | ||
|
|
fd94cff640 | ||
|
|
d1d9dc03bf | ||
|
|
4e1d4ccfaf | ||
|
|
2331f43a84 | ||
|
|
44c09a6212 | ||
|
|
7b5d7a9bce | ||
|
|
11bbb913bf | ||
|
|
f011851803 | ||
|
|
4cbbf5ba9c | ||
|
|
b7961a8b95 | ||
|
|
26ff3fa9ff | ||
|
|
60271ef7e6 | ||
|
|
0ae5f93e17 | ||
|
|
a8266b98ec | ||
|
|
c58deddd61 | ||
|
|
a18d02713b | ||
|
|
eb9bcf9d1a | ||
|
|
a19f9df351 | ||
|
|
0976ced31f | ||
|
|
759eb08030 | ||
|
|
9717df84de | ||
|
|
174c64f261 | ||
|
|
54b2711c01 | ||
|
|
6d2ecce590 | ||
|
|
6957fa7531 | ||
|
|
64c9dea8eb | ||
|
|
7383c9892d | ||
|
|
319d5ad1a0 | ||
|
|
771db437cd | ||
|
|
652b7ae24c | ||
|
|
69dfbfc65c | ||
|
|
e533e1bd15 | ||
|
|
2f50547c20 | ||
|
|
7c034f42c6 | ||
|
|
653832edb2 | ||
|
|
385452469a | ||
|
|
66014d7770 | ||
|
|
8cb0124750 | ||
|
|
824a2cc18c | ||
|
|
a03f55880a | ||
|
|
acb7bc59a2 | ||
|
|
982ab458bb | ||
|
|
e7de7b256a | ||
|
|
933f9ad8a5 | ||
|
|
6d66debe17 | ||
|
|
cb5a5b57fe | ||
|
|
926c71eb30 | ||
|
|
ff62e351aa | ||
|
|
e5a59753c7 | ||
|
|
0808d80063 | ||
|
|
3c985bf416 | ||
|
|
b4146f9af6 | ||
|
|
428f456a20 | ||
|
|
90abb3197f | ||
|
|
f19e1a52a6 | ||
|
|
b4e63a5922 | ||
|
|
f19b1dd360 | ||
|
|
749d9d4798 | ||
|
|
8d5df52eb7 | ||
|
|
6ca0aa6b74 | ||
|
|
19e59450ae | ||
|
|
af960211f6 | ||
|
|
ac7312ea15 | ||
|
|
9b1241997e | ||
|
|
78855e51c8 | ||
|
|
b13f4dd85d | ||
|
|
171b1a7aef | ||
|
|
e845481fc2 | ||
|
|
a3d3e54a9d | ||
|
|
23e374d773 | ||
|
|
a5836af8d3 | ||
|
|
6d4a52b46c | ||
|
|
648ad5de25 | ||
|
|
e1d55e5254 | ||
|
|
cfb446e78e | ||
|
|
be1b316a83 | ||
|
|
ddb46a868f | ||
|
|
d8dad85a0e | ||
|
|
23fd09baea | ||
|
|
7c247fa5d8 | ||
|
|
08716e6a78 | ||
|
|
a5398d2830 | ||
|
|
57c24f8ba7 | ||
|
|
38cae9f8e5 | ||
|
|
6269cee56a | ||
|
|
cc2d02d7de | ||
|
|
efbb13f282 | ||
|
|
96974bf20a | ||
|
|
3e2d9baac3 | ||
|
|
b3bdf487fb | ||
|
|
8f2779a99d | ||
|
|
098f2fcfe5 | ||
|
|
f64c975375 | ||
|
|
5518ea165a | ||
|
|
33005e59b4 | ||
|
|
af2089a7f5 | ||
|
|
a54a2a1221 | ||
|
|
21cef41ecd | ||
|
|
f70de3d052 | ||
|
|
36937b4cea | ||
|
|
1d4f5675c8 | ||
|
|
24ac51d510 | ||
|
|
5535ea6184 | ||
|
|
be73e2c2dd | ||
|
|
fc292199e5 | ||
|
|
c1fe8fb22a | ||
|
|
3ae83c7e57 | ||
|
|
eb93c64b6c | ||
|
|
41d8239271 | ||
|
|
604f3ccc92 | ||
|
|
7ef97a583a | ||
|
|
a4f3392da2 | ||
|
|
2c5479995d | ||
|
|
d2d5df8295 | ||
|
|
95cbfd155d | ||
|
|
dcde0c47e3 | ||
|
|
bd38502616 | ||
|
|
56680bb5e5 | ||
|
|
8255e0feaf | ||
|
|
f6e5b08569 | ||
|
|
b430525f14 | ||
|
|
9100cea66b | ||
|
|
9a8ca10365 | ||
|
|
e7b2d27569 | ||
|
|
03e7d0c430 | ||
|
|
f3e794a093 | ||
|
|
ba30b01456 | ||
|
|
fbf041b9d8 | ||
|
|
cee92a97fd | ||
|
|
19057f60be | ||
|
|
899ceac132 | ||
|
|
889e13f8c0 | ||
|
|
64cf06058d | ||
|
|
3b36eb5b41 | ||
|
|
0cb6bf2a89 | ||
|
|
c7faf46591 | ||
|
|
7a9ac5ccde | ||
|
|
788cec525c | ||
|
|
1e31a901b1 | ||
|
|
d60f1f675d | ||
|
|
f3a2e6ab6a | ||
|
|
96ad12a650 | ||
|
|
33832739fe | ||
|
|
c9252f4180 | ||
|
|
7f61dc8682 | ||
|
|
dfe4b878a3 | ||
|
|
f793a212d1 | ||
|
|
2ccaa47f06 | ||
|
|
fbd2f552b5 | ||
|
|
524d1e2f9d | ||
|
|
b06e4aebe6 | ||
|
|
517b7ff62f | ||
|
|
7773e7db41 | ||
|
|
eee07a84f4 | ||
|
|
93ee95dfac | ||
|
|
863bbb5b3a | ||
|
|
28acba4f09 | ||
|
|
e9bf0beaa2 | ||
|
|
435e9f26dc | ||
|
|
79fddf944f | ||
|
|
ede699368e | ||
|
|
37c7e0dd93 | ||
|
|
a33bbe5091 | ||
|
|
60e547aa19 | ||
|
|
f087320908 | ||
|
|
e72b490626 | ||
|
|
375b06a22b | ||
|
|
ed0b52bddc | ||
|
|
dc53b90a37 | ||
|
|
c9d2c8a223 | ||
|
|
c9bb05a93d | ||
|
|
b8c0ebc3ae | ||
|
|
b7aeb66655 | ||
|
|
798e1a2ef1 | ||
|
|
931ffd39c7 | ||
|
|
190e828cfd | ||
|
|
b16e619da6 | ||
|
|
81925de598 | ||
|
|
68f8d9791d | ||
|
|
fa1681dad9 | ||
|
|
8a023b4307 | ||
|
|
d7acd3a04f | ||
|
|
0d4b251130 | ||
|
|
907825ee88 | ||
|
|
3377d94f69 | ||
|
|
53d67e1755 | ||
|
|
b298b969cc | ||
|
|
c2abb7f8d4 | ||
|
|
351394fb2f | ||
|
|
7016fa48ed | ||
|
|
32ecc08e38 | ||
|
|
5c947b2aff | ||
|
|
75a68059f8 | ||
|
|
372415045f | ||
|
|
6280fc97db | ||
|
|
157c97b6ae | ||
|
|
165a38f4d4 | ||
|
|
21b578b593 | ||
|
|
7d13888557 | ||
|
|
c1bc6ef596 | ||
|
|
d13e8fd9be | ||
|
|
e898cf1f4d | ||
|
|
b41047f5a1 | ||
|
|
d93964b9c4 | ||
|
|
1ccc2eed76 | ||
|
|
e84108c44d | ||
|
|
a9312c0633 | ||
|
|
61f923413a | ||
|
|
6325f11cd6 | ||
|
|
2d9b9d16bf | ||
|
|
2af688c4f1 | ||
|
|
8f039f1944 | ||
|
|
fd2a94fa1b | ||
|
|
093b5a6500 | ||
|
|
4a9094b12d | ||
|
|
405aedfb13 | ||
|
|
2f51b51c95 | ||
|
|
248c569bff | ||
|
|
9040a3dc75 | ||
|
|
987a1d8bb2 | ||
|
|
9dd101f56c | ||
|
|
d1c8a2eee7 | ||
|
|
ab3763856e | ||
|
|
9a4b81c43a | ||
|
|
b1f645b825 | ||
|
|
b6f89bf652 | ||
|
|
29f4b2fc62 | ||
|
|
82618b7441 | ||
|
|
fa6e6f93a3 | ||
|
|
b08db80c7b | ||
|
|
8d001c7571 | ||
|
|
922ed72ad9 | ||
|
|
571c49f698 | ||
|
|
061d3ad700 | ||
|
|
8df602fb50 | ||
|
|
ef28dae253 | ||
|
|
9834098dd1 | ||
|
|
5103f511c6 | ||
|
|
77e7ce0c64 | ||
|
|
fb7dabe369 | ||
|
|
d44a6b0332 | ||
|
|
9d5de7db39 | ||
|
|
c60bf29dc2 | ||
|
|
8d8b158ad4 | ||
|
|
de1796e1b6 | ||
|
|
cdc49cbf86 | ||
|
|
8766826f17 | ||
|
|
9947b1d591 | ||
|
|
d3267f06d7 | ||
|
|
022c4aafcd | ||
|
|
ffad63566a | ||
|
|
be1b8887f4 | ||
|
|
c59b373c27 | ||
|
|
f2c47cf41b | ||
|
|
0c11974859 | ||
|
|
ea76b61cd5 | ||
|
|
8088207e75 | ||
|
|
8096f74a7a | ||
|
|
808e37a085 | ||
|
|
a4a19a5375 | ||
|
|
c5a1782c50 | ||
|
|
0c53b57ffd | ||
|
|
a62cb8be04 | ||
|
|
393215507d | ||
|
|
de27307b82 | ||
|
|
87560e7eed | ||
|
|
e5edc8dd5f | ||
|
|
6e3d873784 | ||
|
|
b3a0b7ff08 | ||
|
|
11e37a5184 | ||
|
|
4470c26ddd | ||
|
|
c46e073cf6 | ||
|
|
4981becae9 | ||
|
|
ffe2aa4cb3 | ||
|
|
f7b182df6d | ||
|
|
f6bfff16bd | ||
|
|
77a601df68 | ||
|
|
623217c524 | ||
|
|
62f86043e6 | ||
|
|
951274bb15 | ||
|
|
42db9f9c99 | ||
|
|
ca76f57316 | ||
|
|
789eec1a57 | ||
|
|
ea2d4070aa | ||
|
|
626c9e6535 | ||
|
|
80a00245ab | ||
|
|
bb840aa126 | ||
|
|
f6d8c9fd6e | ||
|
|
985fb5e830 | ||
|
|
6dbb3614b1 | ||
|
|
2cae6148d5 | ||
|
|
9073a29fd5 | ||
|
|
5c4c500716 | ||
|
|
52c08d1454 | ||
|
|
2b53c6997f | ||
|
|
412740e644 | ||
|
|
7deb83faf2 | ||
|
|
e6b15b6e3b | ||
|
|
db78e401e2 | ||
|
|
059a89e715 | ||
|
|
72bfc1ff57 | ||
|
|
7e9744b377 | ||
|
|
fe66ed52cd | ||
|
|
59cd31540d | ||
|
|
182a7d6595 | ||
|
|
8bcd754d59 | ||
|
|
4b37859008 | ||
|
|
3f9d31c19a | ||
|
|
b4421be269 | ||
|
|
7bfe868afb | ||
|
|
7ce252939c | ||
|
|
c2a7b5edd0 | ||
|
|
ea7186b15b | ||
|
|
219babfda5 | ||
|
|
d27ac38e93 | ||
|
|
681ad997a2 | ||
|
|
eb3164cb85 | ||
|
|
739fac8131 | ||
|
|
2c777ec5f8 | ||
|
|
dcbd5a7366 | ||
|
|
499f809c6e | ||
|
|
e00eaf7e8f | ||
|
|
6022309d33 | ||
|
|
e9417b86cd | ||
|
|
fb55b6464a | ||
|
|
6c472480d0 | ||
|
|
a031f8d17a | ||
|
|
33776e9317 | ||
|
|
79fb1ee5de | ||
|
|
d208fa4b4e | ||
|
|
66c69063e2 | ||
|
|
ce754b88df | ||
|
|
05c853ea88 | ||
|
|
505fa357a7 | ||
|
|
1813c82cc0 | ||
|
|
0283131d00 | ||
|
|
d956e54c85 |
28
.env.example
Normal file
28
.env.example
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
DB_NAME='database_name'
|
||||||
|
DB_USER='database_user'
|
||||||
|
DB_PASSWORD='database_password'
|
||||||
|
|
||||||
|
# Optionally, you can use a data source name (DSN)
|
||||||
|
# When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables
|
||||||
|
# DATABASE_URL='mysql://database_user:database_password@database_host:database_port/database_name'
|
||||||
|
|
||||||
|
# Optional database variables
|
||||||
|
# DB_HOST='localhost'
|
||||||
|
# DB_PREFIX='wp_'
|
||||||
|
|
||||||
|
WP_ENV='development'
|
||||||
|
WP_HOME='http://example.com'
|
||||||
|
WP_SITEURL="${WP_HOME}/wp"
|
||||||
|
|
||||||
|
# Specify optional debug.log path
|
||||||
|
# WP_DEBUG_LOG='/path/to/debug.log'
|
||||||
|
|
||||||
|
# Generate your keys here: https://roots.io/salts.html
|
||||||
|
AUTH_KEY='generateme'
|
||||||
|
SECURE_AUTH_KEY='generateme'
|
||||||
|
LOGGED_IN_KEY='generateme'
|
||||||
|
NONCE_KEY='generateme'
|
||||||
|
AUTH_SALT='generateme'
|
||||||
|
SECURE_AUTH_SALT='generateme'
|
||||||
|
LOGGED_IN_SALT='generateme'
|
||||||
|
NONCE_SALT='generateme'
|
||||||
1
.github/CONTRIBUTING.md
vendored
1
.github/CONTRIBUTING.md
vendored
@@ -1 +0,0 @@
|
|||||||
Please read [Contributing to Roots Projects](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md)
|
|
||||||
62
.github/ISSUE_TEMPLATE.md
vendored
62
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,62 +0,0 @@
|
|||||||
## Submit a feature request or bug report
|
|
||||||
|
|
||||||
- [ ] I've read the [guidelines for Contributing to Roots Projects](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md)
|
|
||||||
- [ ] This is a feature request
|
|
||||||
- [ ] This is a bug report
|
|
||||||
- [ ] This request isn't a duplicate of an [existing issue](https://github.com/roots/sage/issues)
|
|
||||||
- [ ] I've read the [docs](https://roots.io/sage/docs) and [NPM Debugging Guidelines post](https://discourse.roots.io/t/npm-debugging-guidelines-failed-npm-install-bower-install-or-gulp-build-read-this/3060) and followed them (if applicable)
|
|
||||||
- [ ] This is not a personal support request that should be posted on the [Roots Discourse](https://discourse.roots.io/c/sage) forums
|
|
||||||
|
|
||||||
<!-- Replace any `X` with your information. -->
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**What is the current behavior?**
|
|
||||||
|
|
||||||
X
|
|
||||||
|
|
||||||
|
|
||||||
**What is the expected or desired behavior?**
|
|
||||||
|
|
||||||
X
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Bug report
|
|
||||||
|
|
||||||
<!-- (delete this section if not applicable) -->
|
|
||||||
|
|
||||||
**Please provide steps to reproduce, including full log output:**
|
|
||||||
|
|
||||||
X
|
|
||||||
|
|
||||||
**Please describe your local environment:**
|
|
||||||
|
|
||||||
WordPress version: X
|
|
||||||
|
|
||||||
OS: X
|
|
||||||
|
|
||||||
NPM/Node version: X
|
|
||||||
|
|
||||||
**Where did the bug happen? Development or remote servers?**
|
|
||||||
|
|
||||||
X
|
|
||||||
|
|
||||||
|
|
||||||
**Is there a related [Discourse](https://discourse.roots.io/) thread or were any utilized (please link them)?**
|
|
||||||
|
|
||||||
X
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Feature Request
|
|
||||||
|
|
||||||
<!-- (delete this section if not applicable) -->
|
|
||||||
|
|
||||||
**Please provide use cases for changing the current behavior:**
|
|
||||||
|
|
||||||
X
|
|
||||||
|
|
||||||
**Other relevant information:**
|
|
||||||
|
|
||||||
X
|
|
||||||
40
.gitignore
vendored
40
.gitignore
vendored
@@ -1,10 +1,30 @@
|
|||||||
# Include your project-specific ignores in this file
|
# Application
|
||||||
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
|
web/app/plugins/*
|
||||||
.cache-loader
|
!web/app/plugins/.gitkeep
|
||||||
dist
|
web/app/mu-plugins/*/
|
||||||
bower_components
|
web/app/themes/twentytwentyfive/
|
||||||
node_modules
|
web/app/upgrade
|
||||||
npm-debug.log
|
web/app/uploads/*
|
||||||
yarn-error.log
|
!web/app/uploads/.gitkeep
|
||||||
vendor
|
web/app/cache/*
|
||||||
resources/assets/config-local.json
|
|
||||||
|
# WordPress
|
||||||
|
web/wp
|
||||||
|
web/.htaccess
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Dotenv
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Composer
|
||||||
|
/vendor
|
||||||
|
auth.json
|
||||||
|
|
||||||
|
# WP-CLI
|
||||||
|
wp-cli.local.yml
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|||||||
40
.travis.yml
40
.travis.yml
@@ -1,40 +0,0 @@
|
|||||||
language: php
|
|
||||||
sudo: false
|
|
||||||
dist: trusty
|
|
||||||
php:
|
|
||||||
- 7.1
|
|
||||||
- 7.0
|
|
||||||
- nightly
|
|
||||||
|
|
||||||
env:
|
|
||||||
- TRAVIS_NODE_VERSION="6"
|
|
||||||
- TRAVIS_NODE_VERSION="7"
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
allow_failures:
|
|
||||||
- php: nightly
|
|
||||||
|
|
||||||
cache:
|
|
||||||
apt: true
|
|
||||||
directories:
|
|
||||||
- $HOME/.composer/cache
|
|
||||||
- $HOME/.yarn-cache
|
|
||||||
- vendor
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- composer self-update
|
|
||||||
- source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION
|
|
||||||
- export PATH=$HOME/.yarn/bin:$PATH && travis_retry curl -o- -L https://yarnpkg.com/install.sh | bash
|
|
||||||
|
|
||||||
install:
|
|
||||||
- node -v && yarn -V
|
|
||||||
- travis_retry yarn
|
|
||||||
- composer install -o --prefer-dist --no-interaction
|
|
||||||
|
|
||||||
script:
|
|
||||||
- yarn run test
|
|
||||||
- yarn run build
|
|
||||||
- yarn run rmdist
|
|
||||||
- yarn run "build:production"
|
|
||||||
- composer test
|
|
||||||
569
CHANGELOG.md
569
CHANGELOG.md
@@ -1,569 +0,0 @@
|
|||||||
### HEAD
|
|
||||||
* Update dependencies, support `config-local.json`, implement autoload system for styles/scripts, use `roots/sage-installer`, use `roots/sage-lib` ([#1919](https://github.com/roots/sage/pull/1919))
|
|
||||||
* Add soberwp/controller ([#1903](https://github.com/roots/sage/pull/1903))
|
|
||||||
* Change syntax of template call to match other files in views ([#1908](https://github.com/roots/sage/pull/1908))
|
|
||||||
* Add Tachyons as a CSS framework option ([#1867](https://github.com/roots/sage/pull/1867))
|
|
||||||
* Remove post format reference in template call ([#1904](https://github.com/roots/sage/pull/1904))
|
|
||||||
* Update inline documentation to reflect correct theme file locations ([#1890](https://github.com/roots/sage/pull/1890))
|
|
||||||
* Optimize CSS Assets safe = true ([#1901](https://github.com/roots/sage/pull/1901))
|
|
||||||
* Update Autoprefixer and standardize browserlist location ([#1899](https://github.com/roots/sage/pull/1899))
|
|
||||||
* Do not redirect for WP-CLI ([#1891](https://github.com/roots/sage/pull/1891))
|
|
||||||
* Illuminate: container make with parameters ([#1888](https://github.com/roots/sage/pull/1888))
|
|
||||||
* Add Stylelint for linting stylesheets ([#1885](https://github.com/roots/sage/pull/1885))
|
|
||||||
|
|
||||||
### 9.0.0-beta.3: April 21st, 2017
|
|
||||||
* Move required theme files to `sage/resources` ([#1877](https://github.com/roots/sage/pull/1877))
|
|
||||||
* Move `src/` to `app/` ([#1868](https://github.com/roots/sage/pull/1868))
|
|
||||||
* Move `templates/` to `resources/views/`, move `assets/` to `resources/assets/`, rename `base.blade.php` to `app.blade.php` ([#1864](https://github.com/roots/sage/pull/1864))
|
|
||||||
* Add option to configure build settings ([#1822](https://github.com/roots/sage/pull/1822))
|
|
||||||
* Add support for HTML injection ([#1817](https://github.com/roots/sage/pull/1817))
|
|
||||||
* Add Tachyons as a CSS framework option ([#1867](https://github.com/roots/sage/pull/1867))
|
|
||||||
|
|
||||||
### 9.0.0-beta.2: January 19th, 2017
|
|
||||||
* Fix Browersync ([#1815](https://github.com/roots/sage/pull/1815))
|
|
||||||
* Add option to select CSS framework, add Foundation as an option ([#1813](https://github.com/roots/sage/pull/1813))
|
|
||||||
* Add option to add Font Awesome ([#1812](https://github.com/roots/sage/pull/1812))
|
|
||||||
* Add option to change theme file headers ([#1811](https://github.com/roots/sage/pull/1811))
|
|
||||||
* Add option to remove Bootstrap ([#1810](https://github.com/roots/sage/pull/1810))
|
|
||||||
* Remove Font Awesome ([#1809](https://github.com/roots/sage/pull/1809))
|
|
||||||
* Remove grid defaults ([#1808](https://github.com/roots/sage/pull/1808))
|
|
||||||
* Fix for `publicPath` ([#1806](https://github.com/roots/sage/pull/1806))
|
|
||||||
* Update clean task name ([#1800](https://github.com/roots/sage/pull/1800))
|
|
||||||
* Allow browser versions to be configured in `config.json` ([#1798](https://github.com/roots/sage/pull/1798))
|
|
||||||
* Use stock ESLint ([#1796](https://github.com/roots/sage/pull/1796))
|
|
||||||
|
|
||||||
### 9.0.0-beta.1: January 10th, 2017
|
|
||||||
* Update to Bootstrap 4 Alpha 6 ([#1792](https://github.com/roots/sage/pull/1792))
|
|
||||||
* Add Blade ([#1765](https://github.com/roots/sage/pull/1765) and [#1777](https://github.com/roots/sage/pull/1777))
|
|
||||||
* Remove sidebar defaults ([#1760](https://github.com/roots/sage/pull/1760))
|
|
||||||
* Remove post formats ([#1759](https://github.com/roots/sage/pull/1759))
|
|
||||||
|
|
||||||
### 9.0.0-alpha.4: November 16th, 2016
|
|
||||||
* Use new webpack api schema ([8ac5f15](https://github.com/roots/sage/commit/e6e60aa))
|
|
||||||
* Update dependencies ([70ebba7](https://github.com/roots/sage/commit/70ebba7))
|
|
||||||
* Variables organization ([8ac5f15](https://github.com/roots/sage/commit/8ac5f15))
|
|
||||||
* Use `$.fn.ready()` (reverts [724d550](https://github.com/roots/sage/commit/724d550)) ([e7fccbe](https://github.com/roots/sage/commit/e7fccbe))
|
|
||||||
* Theme activation updates 'stylesheet' option instead of 'template' ([fb19145](https://github.com/roots/sage/commit/fb19145))
|
|
||||||
* Reorganize and refactor build routine ([8c9ba05](https://github.com/roots/sage/commit/8c9ba05))
|
|
||||||
* Switch assets manifest plugin ([c1bb2b3](https://github.com/roots/sage/commit/c1bb2b3))
|
|
||||||
* Add images to assets manifest ([c49793c](https://github.com/roots/sage/commit/c49793c))
|
|
||||||
* Switch from babel to buble ([0d38ab8](https://github.com/roots/sage/commit/0d38ab8))
|
|
||||||
* Update dependencies & webpack compatibility ([eae52fd](https://github.com/roots/sage/commit/eae52fd))
|
|
||||||
* Use http by default (not https) to be consistent with Trellis ([e6f2f49](https://github.com/roots/sage/commit/e6f2f49))
|
|
||||||
|
|
||||||
### 9.0.0-alpha.3: September 11th, 2016
|
|
||||||
* Fix webpack HMR ([#1713](https://github.com/roots/sage/issues/1713))
|
|
||||||
* Remove minor edits from CHANGELOG.md ([3516629](https://github.com/roots/sage/commit/3516629))
|
|
||||||
|
|
||||||
### 9.0.0-alpha.2: September 4th, 2016
|
|
||||||
* Refactor build routine ([#1703](https://github.com/roots/sage/pull/1703))
|
|
||||||
* Update `_grid.scss` to use `@include make-col-ready()` mixin ([#1706](https://github.com/roots/sage/pull/1706))
|
|
||||||
|
|
||||||
### 9.0.0-alpha.1: August 30th, 2016
|
|
||||||
* Move assets found in `node_modules/` to `dist/vendor`, simpler `assets/config.json` ([#1697](https://github.com/roots/sage/pull/1697))
|
|
||||||
* Set dynamically absolute public path ([#1696](https://github.com/roots/sage/pull/1696))
|
|
||||||
* Load Tether ([#1686](https://github.com/roots/sage/pull/1686))
|
|
||||||
* Squash asset pipeline bugs ([4d58f88](https://github.com/roots/sage/commit/4d58f88))
|
|
||||||
* Update dependencies, incl Bootstrap 4 alpha 3 ([447c24d](https://github.com/roots/sage/commit/447c24d))
|
|
||||||
* Fix path to stylesheet in `add_editor_style` ([#1684](https://github.com/roots/sage/pull/1684))
|
|
||||||
* Update required Node.js version ([72b2d89](https://github.com/roots/sage/commit/72b2d89))
|
|
||||||
* Router doesn't require jQuery, use default params ([339cc8e](https://github.com/roots/sage/commit/339cc8e))
|
|
||||||
* Fix display of theme name in Customizer ([3425386](https://github.com/roots/sage/commit/3425386))
|
|
||||||
* Convert scripts to ES6 ([f34af48](https://github.com/roots/sage/commit/f34af48))
|
|
||||||
* Refactor functions.php ([eae36be](https://github.com/roots/sage/commit/eae36be))
|
|
||||||
* Rework template wrapper, bring back template_part() ([#1678](https://github.com/roots/sage/pull/1678))
|
|
||||||
* Remove unused static variable in Wrapper ([9bfdd5a](https://github.com/roots/sage/commit/9bfdd5a))
|
|
||||||
* Remove `path.extname()` check ([#1673](https://github.com/roots/sage/pull/1673))
|
|
||||||
* Updated to align with the Bootstrap 4 docs ([#1667](https://github.com/roots/sage/pull/1667))
|
|
||||||
* Add `npm prune` to Travis CI ([#1663](https://github.com/roots/sage/pull/1663))
|
|
||||||
* Bootstrap NPM ^4.0.0-alpha.2 ([#1650](https://github.com/roots/sage/pull/1650))
|
|
||||||
* Fix Bootstrap 4 styles ([#1642](https://github.com/roots/sage/pull/1642))
|
|
||||||
* Fix autoloader load order issue when including Sage 9 via composer.json in Bedrock ([#1628](https://github.com/roots/sage/pull/1628))
|
|
||||||
* `is_page_template()` requires the name of the subfolder ([#1626](https://github.com/roots/sage/pull/1626))
|
|
||||||
* Webpack config improvements ([#1629](https://github.com/roots/sage/pull/1629))
|
|
||||||
* Webpack implementation improvements ([#1627](https://github.com/roots/sage/pull/1627))
|
|
||||||
* Webpack implementation ([#1625](https://github.com/roots/sage/pull/1625))
|
|
||||||
* Fix BS4 grid after their grid updates ([5551dde](https://github.com/roots/sage/commit/5551dde))
|
|
||||||
* Pass the correct template ([856a482](https://github.com/roots/sage/commit/856a482))
|
|
||||||
* Optimize travis a bit ([b42c425](https://github.com/roots/sage/commit/b42c425))
|
|
||||||
* Move single-post loop to single.php, closes #1582 ([6efa099](https://github.com/roots/sage/commit/6efa099))
|
|
||||||
* All function braces need to be on new line ([b491f76](https://github.com/roots/sage/commit/b491f76))
|
|
||||||
* Fix issue with WP loading wrong index.php ([9e2917e](https://github.com/roots/sage/commit/9e2917e))
|
|
||||||
* Use 4 spaces for `src/*.php` ([fe659f4](https://github.com/roots/sage/commit/fe659f4))
|
|
||||||
* Use phpcs.xml for all rules ([246955c](https://github.com/roots/sage/commit/246955c))
|
|
||||||
* Conform to new rules ([6a4d3bd](https://github.com/roots/sage/commit/6a4d3bd))
|
|
||||||
* Create new phpcs rules ([2d02544](https://github.com/roots/sage/commit/2d02544))
|
|
||||||
* Remove Template class ([1df3fee](https://github.com/roots/sage/commit/1df3fee))
|
|
||||||
* Remove closure from sidebar registration ([12d6ac3](https://github.com/roots/sage/commit/12d6ac3))
|
|
||||||
* Remove sage.pot ([d4461fa](https://github.com/roots/sage/commit/d4461fa))
|
|
||||||
* Remove template_part, template_sidebar, temp sidebar fix ([abeea0f](https://github.com/roots/sage/commit/abeea0f))
|
|
||||||
* Update asset handles ([fa0e51f](https://github.com/roots/sage/commit/fa0e51f))
|
|
||||||
* Remove comment-reply JS ([d217ba6](https://github.com/roots/sage/commit/d217ba6))
|
|
||||||
* Update node in travis, remove unsupported php ([8712dc8](https://github.com/roots/sage/commit/8712dc8))
|
|
||||||
* Update dependencies, switch to eslint ([e51e41e](https://github.com/roots/sage/commit/e51e41e))
|
|
||||||
* Bootstrap 4 ([c9ef232](https://github.com/roots/sage/commit/c9ef232))
|
|
||||||
* Fix: page title not displaying ([9283bbb](https://github.com/roots/sage/commit/9283bbb))
|
|
||||||
* Rename interfaces, unset after unwrapping ([97906e9](https://github.com/roots/sage/commit/97906e9))
|
|
||||||
* Restructure theme, use autoloader ([9eaffa3](https://github.com/roots/sage/commit/9eaffa3a2d4df462dd8020a10551334208bd32a3))
|
|
||||||
|
|
||||||
### 8.5.0: September 20th, 2016
|
|
||||||
* Update installation instructions
|
|
||||||
* Update dependencies
|
|
||||||
* Update to Bootstrap 4.0.0-alpha.4 ([5eb01fd](https://github.com/roots/sage/commit/5eb01fd0319a7b6576e31579dc50e16b023abb74))
|
|
||||||
|
|
||||||
### 8.4.2: February 19th, 2016
|
|
||||||
* Add Composer vendor directory to gitignore ([#1618](https://github.com/roots/sage/issues/1618))
|
|
||||||
* Fix build test by removing trailing space ([#1617](https://github.com/roots/sage/issues/1617))
|
|
||||||
* Replace deprecated gulp-minify-css with gulp-cssnano ([#1610](https://github.com/roots/sage/issues/1610))
|
|
||||||
|
|
||||||
### 8.4.1: January 27th, 2016
|
|
||||||
* Add `composer.json` and update installation instructions ([#1583](https://github.com/roots/sage/issues/1583))
|
|
||||||
|
|
||||||
### 8.4.0: December 1st, 2015
|
|
||||||
* Update to Bootstrap 3.3.6 ([#1578](https://github.com/roots/sage/pull/1578))
|
|
||||||
* Remove unnecessary underscore ([#1577](https://github.com/roots/sage/pull/1577))
|
|
||||||
* Drop support for older browsers ([#1571](https://github.com/roots/sage/pull/1571))
|
|
||||||
* Add support for theme customizer ([#1573](https://github.com/roots/sage/pull/1573))
|
|
||||||
* Remove extraneous no-js ([#1562](https://github.com/roots/sage/pull/1562))
|
|
||||||
* Simplify/speed up editor style process ([#1560](https://github.com/roots/sage/pull/1560))
|
|
||||||
|
|
||||||
### 8.3.0: October 13th, 2015
|
|
||||||
* Setup organization ([#1558](https://github.com/roots/sage/pull/1558))
|
|
||||||
* Remove redundancy with WAI-ARIA in HTML ([#1557](https://github.com/roots/sage/pull/1557))
|
|
||||||
* Rename config.php to setup.php ([#1556](https://github.com/roots/sage/pull/1556))
|
|
||||||
* Move init.php to config.php ([#1555](https://github.com/roots/sage/pull/1555))
|
|
||||||
* Use Sass to style search form, remove search template ([#1545](https://github.com/roots/sage/pull/1545))
|
|
||||||
* Remove Modernizr ([#1541](https://github.com/roots/sage/pull/1541))
|
|
||||||
* Remove references to WP_ENV ([#1554](https://github.com/roots/sage/pull/1554))
|
|
||||||
* Use WP core's HTML5 gallery markup ([#1546](https://github.com/roots/sage/pull/1546))
|
|
||||||
* Use slash in handle names for theme CSS and JS ([#1537](https://github.com/roots/sage/pull/1537))
|
|
||||||
* Add compatibility with WooCommerce Multilingual plugin ([#1530](https://github.com/roots/sage/pull/1530))
|
|
||||||
* Remove ConditionalTagCheck class ([#1494](https://github.com/roots/sage/pull/1494))
|
|
||||||
* Add search templates ([#1459](https://github.com/roots/sage/issues/1459))
|
|
||||||
* Allow `debugger` statements in development JavaScript ([#1487](https://github.com/roots/sage/issues/1487))
|
|
||||||
|
|
||||||
### 8.2.1: May 7th, 2015
|
|
||||||
* Update BrowserSync ([#1457](https://github.com/roots/sage/issues/1457))
|
|
||||||
* Bump dependencies ([#1448](https://github.com/roots/sage/issues/1448))
|
|
||||||
* Allow revved files to resolve in development if they exist ([#1456](https://github.com/roots/sage/issues/1456))
|
|
||||||
* Disable advanced minification features to fix incorrect file path in compiled CSS ([#1452](https://github.com/roots/sage/issues/1452))
|
|
||||||
* Fix Glyphicon font path ([#1455](https://github.com/roots/sage/issues/1455))
|
|
||||||
|
|
||||||
### 8.2.0: April 29th, 2015
|
|
||||||
* Use Sass Bootstrap by default ([#1437](https://github.com/roots/sage/issues/1437))
|
|
||||||
* Remove nav walker and Bootstrap navbar ([#1427](https://github.com/roots/sage/issues/1427))
|
|
||||||
* Remove Bootstrap gallery ([#1421](https://github.com/roots/sage/issues/1421))
|
|
||||||
* Remove hardcoded feed link ([#1426](https://github.com/roots/sage/issues/1426))
|
|
||||||
* Move jQuery CDN feature to Soil ([#1422](https://github.com/roots/sage/issues/1422))
|
|
||||||
* Bump `gulp-load-plugins` to 0.10.0 ([#1419](https://github.com/roots/sage/issues/1419))
|
|
||||||
* Switch from [yargs](https://github.com/bcoe/yargs) to [minimist](https://github.com/substack/minimist) ([#1418](https://github.com/roots/sage/issues/1418))
|
|
||||||
* Remove `$content_width` ([#1417](https://github.com/roots/sage/issues/1417))
|
|
||||||
* Lowercase `X-UA-Compatible` ([#1409](https://github.com/roots/sage/issues/1409))
|
|
||||||
* Remove mention of Google Analytics from the config ([#1384](https://github.com/roots/sage/issues/1384))
|
|
||||||
|
|
||||||
### 8.1.1: March 31st, 2015
|
|
||||||
* Remove pleeease dependency in favor of vanilla gulp-autoprefixer and gulp-minify-css ([#1402](https://github.com/roots/sage/issues/1402))
|
|
||||||
* Fix `gulp --production` race condition ([#1398](https://github.com/roots/sage/issues/1398))
|
|
||||||
* Update to Bootstrap 3.3.4 ([#1387](https://github.com/roots/sage/issues/1387))
|
|
||||||
|
|
||||||
### 8.1.0: March 13th, 2015
|
|
||||||
* Move HTML5 Boilerplate's Google Analytics snippet to Soil ([#1382](https://github.com/roots/sage/issues/1382))
|
|
||||||
* Run `gulp build` if `bower.json` is changed ([#1378](https://github.com/roots/sage/issues/1378))
|
|
||||||
* Remove namespace from base.php ([#1372](https://github.com/roots/sage/issues/1372))
|
|
||||||
* Allow build directory to be customized ([#1352](https://github.com/roots/sage/issues/1352), [#1366](https://github.com/roots/sage/issues/1366))
|
|
||||||
* Update ConditionalTagCheck and usage docs ([#1365](https://github.com/roots/sage/issues/1365))
|
|
||||||
* Change default gallery columns to 3 ([#1364](https://github.com/roots/sage/issues/1364))
|
|
||||||
* Apply `script_loader_src` filter to jQuery fallback ([#1363](https://github.com/roots/sage/issues/1363))
|
|
||||||
|
|
||||||
### 8.0.1: February 26th, 2015
|
|
||||||
* Update asset-builder version to fix Windows compatibility ([#1351](https://github.com/roots/sage/issues/1351))
|
|
||||||
* Fix broken wiredep imports with main.scss.example ([Discussion](https://discourse.roots.io/t/issue-with-sage-sass-version/2962))
|
|
||||||
|
|
||||||
### 8.0.0: February 25th, 2015
|
|
||||||
* Change theme name from Roots to Sage
|
|
||||||
* Bump required PHP version to >=5.4
|
|
||||||
* Add coding standards based on PSR-2
|
|
||||||
* Add Travis CI
|
|
||||||
* Add namespace
|
|
||||||
* Use short array syntax
|
|
||||||
* Use short echo syntax
|
|
||||||
* Switch from Grunt to gulp, new front-end development workflow
|
|
||||||
* Switch from Livereload to [BrowserSync](http://www.browsersync.io/)
|
|
||||||
* Use wiredep for Sass and Less injection
|
|
||||||
* Implement JSON file based asset pipeline with [asset-builder](https://github.com/austinpray/asset-builder)
|
|
||||||
* Re-organize asset file structure
|
|
||||||
* Re-organize stylesheet file structure
|
|
||||||
* Add main.scss.example and instructions for using Sass
|
|
||||||
* Use the primary theme stylesheet for the editor stylesheet
|
|
||||||
* Remove theme activation, move to [wp-cli-theme-activation](https://github.com/roots/wp-cli-theme-activation)
|
|
||||||
* Simplify 404 page
|
|
||||||
* Convert Sidebar to ConditionalTagCheck
|
|
||||||
* Update to jQuery 1.11.2
|
|
||||||
* Use new core navigation template tag
|
|
||||||
* Update sidebar to fix default template check
|
|
||||||
* Update nav walker to correctly assign `active` classes for custom post types
|
|
||||||
* Better support for CPT templates
|
|
||||||
|
|
||||||
### 7.0.3: December 18th, 2014
|
|
||||||
* Use `get_the_archive_title`
|
|
||||||
* Remove `wp_title`, add title-tag theme support
|
|
||||||
* Remove `Roots_Nav_Walker` as default for all menus
|
|
||||||
* Update to Bootstrap 3.3.1
|
|
||||||
* Add some base comment styling
|
|
||||||
* Make search term `required` in search form
|
|
||||||
|
|
||||||
### 7.0.2: October 24th, 2014
|
|
||||||
* Simplify comments, use core comment form and list
|
|
||||||
* Remove HTML5 shiv from Modernizr build
|
|
||||||
* Move JavaScript to footer
|
|
||||||
* Update hEntry schema to use `updated` instead of `published`
|
|
||||||
* Move variables into `main.less`
|
|
||||||
* Add `roots_body_class` function that checks for page slug in `body_class`
|
|
||||||
* Move `wp_footer` from footer template into `base.php`
|
|
||||||
|
|
||||||
### 7.0.1: August 15th, 2014
|
|
||||||
* Move `<main>` and `.sidebar` markup out of PHP and into LESS
|
|
||||||
* Define `WP_ENV` if it is not already defined
|
|
||||||
* Only load Google Analytics in production environment
|
|
||||||
|
|
||||||
### 7.0.0: July 3rd, 2014
|
|
||||||
* Updated Grunt workflow
|
|
||||||
* Use grunt-modernizr to make a lean Modernizr build
|
|
||||||
* Use Bower for front-end package management
|
|
||||||
* Update to Bootstrap 3.2.0
|
|
||||||
* Update to Modernizr 2.8.2
|
|
||||||
* Update to jQuery 1.11.1
|
|
||||||
* Move clean up, relative URLs, and nice search to [Soil](https://github.com/roots/soil)
|
|
||||||
* Update LESS organization
|
|
||||||
* Move [community translations](https://github.com/roots/roots-translations) to separate repository
|
|
||||||
|
|
||||||
### 6.5.2: February 4th, 2014
|
|
||||||
* Update to Bootstrap 3.1.0
|
|
||||||
* Move DOM routing into an anonymous function to support jQuery noConflict
|
|
||||||
* Update to jQuery 1.11.0
|
|
||||||
* Add notice to theme activation, tidy activation table markup
|
|
||||||
* Remove changing media folder from theme activation (use [Bedrock](https://github.com/roots/bedrock) for clean URLs out of the box)
|
|
||||||
* Switch `div.main` to `main` element now that Modernizr uses the latest HTML5 Shiv
|
|
||||||
* Update to Modernizr 2.7.0
|
|
||||||
* Don't run JSHint on plugins (`assets/js/plugins/`)
|
|
||||||
* Disable warnings about undefined variables (JSHint)
|
|
||||||
* Merge in updates from HTML5 Boilerplate
|
|
||||||
* Add JS source map (disabled by default)
|
|
||||||
* Replace `grunt-recess` with `grunt-contrib-less`, add LESS source map support
|
|
||||||
|
|
||||||
### 6.5.1: November 5th, 2013
|
|
||||||
* Move clean URLs to a [plugin](https://github.com/roots/roots-rewrites)
|
|
||||||
* Update to Bootstrap 3.0.1
|
|
||||||
|
|
||||||
### 6.5.0: August 23rd, 2013
|
|
||||||
* Reference new site, [http://roots.io/](http://roots.io/)
|
|
||||||
* Remove bundled docs, reference [http://roots.io/docs/](http://roots.io/docs/)
|
|
||||||
* Use Bootstrap variables for media queries
|
|
||||||
* Update to Bootstrap 3.0.0
|
|
||||||
* Update to jQuery 1.10.2
|
|
||||||
* Change media directory from `/assets/` to `/media/`
|
|
||||||
* Update to Google Universal Analytics
|
|
||||||
* Show author display name for author archives
|
|
||||||
* Add Serbian translation
|
|
||||||
* Remove post tags from templates
|
|
||||||
* Remove TinyMCE valid elements tweaks (no longer necessary)
|
|
||||||
* Remove additional widget classes
|
|
||||||
* Move `/assets/css/less/` to `/assets/less/`
|
|
||||||
* Add wrapper templates filter
|
|
||||||
* Fix relative external URLs issue
|
|
||||||
|
|
||||||
### 6.4.0: May 1st, 2013
|
|
||||||
* Fix Theme Activation page issues
|
|
||||||
* Fix issues with root relative URLs and rewrites on non-standard setups
|
|
||||||
* Make sure rewrites are added to `.htaccess` immediately after activation
|
|
||||||
* Move HTML5 Boilerplate's `.htaccess` to a [plugin](https://github.com/roots/wp-h5bp-htaccess)
|
|
||||||
* Rename `page-custom.php` to `template-custom.php`
|
|
||||||
* Don't warn about unwritable htaccess if that option is disabled
|
|
||||||
* Add missing collapse class for top navbar
|
|
||||||
* Add comment template
|
|
||||||
* Update is_dropdown evaluation in nav walker
|
|
||||||
* Re-organize archives template
|
|
||||||
* Add missing comment ID
|
|
||||||
* hNews consistency with entry-title class
|
|
||||||
* Add `wp_title()` filter
|
|
||||||
* Fix missing closing div in comments
|
|
||||||
* Fix for navbar dropdowns
|
|
||||||
* Add option for using jQuery on Google CDN
|
|
||||||
* Correct logic in `roots_enable_root_relative_urls`
|
|
||||||
* Add Greek translation, update Brazilian Portuguese translation
|
|
||||||
* Update to Bootstrap 2.3.1
|
|
||||||
* Simplify alerts
|
|
||||||
* Remove disabled post nav links
|
|
||||||
* Use Bootstrap media object for listing comments
|
|
||||||
* Move Google Analytics to `lib/scripts.php`
|
|
||||||
* Static top navbar instead of fixed
|
|
||||||
|
|
||||||
### 6.3.0: February 8th, 2013
|
|
||||||
* Update to Bootstrap 2.3.0
|
|
||||||
* Update to jQuery 1.9.1
|
|
||||||
* Output author title with `get_the_author()`
|
|
||||||
* Add EditorConfig
|
|
||||||
* Update 404 template based on H5BP
|
|
||||||
* Update H5BP's included .htaccess
|
|
||||||
* Don't show comments on passworded posts
|
|
||||||
* Add `do_action('get_header')` for WooSidebars compatibility
|
|
||||||
* Simplify entry meta
|
|
||||||
* Allow `get_search_form()` to be called more than once per request
|
|
||||||
* Move plugins.js and main.js to footer
|
|
||||||
* JavaScript clean up (everything is now enqueued)
|
|
||||||
* Remove conditional feed
|
|
||||||
* Introduce `add_theme_support('bootstrap-gallery')`
|
|
||||||
* Rewrites organization (introduce `lib/rewrites.php`)
|
|
||||||
* Fix `add_editor_style` path
|
|
||||||
* Updated translations: French, Bulgarian, Turkish, Korean
|
|
||||||
* Enable `add_theme_support` for Nice Search
|
|
||||||
* Replace ID's with classes
|
|
||||||
* Add support for dynamic sidebar templates
|
|
||||||
* Fix PHP notice on search with no results
|
|
||||||
* Update to jQuery 1.9.0
|
|
||||||
|
|
||||||
### 6.2.0: January 13th, 2013
|
|
||||||
* Implement latest Nice Search
|
|
||||||
* Update [gallery] shortcode
|
|
||||||
* Add Simplified Chinese, Indonesian, Korean translations
|
|
||||||
* Move template title to `lib/utils.php`
|
|
||||||
* Update to Bootstrap 2.2.2
|
|
||||||
* Update to jQuery 1.8.3
|
|
||||||
* Use `entry-summary` class for excerpts per Readability's Article Publishing Guidelines
|
|
||||||
* Cleanup/refactor `lib/activation.php`
|
|
||||||
* Remove `lib/post-types.php` and `lib/metaboxes.php`
|
|
||||||
* Make sure Primary Navigation menu always gets created and has the location set upon activation, update activation permalink method
|
|
||||||
* Update to Bootstrap 2.2.1
|
|
||||||
* Update conditional feed method
|
|
||||||
* Update to Bootstrap 2.2.0
|
|
||||||
* Return instead of echo class names in `roots_main_class` and `roots_sidebar_class`
|
|
||||||
* Move nav customizations into `lib/nav.php`
|
|
||||||
|
|
||||||
### 6.1.0: October 2nd, 2012
|
|
||||||
* Change roots_sidebar into a more explicit configuration array
|
|
||||||
* Re-organize configuration/setup files
|
|
||||||
* Update to jQuery 1.8.2
|
|
||||||
* Refactor/simplify Roots vCard Widget
|
|
||||||
* Move custom entry_meta code into template
|
|
||||||
* Move Google Analytics code into footer template
|
|
||||||
* Add CONTRIBUTING.md to assist with the new GitHub UI
|
|
||||||
* Add nav walker support for CSS dividers and nav-header
|
|
||||||
|
|
||||||
### 6.0.0: September 16th, 2012
|
|
||||||
* Simplify nav walker and support 3rd level dropdowns
|
|
||||||
* Update to Bootstrap 2.1.1, jQuery 1.8.1, Modernizr 2.6.2
|
|
||||||
* Add bundled docs
|
|
||||||
* Update all templates to use [PHP Alternative Syntax](http://php.net/manual/en/control-structures.alternative-syntax.php)
|
|
||||||
* Add MIT License
|
|
||||||
* Implement scribu's [Theme Wrapper](http://scribu.net/wordpress/theme-wrappers.html) (see `base.php`)
|
|
||||||
* Move `css/`, `img/`, and `js/` folders within a new `assets/` folder
|
|
||||||
* Move templates, `comments.php`, and `searchform.php` to `templates/` folder
|
|
||||||
* Rename `inc/` to `lib/`
|
|
||||||
* Add placeholder `lib/post-types.php` and `lib/metaboxes.php` files
|
|
||||||
* Rename `loop-` files to `content-`
|
|
||||||
* Remove all hooks
|
|
||||||
* Use `templates/page-header.php` for page titles
|
|
||||||
* Use `head.php` for everything in `<head>`
|
|
||||||
|
|
||||||
### 5.2.0: August 18th, 2012
|
|
||||||
* Update to jQuery 1.8.0 and Modernizr 2.6.1
|
|
||||||
* Fix duplicate active class in `wp_nav_menu` items
|
|
||||||
* Merge `Roots_Navbar_Nav_Walker` into `Roots_Nav_Walker`
|
|
||||||
* Add and update code documentation
|
|
||||||
* Use `wp_get_theme()` to get the theme name on activation
|
|
||||||
* Use `<figure>` & `<figcaption>` for captions
|
|
||||||
* Wrap embedded media as suggested by Readability
|
|
||||||
* Remove unnecessary `remove_action`'s on `wp_head` as of WordPress 3.2.1
|
|
||||||
* Add updates from HTML5 Boilerplate
|
|
||||||
* Remove well class from sidebar
|
|
||||||
* Flush permalinks on activation to avoid 404s with clean URLs
|
|
||||||
* Show proper classes on additional `wp_nav_menu()`'s
|
|
||||||
* Clean up `inc/cleanup.php`
|
|
||||||
* Remove old admin notice for tagline
|
|
||||||
* Remove default tagline admin notice, hide from feed
|
|
||||||
* Fix for duplicated classes in widget markup
|
|
||||||
* Show title on custom post type archive template
|
|
||||||
* Fix for theme preview in WordPress 3.3.2
|
|
||||||
* Introduce `inc/config.php` with options for clean URLs, H5BP's `.htaccess`, root relative URLs, and Bootstrap features
|
|
||||||
* Allow custom CSS classes in menus, walker cleanup
|
|
||||||
* Remove WordPress version numbers from stylesheets
|
|
||||||
* Don't include HTML5 Boilerplate's `style.css` by default
|
|
||||||
* Allow `inc/htaccess.php` to work with Litespeed
|
|
||||||
* Update to Bootstrap 2.0.4
|
|
||||||
* Update Bulgarian translation
|
|
||||||
* Don't use clean URLs with default permalink structure
|
|
||||||
* Add translations for Catalan, Polish, Hungarian, Norwegian, Russian
|
|
||||||
|
|
||||||
### 5.1.0: April 14th, 2012
|
|
||||||
* Various bugfixes for scripts, stylesheets, root relative URLs, clean URLs, and htaccess issues
|
|
||||||
* Add a conditional feed link
|
|
||||||
* Temporarily remove Gravity Forms customizations
|
|
||||||
* Update to Bootstrap 2.0.2
|
|
||||||
* Update `roots.pot` for translations
|
|
||||||
* Add/update languages: Vietnamese, Swedish, Bulgarian, Turkish, Norwegian, Brazilian Portugese
|
|
||||||
* Change widgets to use `<section>` instead of `<article>`
|
|
||||||
* Add comment-reply.js
|
|
||||||
* Remove optimized robots.txt
|
|
||||||
* HTML5 Boilerplate, Modernizr, and jQuery updates
|
|
||||||
|
|
||||||
### 5.0.0: February 5th, 2012
|
|
||||||
* Remove all frameworks except Bootstrap
|
|
||||||
* Update to Bootstrap 2.0
|
|
||||||
* Remove `roots-options.php` and replaced with a more simple `roots-config.php`
|
|
||||||
* Now using Bootstrap markup on forms, page titles, image galleries, alerts and errors, post and comment navigation
|
|
||||||
* Remove Roots styles from `style.css` and introduced `app.css` for site-specific CSS
|
|
||||||
* Remove almost all previous default Roots styling
|
|
||||||
* Latest updates from HTML5 Boilerplate
|
|
||||||
|
|
||||||
### 4.1.0: February 1st, 2012
|
|
||||||
* Update translations
|
|
||||||
* HTML5 Boilerplate updates
|
|
||||||
* Fix for Server 500 errors
|
|
||||||
* Add `roots-scripts.php`, now using `wp_enqueue_script`
|
|
||||||
* Re-organize `roots-actions.php`
|
|
||||||
* Allow `<script>` tags in TinyMCE
|
|
||||||
* Add full width class and search form to 404 template
|
|
||||||
* Remove Blueprint CSS specific markup
|
|
||||||
* Use Roots Nav Walker as default
|
|
||||||
* Add author name and taxonomy name to archive template title
|
|
||||||
* Add Full Width CSS class options
|
|
||||||
|
|
||||||
### 4.0.0: January 4th, 2012
|
|
||||||
* Add theme activation options
|
|
||||||
* HTML5 Boilerplate updates
|
|
||||||
* Add CSS frameworks: Bootstrap, Foundation
|
|
||||||
* Add translations: Dutch, Italian, Macedonian, German, Finnish, Danish, Spanish, and Turkish
|
|
||||||
* Update jQuery
|
|
||||||
* Remove included jQuery plugins
|
|
||||||
* Clean up whitespace, switched to two spaces for tabs
|
|
||||||
* Clean up `body_class()` some more with `roots_body_class()`
|
|
||||||
* Post meta information is now displayed using a function (similar to Twenty Eleven)
|
|
||||||
* Bugfixes for 1140 options
|
|
||||||
* Add first and last classes to widgets
|
|
||||||
* Fix bug with initial options save
|
|
||||||
* Remove sitemap and listing subpages templates
|
|
||||||
* Child themes can now unregister sidebars
|
|
||||||
* Add fix for empty search query
|
|
||||||
* Update README
|
|
||||||
* Blocking access to readme.html and license.txt to hide WordPress version information
|
|
||||||
|
|
||||||
### 3.6.0: August 12th, 2011
|
|
||||||
* HTML5 Boilerplate 2.0 updates
|
|
||||||
* Cleaner output of enqueued styles and scripts
|
|
||||||
* Adde option for root relative URLs
|
|
||||||
* Small fixes to root relative URLs and clean assets
|
|
||||||
* Update included jQuery plugins
|
|
||||||
* Add French translation (thanks @johnraz)
|
|
||||||
* Add Brazilian Portuguese translation (thanks @weslly)
|
|
||||||
* Switch the logo to use `add_custom_image_header`
|
|
||||||
* Add a function that strips unnecessary self-closing tags
|
|
||||||
* Code cleanup and re-organization
|
|
||||||
|
|
||||||
### 3.5.0: July 30th, 2011
|
|
||||||
* Complete rewrite of theme options based on Twenty Eleven
|
|
||||||
* CSS frameworks: refactor code and add default classes for each framework
|
|
||||||
* CSS frameworks: add support for Adapt.js and LESS
|
|
||||||
* CSS frameworks: add option for None
|
|
||||||
* Add support for WPML and theme translation
|
|
||||||
* Add option for cleaner nav menu output
|
|
||||||
* Add option for FOUT-B-Gone
|
|
||||||
* Add authorship rel attribute to post author link
|
|
||||||
* Activation bugfix for pages being added multiple times
|
|
||||||
* Bugfixes to the root relative URL function
|
|
||||||
* Child themes will now load their CSS automatically and properly
|
|
||||||
* HTML5 Boilerplate updates (including Normalize.css, Modernizr 2.0, and Respond.js)
|
|
||||||
* Introduce cleaner way of including HTML5 Boilerplate's `.htaccess`
|
|
||||||
* Add hooks & actions
|
|
||||||
* Rename `includes/` directory to `inc/`
|
|
||||||
* Add a blank `inc/roots-custom.php` file
|
|
||||||
|
|
||||||
### 3.2.4: May 19th, 2011
|
|
||||||
* Bugfixes
|
|
||||||
* Match latest changes to HTML5 Boilerplate and Blueprint CSS
|
|
||||||
* Update jQuery to 1.6.1
|
|
||||||
|
|
||||||
### 3.2.3: May 10th, 2011
|
|
||||||
* Bugfixes
|
|
||||||
* Add `language_attributes()` to `<html>`
|
|
||||||
* Match latest changes to HTML5 Boilerplate and Blueprint CSS
|
|
||||||
* Update jQuery to 1.6
|
|
||||||
|
|
||||||
### 3.2.2: April 24th, 2011
|
|
||||||
* Bugfixes
|
|
||||||
|
|
||||||
### 3.2.1: April 20th, 2011
|
|
||||||
* Add support for child themes
|
|
||||||
|
|
||||||
### 3.2.0: April 15th, 2011
|
|
||||||
* Add support for the 1140px Grid
|
|
||||||
* Update the conditional comment code to match latest changes to HTML5 Boilerplate
|
|
||||||
|
|
||||||
### 3.1.1: April 7th, 2011
|
|
||||||
* Fix relative path function to work correctly when WordPress is installed in a subdirectory
|
|
||||||
* Update jQuery to 1.5.2
|
|
||||||
* Fix comments to show avatars correctly
|
|
||||||
|
|
||||||
### 3.1.0: April 1st, 2011
|
|
||||||
* Add support for 960.gs thanks to John Liuti
|
|
||||||
* Add more onto the `.htaccess` from HTML5 Boilerplate
|
|
||||||
* Allow the theme directory and name to be renamable
|
|
||||||
|
|
||||||
### 3.0.0: March 28th, 2011
|
|
||||||
* Change name from BB to Roots and release to the public
|
|
||||||
* Update various areas to match the latest changes to HTML5 Boilerplate
|
|
||||||
* Change the theme markup based on hCard/Readability Guidelines and work by Jonathan Neal
|
|
||||||
* Create the navigation menus and automatically set their locations during theme activation
|
|
||||||
* Set permalink structure to `/%year%/%postname%/`
|
|
||||||
* Set uploads folder to `/assets/`
|
|
||||||
* Rewrite static folders in `/wp-content/themes/roots/` (`css/`, `js/`, `img/`) to the root (`/css/`, `/js/`, `/img/`)
|
|
||||||
* Rewrite `/wp-content/plugins/` to `/plugins/`
|
|
||||||
* Add more root relative URLs on WordPress functions
|
|
||||||
* Search results (`/?s=query`) rewrite to `/search/query/`
|
|
||||||
* `l10n.js` is deregistered
|
|
||||||
* Change [gallery] to output `<figure>` and `<figcaption>` and link to file by default
|
|
||||||
* Add more `loop.php` templates
|
|
||||||
* Made the HTML editor have a monospaced font
|
|
||||||
* Add `front-page.php`
|
|
||||||
* Update CSS for Gravity Forms 1.5
|
|
||||||
* Add `searchform.php template`
|
|
||||||
|
|
||||||
### 2.4.0: January 25th, 2011
|
|
||||||
* Add a notification when saving the theme settings
|
|
||||||
* Add support for navigation menus
|
|
||||||
* Create function that makes sure there is a Home page on theme activation
|
|
||||||
* Update various areas to match the latest changes to HTML5 Boilerplate
|
|
||||||
|
|
||||||
### 2.3.0: December 8th, 2010
|
|
||||||
* Logo is no longer an `<h1>`
|
|
||||||
* Add ARIA roles again
|
|
||||||
* Change `ul#nav` to `nav#nav-main`
|
|
||||||
* Add vCard to footer
|
|
||||||
* Made all URL's root relative
|
|
||||||
* Add Twitter and Facebook widgets to footer
|
|
||||||
* Add SEO optimized `robots.txt` from WordPress codex
|
|
||||||
|
|
||||||
### 2.2.0: September 20th, 2010
|
|
||||||
* Add asynchronous Google Analytics
|
|
||||||
* Update `.htaccess` with latest changes from HTML5 Boilerplate
|
|
||||||
|
|
||||||
### 2.1.0: August 19th, 2010
|
|
||||||
* Remove optimizeLegibility from headings
|
|
||||||
* Update jQuery to latest version
|
|
||||||
* Implement HTML5 Boilerplate `.htaccess`
|
|
||||||
|
|
||||||
### 2.0.1: August 2nd, 2010
|
|
||||||
* Add some presentational CSS classes
|
|
||||||
* Add footer widget
|
|
||||||
* Add more Gravity Forms default styling
|
|
||||||
|
|
||||||
### 2.0.0: July 19th, 2010
|
|
||||||
* Add HTML5 Boilerplate changes
|
|
||||||
* Implement `loop.php`
|
|
||||||
* wp_head cleanup
|
|
||||||
* Add `page-subpages.php` template
|
|
||||||
|
|
||||||
### 1.5.0: April 15th, 2010
|
|
||||||
* Integrate Paul Irish's frontend-pro-template (the original HTML5 Boilerplate)
|
|
||||||
|
|
||||||
### 1.0.0: December 18th, 2009
|
|
||||||
* Add Blueprint CSS to Starkers
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) Ben Word and Scott Walkinshaw
|
Copyright (c) Roots Software LLC
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
151
README.md
151
README.md
@@ -1,124 +1,61 @@
|
|||||||
# [Sage](https://roots.io/sage/)
|
<p align="center">
|
||||||
[](https://packagist.org/packages/roots/sage)
|
<a href="https://roots.io/bedrock/">
|
||||||
[](https://david-dm.org/roots/sage#info=devDependencies)
|
<img alt="Bedrock" src="https://cdn.roots.io/app/uploads/logo-bedrock.svg" height="100">
|
||||||
[](https://travis-ci.org/roots/sage)
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
Sage is a WordPress starter theme with a modern development workflow.
|
<p align="center">
|
||||||
|
<a href="https://packagist.org/packages/roots/bedrock">
|
||||||
|
<img alt="Packagist Installs" src="https://img.shields.io/packagist/dt/roots/bedrock?label=projects%20created&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||||
|
</a>
|
||||||
|
|
||||||
**Sage 9 is in active development and is currently in beta. The `master` branch tracks Sage 9 development. If you want a stable version, use the [latest Sage 8 release](https://github.com/roots/sage/releases/latest).**
|
<a href="https://packagist.org/packages/roots/wordpress">
|
||||||
|
<img alt="roots/wordpress Packagist Downloads" src="https://img.shields.io/packagist/dt/roots/wordpress?label=roots%2Fwordpress%20downloads&logo=roots&logoColor=white&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||||
|
</a>
|
||||||
|
|
||||||
## Features
|
<img src="https://img.shields.io/badge/dynamic/json.svg?url=https://raw.githubusercontent.com/roots/bedrock/master/composer.json&label=wordpress&logo=roots&logoColor=white&query=$.require[%22roots/wordpress%22]&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||||
|
|
||||||
* Sass for stylesheets
|
<a href="https://github.com/roots/bedrock/actions/workflows/ci.yml">
|
||||||
* ES6 for JavaScript
|
<img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/roots/bedrock/ci.yml?branch=master&logo=github&label=CI&style=flat-square">
|
||||||
* [Webpack](https://webpack.github.io/) for compiling assets, optimizing images, and concatenating and minifying files
|
</a>
|
||||||
* [Browsersync](http://www.browsersync.io/) for synchronized browser testing
|
|
||||||
* [Laravel Blade](https://laravel.com/docs/5.3/blade) as a templating engine
|
|
||||||
* [Controller](https://github.com/soberwp/controller) for passing data to Blade templates
|
|
||||||
* CSS framework options:
|
|
||||||
* [Bootstrap 4](http://getbootstrap.com/)
|
|
||||||
* [Foundation](http://foundation.zurb.com/)
|
|
||||||
* [Tachyons](http://tachyons.io/)
|
|
||||||
* None (blank slate)
|
|
||||||
* Font Awesome (optional)
|
|
||||||
|
|
||||||
See a working example at [roots-example-project.com](https://roots-example-project.com/).
|
<a href="https://twitter.com/rootswp">
|
||||||
|
<img alt="Follow Roots" src="https://img.shields.io/badge/follow%20@rootswp-1da1f2?logo=twitter&logoColor=ffffff&message=&style=flat-square">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
## Requirements
|
<p align="center">WordPress boilerplate with Composer, easier configuration, and an improved folder structure</p>
|
||||||
|
|
||||||
Make sure all dependencies have been installed before moving on:
|
<p align="center">
|
||||||
|
<a href="https://roots.io/bedrock/">Website</a> <a href="https://roots.io/bedrock/docs/installation/">Documentation</a> <a href="https://github.com/roots/bedrock/releases">Releases</a> <a href="https://discourse.roots.io/">Community</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
* [WordPress](https://wordpress.org/) >= 4.7
|
## Sponsors
|
||||||
* [PHP](http://php.net/manual/en/install.php) >= 7.0
|
|
||||||
* [Composer](https://getcomposer.org/download/)
|
|
||||||
* [Node.js](http://nodejs.org/) >= 6.9.x
|
|
||||||
* [Yarn](https://yarnpkg.com/en/docs/install)
|
|
||||||
|
|
||||||
## Theme installation
|
Bedrock is an open source project and completely free to use. If you've benefited from our projects and would like to support our future endeavors, please consider [sponsoring Roots](https://github.com/sponsors/roots).
|
||||||
|
|
||||||
Install Sage using Composer from your WordPress themes directory (replace `your-theme-name` below with the name of your theme):
|
<div align="center">
|
||||||
|
<a href="https://carrot.com/"><img src="https://cdn.roots.io/app/uploads/carrot.svg" alt="Carrot" width="120" height="90"></a> <a href="https://wordpress.com/"><img src="https://cdn.roots.io/app/uploads/wordpress.svg" alt="WordPress.com" width="120" height="90"></a> <a href="https://worksitesafety.ca/careers/"><img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="120" height="90"></a> <a href="https://www.itineris.co.uk/"><img src="https://cdn.roots.io/app/uploads/itineris.svg" alt="Itineris" width="120" height="90"></a> <a href="https://bonsai.so/"><img src="https://cdn.roots.io/app/uploads/bonsai.svg" alt="Bonsai" width="120" height="90"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
```shell
|
## Overview
|
||||||
# @ app/themes/ or wp-content/themes/
|
|
||||||
$ composer create-project roots/sage your-theme-name dev-master
|
|
||||||
```
|
|
||||||
|
|
||||||
During theme installation you will have the options to:
|
Bedrock is a WordPress boilerplate for developers that want to manage their projects with Git and Composer. Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](http://12factor.net/) methodology, including the [WordPress specific version](https://roots.io/twelve-factor-wordpress/).
|
||||||
|
|
||||||
* Update theme headers (theme name, description, author, etc.)
|
- Better folder structure
|
||||||
* Select a CSS framework (Bootstrap, Foundation, Tachyons, none)
|
- Dependency management with [Composer](https://getcomposer.org)
|
||||||
* Add Font Awesome
|
- Easy WordPress configuration with environment specific files
|
||||||
* Configure Browsersync (path to theme, local development URL)
|
- Environment variables with [Dotenv](https://github.com/vlucas/phpdotenv)
|
||||||
|
- Autoloader for mu-plugins (use regular plugins as mu-plugins)
|
||||||
|
|
||||||
## Theme structure
|
## Getting Started
|
||||||
|
|
||||||
```shell
|
See the [Bedrock installation documentation](https://roots.io/bedrock/docs/installation/).
|
||||||
themes/your-theme-name/ # → Root of your Sage based theme
|
|
||||||
├── app/ # → Theme PHP
|
|
||||||
│ ├── lib/Sage/ # → Blade implementation, asset manifest
|
|
||||||
│ ├── admin.php # → Theme customizer setup
|
|
||||||
│ ├── filters.php # → Theme filters
|
|
||||||
│ ├── helpers.php # → Helper functions
|
|
||||||
│ └── setup.php # → Theme setup
|
|
||||||
├── composer.json # → Autoloading for `app/` files
|
|
||||||
├── composer.lock # → Composer lock file (never edit)
|
|
||||||
├── dist/ # → Built theme assets (never edit)
|
|
||||||
├── node_modules/ # → Node.js packages (never edit)
|
|
||||||
├── package.json # → Node.js dependencies and scripts
|
|
||||||
├── resources/ # → Theme assets and templates
|
|
||||||
│ ├── assets/ # → Front-end assets
|
|
||||||
│ │ ├── config.json # → Settings for compiled assets
|
|
||||||
│ │ ├── build/ # → Webpack and ESLint config
|
|
||||||
│ │ ├── fonts/ # → Theme fonts
|
|
||||||
│ │ ├── images/ # → Theme images
|
|
||||||
│ │ ├── scripts/ # → Theme JS
|
|
||||||
│ │ └── styles/ # → Theme stylesheets
|
|
||||||
│ ├── controllers/ # → Controller files
|
|
||||||
│ ├── functions.php # → Composer autoloader, theme includes
|
|
||||||
│ ├── index.php # → Never manually edit
|
|
||||||
│ ├── screenshot.png # → Theme screenshot for WP admin
|
|
||||||
│ ├── style.css # → Theme meta information
|
|
||||||
│ └── views/ # → Theme templates
|
|
||||||
│ ├── layouts/ # → Base templates
|
|
||||||
│ └── partials/ # → Partial templates
|
|
||||||
└── vendor/ # → Composer packages (never edit)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Theme setup
|
## Stay Connected
|
||||||
|
|
||||||
Edit `app/setup.php` to enable or disable theme features, setup navigation menus, post thumbnail sizes, and sidebars.
|
- Join us on Discord by [sponsoring us on GitHub](https://github.com/sponsors/roots)
|
||||||
|
- Participate on [Roots Discourse](https://discourse.roots.io/)
|
||||||
## Theme development
|
- Follow [@rootswp on Twitter](https://twitter.com/rootswp)
|
||||||
|
- Read the [Roots Blog](https://roots.io/blog/)
|
||||||
* Run `yarn` from the theme directory to install dependencies
|
- Subscribe to the [Roots Newsletter](https://roots.io/newsletter/)
|
||||||
* Update `resources/assets/config.json` settings:
|
|
||||||
* `devUrl` should reflect your local development hostname
|
|
||||||
* `publicPath` should reflect your WordPress folder structure (`/wp-content/themes/sage` for non-[Bedrock](https://roots.io/bedrock/) installs)
|
|
||||||
|
|
||||||
### Build commands
|
|
||||||
|
|
||||||
* `yarn run start` — Compile assets when file changes are made, start Browsersync session
|
|
||||||
* `yarn run build` — Compile and optimize the files in your assets directory
|
|
||||||
* `yarn run build:production` — Compile assets for production
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
Sage 8 documentation is available at [https://roots.io/sage/docs/](https://roots.io/sage/docs/).
|
|
||||||
|
|
||||||
Sage 9 documentation is currently in progress and can be viewed at [https://github.com/roots/docs/tree/sage-9/sage](https://github.com/roots/docs/tree/sage-9/sage).
|
|
||||||
|
|
||||||
Controller documentation is available at [https://github.com/soberwp/controller#usage](https://github.com/soberwp/controller#usage).
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Contributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started.
|
|
||||||
|
|
||||||
## Community
|
|
||||||
|
|
||||||
Keep track of development and community news.
|
|
||||||
|
|
||||||
* Participate on the [Roots Discourse](https://discourse.roots.io/)
|
|
||||||
* Follow [@rootswp on Twitter](https://twitter.com/rootswp)
|
|
||||||
* Read and subscribe to the [Roots Blog](https://roots.io/blog/)
|
|
||||||
* Subscribe to the [Roots Newsletter](https://roots.io/subscribe/)
|
|
||||||
* Listen to the [Roots Radio podcast](https://roots.io/podcast/)
|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Theme customizer
|
|
||||||
*/
|
|
||||||
add_action('customize_register', function (\WP_Customize_Manager $wp_customize) {
|
|
||||||
// Add postMessage support
|
|
||||||
$wp_customize->get_setting('blogname')->transport = 'postMessage';
|
|
||||||
$wp_customize->selective_refresh->add_partial('blogname', [
|
|
||||||
'selector' => '.brand',
|
|
||||||
'render_callback' => function () {
|
|
||||||
bloginfo('name');
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Customizer JS
|
|
||||||
*/
|
|
||||||
add_action('customize_preview_init', function () {
|
|
||||||
wp_enqueue_script('sage/customizer.js', asset_path('scripts/customizer.js'), ['customize-preview'], null, true);
|
|
||||||
});
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add <body> classes
|
|
||||||
*/
|
|
||||||
add_filter('body_class', function (array $classes) {
|
|
||||||
/** Add page slug if it doesn't exist */
|
|
||||||
if (is_single() || is_page() && !is_front_page()) {
|
|
||||||
if (!in_array(basename(get_permalink()), $classes)) {
|
|
||||||
$classes[] = basename(get_permalink());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Add class if sidebar is active */
|
|
||||||
if (display_sidebar()) {
|
|
||||||
$classes[] = 'sidebar-primary';
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Clean up class names for custom templates */
|
|
||||||
$classes = array_map(function ($class) {
|
|
||||||
return preg_replace(['/-blade(-php)?$/', '/^page-template-views/'], '', $class);
|
|
||||||
}, $classes);
|
|
||||||
|
|
||||||
return array_filter($classes);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add "… Continued" to the excerpt
|
|
||||||
*/
|
|
||||||
add_filter('excerpt_more', function () {
|
|
||||||
return ' … <a href="' . get_permalink() . '">' . __('Continued', 'sage') . '</a>';
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Template Hierarchy should search for .blade.php files
|
|
||||||
*/
|
|
||||||
collect([
|
|
||||||
'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date', 'home',
|
|
||||||
'frontpage', 'page', 'paged', 'search', 'single', 'singular', 'attachment'
|
|
||||||
])->map(function ($type) {
|
|
||||||
add_filter("{$type}_template_hierarchy", __NAMESPACE__.'\\filter_templates');
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Render page using Blade
|
|
||||||
*/
|
|
||||||
add_filter('template_include', function ($template) {
|
|
||||||
$data = collect(get_body_class())->reduce(function ($data, $class) use ($template) {
|
|
||||||
return apply_filters("sage/template/{$class}/data", $data, $template);
|
|
||||||
}, []);
|
|
||||||
if ($template) {
|
|
||||||
echo template($template, $data);
|
|
||||||
return get_stylesheet_directory().'/index.php';
|
|
||||||
}
|
|
||||||
return $template;
|
|
||||||
}, PHP_INT_MAX);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tell WordPress how to find the compiled path of comments.blade.php
|
|
||||||
*/
|
|
||||||
add_filter('comments_template', function ($comments_template) {
|
|
||||||
$comments_template = str_replace(
|
|
||||||
[get_stylesheet_directory(), get_template_directory()],
|
|
||||||
'',
|
|
||||||
$comments_template
|
|
||||||
);
|
|
||||||
return template_path(locate_template(["views/{$comments_template}", $comments_template]) ?: $comments_template);
|
|
||||||
});
|
|
||||||
160
app/helpers.php
160
app/helpers.php
@@ -1,160 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Roots\Sage\Container;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the sage container.
|
|
||||||
*
|
|
||||||
* @param string $abstract
|
|
||||||
* @param array $parameters
|
|
||||||
* @param Container $container
|
|
||||||
* @return Container|mixed
|
|
||||||
*/
|
|
||||||
function sage($abstract = null, $parameters = [], Container $container = null)
|
|
||||||
{
|
|
||||||
$container = $container ?: Container::getInstance();
|
|
||||||
if (!$abstract) {
|
|
||||||
return $container;
|
|
||||||
}
|
|
||||||
return $container->bound($abstract)
|
|
||||||
? $container->makeWith($abstract, $parameters)
|
|
||||||
: $container->makeWith("sage.{$abstract}", $parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get / set the specified configuration value.
|
|
||||||
*
|
|
||||||
* If an array is passed as the key, we will assume you want to set an array of values.
|
|
||||||
*
|
|
||||||
* @param array|string $key
|
|
||||||
* @param mixed $default
|
|
||||||
* @return mixed|\Roots\Sage\Config
|
|
||||||
* @copyright Taylor Otwell
|
|
||||||
* @link https://github.com/laravel/framework/blob/c0970285/src/Illuminate/Foundation/helpers.php#L254-L265
|
|
||||||
*/
|
|
||||||
function config($key = null, $default = null)
|
|
||||||
{
|
|
||||||
if (is_null($key)) {
|
|
||||||
return sage('config');
|
|
||||||
}
|
|
||||||
if (is_array($key)) {
|
|
||||||
return sage('config')->set($key);
|
|
||||||
}
|
|
||||||
return sage('config')->get($key, $default);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $file
|
|
||||||
* @param array $data
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function template($file, $data = [])
|
|
||||||
{
|
|
||||||
return sage('blade')->render($file, $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve path to a compiled blade view
|
|
||||||
* @param $file
|
|
||||||
* @param array $data
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function template_path($file, $data = [])
|
|
||||||
{
|
|
||||||
return sage('blade')->compiledPath($file, $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $asset
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function asset_path($asset)
|
|
||||||
{
|
|
||||||
return sage('assets')->getUri($asset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|string[] $templates Possible template files
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
function filter_templates($templates)
|
|
||||||
{
|
|
||||||
$paths = apply_filters('sage/filter_templates/paths', [
|
|
||||||
'views',
|
|
||||||
'resources/views'
|
|
||||||
]);
|
|
||||||
$paths_pattern = "#^(" . implode('|', $paths) . ")/#";
|
|
||||||
|
|
||||||
return collect($templates)
|
|
||||||
->map(function ($template) use ($paths_pattern) {
|
|
||||||
/** Remove .blade.php/.blade/.php from template names */
|
|
||||||
$template = preg_replace('#\.(blade\.?)?(php)?$#', '', ltrim($template));
|
|
||||||
|
|
||||||
/** Remove partial $paths from the beginning of template names */
|
|
||||||
if (strpos($template, '/')) {
|
|
||||||
$template = preg_replace($paths_pattern, '', $template);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $template;
|
|
||||||
})
|
|
||||||
->flatMap(function ($template) use ($paths) {
|
|
||||||
return collect($paths)
|
|
||||||
->flatMap(function ($path) use ($template) {
|
|
||||||
return [
|
|
||||||
"{$path}/{$template}.blade.php",
|
|
||||||
"{$path}/{$template}.php",
|
|
||||||
"{$template}.blade.php",
|
|
||||||
"{$template}.php",
|
|
||||||
];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
->filter()
|
|
||||||
->unique()
|
|
||||||
->all();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|string[] $templates Relative path to possible template files
|
|
||||||
* @return string Location of the template
|
|
||||||
*/
|
|
||||||
function locate_template($templates)
|
|
||||||
{
|
|
||||||
return \locate_template(filter_templates($templates));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine whether to show the sidebar
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
function display_sidebar()
|
|
||||||
{
|
|
||||||
static $display;
|
|
||||||
isset($display) || $display = apply_filters('sage/display_sidebar', false);
|
|
||||||
return $display;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Page titles
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function title()
|
|
||||||
{
|
|
||||||
if (is_home()) {
|
|
||||||
if ($home = get_option('page_for_posts', true)) {
|
|
||||||
return get_the_title($home);
|
|
||||||
}
|
|
||||||
return __('Latest Posts', 'sage');
|
|
||||||
}
|
|
||||||
if (is_archive()) {
|
|
||||||
return get_the_archive_title();
|
|
||||||
}
|
|
||||||
if (is_search()) {
|
|
||||||
return sprintf(__('Search Results for %s', 'sage'), get_search_query());
|
|
||||||
}
|
|
||||||
if (is_404()) {
|
|
||||||
return __('Not Found', 'sage');
|
|
||||||
}
|
|
||||||
return get_the_title();
|
|
||||||
}
|
|
||||||
128
app/setup.php
128
app/setup.php
@@ -1,128 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Roots\Sage\Container;
|
|
||||||
use Roots\Sage\Assets\JsonManifest;
|
|
||||||
use Roots\Sage\Template\Blade;
|
|
||||||
use Roots\Sage\Template\BladeProvider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Theme assets
|
|
||||||
*/
|
|
||||||
add_action('wp_enqueue_scripts', function () {
|
|
||||||
wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), false, null);
|
|
||||||
wp_enqueue_script('sage/main.js', asset_path('scripts/main.js'), ['jquery'], null, true);
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Theme setup
|
|
||||||
*/
|
|
||||||
add_action('after_setup_theme', function () {
|
|
||||||
/**
|
|
||||||
* Enable features from Soil when plugin is activated
|
|
||||||
* @link https://roots.io/plugins/soil/
|
|
||||||
*/
|
|
||||||
add_theme_support('soil-clean-up');
|
|
||||||
add_theme_support('soil-jquery-cdn');
|
|
||||||
add_theme_support('soil-nav-walker');
|
|
||||||
add_theme_support('soil-nice-search');
|
|
||||||
add_theme_support('soil-relative-urls');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable plugins to manage the document title
|
|
||||||
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag
|
|
||||||
*/
|
|
||||||
add_theme_support('title-tag');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register navigation menus
|
|
||||||
* @link https://developer.wordpress.org/reference/functions/register_nav_menus/
|
|
||||||
*/
|
|
||||||
register_nav_menus([
|
|
||||||
'primary_navigation' => __('Primary Navigation', 'sage')
|
|
||||||
]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable post thumbnails
|
|
||||||
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
|
|
||||||
*/
|
|
||||||
add_theme_support('post-thumbnails');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable HTML5 markup support
|
|
||||||
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#html5
|
|
||||||
*/
|
|
||||||
add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable selective refresh for widgets in customizer
|
|
||||||
* @link https://developer.wordpress.org/themes/advanced-topics/customizer-api/#theme-support-in-sidebars
|
|
||||||
*/
|
|
||||||
add_theme_support('customize-selective-refresh-widgets');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Use main stylesheet for visual editor
|
|
||||||
* @see resources/assets/styles/layouts/_tinymce.scss
|
|
||||||
*/
|
|
||||||
add_editor_style(asset_path('styles/main.css'));
|
|
||||||
}, 20);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register sidebars
|
|
||||||
*/
|
|
||||||
add_action('widgets_init', function () {
|
|
||||||
$config = [
|
|
||||||
'before_widget' => '<section class="widget %1$s %2$s">',
|
|
||||||
'after_widget' => '</section>',
|
|
||||||
'before_title' => '<h3>',
|
|
||||||
'after_title' => '</h3>'
|
|
||||||
];
|
|
||||||
register_sidebar([
|
|
||||||
'name' => __('Primary', 'sage'),
|
|
||||||
'id' => 'sidebar-primary'
|
|
||||||
] + $config);
|
|
||||||
register_sidebar([
|
|
||||||
'name' => __('Footer', 'sage'),
|
|
||||||
'id' => 'sidebar-footer'
|
|
||||||
] + $config);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the `$post` variable on each iteration of the loop.
|
|
||||||
* Note: updated value is only available for subsequently loaded views, such as partials
|
|
||||||
*/
|
|
||||||
add_action('the_post', function ($post) {
|
|
||||||
sage('blade')->share('post', $post);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup Sage options
|
|
||||||
*/
|
|
||||||
add_action('after_setup_theme', function () {
|
|
||||||
/**
|
|
||||||
* Add JsonManifest to Sage container
|
|
||||||
*/
|
|
||||||
sage()->singleton('sage.assets', function () {
|
|
||||||
return new JsonManifest(config('assets.manifest'), config('assets.uri'));
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add Blade to Sage container
|
|
||||||
*/
|
|
||||||
sage()->singleton('sage.blade', function (Container $app) {
|
|
||||||
$cachePath = config('view.compiled');
|
|
||||||
if (!file_exists($cachePath)) {
|
|
||||||
wp_mkdir_p($cachePath);
|
|
||||||
}
|
|
||||||
(new BladeProvider($app))->register();
|
|
||||||
return new Blade($app['view']);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create @asset() Blade directive
|
|
||||||
*/
|
|
||||||
sage('blade')->compiler()->directive('asset', function ($asset) {
|
|
||||||
return "<?= " . __NAMESPACE__ . "\\asset_path({$asset}); ?>";
|
|
||||||
});
|
|
||||||
});
|
|
||||||
112
composer.json
112
composer.json
@@ -1,46 +1,104 @@
|
|||||||
{
|
{
|
||||||
"name": "roots/sage",
|
"name": "roots/bedrock",
|
||||||
"type": "wordpress-theme",
|
"type": "project",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "WordPress starter theme with a modern development workflow",
|
"description": "WordPress boilerplate with Composer, easier configuration, and an improved folder structure",
|
||||||
"homepage": "https://roots.io/sage/",
|
"homepage": "https://roots.io/bedrock/",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
|
||||||
"name": "Ben Word",
|
|
||||||
"email": "ben@benword.com",
|
|
||||||
"homepage": "https://github.com/retlehs"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Scott Walkinshaw",
|
"name": "Scott Walkinshaw",
|
||||||
"email": "scott.walkinshaw@gmail.com",
|
"email": "scott.walkinshaw@gmail.com",
|
||||||
"homepage": "https://github.com/swalkinshaw"
|
"homepage": "https://github.com/swalkinshaw"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ben Word",
|
||||||
|
"email": "ben@benword.com",
|
||||||
|
"homepage": "https://github.com/retlehs"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"keywords": ["wordpress"],
|
"keywords": [
|
||||||
|
"bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
|
||||||
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/roots/sage/issues",
|
"issues": "https://github.com/roots/bedrock/issues",
|
||||||
"forum": "https://discourse.roots.io/"
|
"forum": "https://discourse.roots.io/category/bedrock"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"repositories": [
|
||||||
"psr-4": {
|
{
|
||||||
"App\\": "app/"
|
"type": "composer",
|
||||||
|
"url": "https://wpackagist.org",
|
||||||
|
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://packagist.badegg.uk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://wp-languages.github.io",
|
||||||
|
"only": [
|
||||||
|
"koodimonni-language/*",
|
||||||
|
"koodimonni-plugin-language/*",
|
||||||
|
"koodimonni-theme-language/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"composer",
|
||||||
|
"url":"https://connect.advancedcustomfields.com"
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7",
|
"php": ">=8.1",
|
||||||
"composer/installers": "~1.0",
|
"composer/installers": "^2.2",
|
||||||
"illuminate/support": "~5.4",
|
"vlucas/phpdotenv": "^5.5",
|
||||||
"roots/sage-lib": "~9.0.0-beta.3",
|
"oscarotero/env": "^2.1",
|
||||||
"soberwp/controller": "dev-master"
|
"roots/bedrock-autoloader": "^1.0",
|
||||||
|
"roots/bedrock-disallow-indexing": "^2.0",
|
||||||
|
"roots/wordpress": "6.8.2",
|
||||||
|
"roots/wp-config": "1.0.0",
|
||||||
|
"wpackagist-theme/twentytwentyfive": "^1.0",
|
||||||
|
"roots/acorn": "^4.3",
|
||||||
|
"koodimonni-language/core-en_gb": "^6.8",
|
||||||
|
"johnbillion/extended-cpts": "^5.1",
|
||||||
|
"wpackagist-plugin/autodescription": "^5.1",
|
||||||
|
"badegguk/bad-egg-digital-login-page": "^1.0",
|
||||||
|
"wpackagist-plugin/fluent-smtp": "^2.2",
|
||||||
|
"roots/acorn-prettify": "^1.0",
|
||||||
|
"wpackagist-plugin/contact-form-7": "^6.1",
|
||||||
|
"wpackagist-plugin/flamingo": "^2.6",
|
||||||
|
"wpackagist-plugin/resizable-editor-sidebar": "^1.02",
|
||||||
|
"wpengine/advanced-custom-fields-pro": "^6.5",
|
||||||
|
"ourcodeworld/name-that-color": "dev-master"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"squizlabs/php_codesniffer": "^2.8.0",
|
"roave/security-advisories": "dev-latest",
|
||||||
"roots/sage-installer": "~1.2"
|
"laravel/pint": "^1.18"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"allow-plugins": {
|
||||||
|
"composer/installers": true,
|
||||||
|
"roots/wordpress-core-installer": true,
|
||||||
|
"koodimonni/composer-dropin-installer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"extra": {
|
||||||
|
"installer-paths": {
|
||||||
|
"web/app/mu-plugins/{$name}/": [
|
||||||
|
"type:wordpress-muplugin",
|
||||||
|
"badegguk/bad-egg-digital-login-page",
|
||||||
|
"wpengine/advanced-custom-fields-pro"
|
||||||
|
],
|
||||||
|
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
|
||||||
|
"web/app/themes/{$name}/": ["type:wordpress-theme"]
|
||||||
|
},
|
||||||
|
"wordpress-install-dir": "web/wp"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": ["phpcs"],
|
"lint": "pint --test",
|
||||||
"post-create-project-cmd": [
|
"lint:fix": "pint"
|
||||||
"Roots\\Sage\\Installer\\ComposerScript::postCreateProject"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7891
composer.lock
generated
7891
composer.lock
generated
File diff suppressed because it is too large
Load Diff
188
config/application.php
Normal file
188
config/application.php
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Your base production configuration goes in this file. Environment-specific
|
||||||
|
* overrides go in their respective config/environments/{{WP_ENV}}.php file.
|
||||||
|
*
|
||||||
|
* A good default policy is to deviate from the production config as little as
|
||||||
|
* possible. Try to define as much of your configuration in this file as you
|
||||||
|
* can.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
|
|
||||||
|
use function Env\env;
|
||||||
|
|
||||||
|
// USE_ENV_ARRAY + CONVERT_* + STRIP_QUOTES
|
||||||
|
Env\Env::$options = 31;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Directory containing all of the site's files
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
$root_dir = dirname(__DIR__);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Document Root
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
$webroot_dir = $root_dir . '/web';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use Dotenv to set required environment variables and load .env file in root
|
||||||
|
* .env.local will override .env if it exists
|
||||||
|
*/
|
||||||
|
if (file_exists($root_dir . '/.env')) {
|
||||||
|
$env_files = file_exists($root_dir . '/.env.local')
|
||||||
|
? ['.env', '.env.local']
|
||||||
|
: ['.env'];
|
||||||
|
|
||||||
|
$repository = Dotenv\Repository\RepositoryBuilder::createWithNoAdapters()
|
||||||
|
->addAdapter(Dotenv\Repository\Adapter\EnvConstAdapter::class)
|
||||||
|
->addAdapter(Dotenv\Repository\Adapter\PutenvAdapter::class)
|
||||||
|
->immutable()
|
||||||
|
->make();
|
||||||
|
|
||||||
|
$dotenv = Dotenv\Dotenv::create($repository, $root_dir, $env_files, false);
|
||||||
|
$dotenv->load();
|
||||||
|
|
||||||
|
$dotenv->required(['WP_HOME', 'WP_SITEURL']);
|
||||||
|
if (!env('DATABASE_URL')) {
|
||||||
|
$dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up our global environment constant and load its config first
|
||||||
|
* Default: production
|
||||||
|
*/
|
||||||
|
define('WP_ENV', env('WP_ENV') ?: 'production');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Infer WP_ENVIRONMENT_TYPE based on WP_ENV
|
||||||
|
*/
|
||||||
|
if (!env('WP_ENVIRONMENT_TYPE') && in_array(WP_ENV, ['production', 'staging', 'development', 'local'])) {
|
||||||
|
Config::define('WP_ENVIRONMENT_TYPE', WP_ENV);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URLs
|
||||||
|
*/
|
||||||
|
Config::define('WP_HOME', env('WP_HOME'));
|
||||||
|
Config::define('WP_SITEURL', env('WP_SITEURL'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Content Directory
|
||||||
|
*/
|
||||||
|
Config::define('CONTENT_DIR', '/app');
|
||||||
|
Config::define('WP_CONTENT_DIR', $webroot_dir . Config::get('CONTENT_DIR'));
|
||||||
|
Config::define('WP_CONTENT_URL', Config::get('WP_HOME') . Config::get('CONTENT_DIR'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DB settings
|
||||||
|
*/
|
||||||
|
if (env('DB_SSL')) {
|
||||||
|
Config::define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
|
||||||
|
}
|
||||||
|
|
||||||
|
Config::define('DB_NAME', env('DB_NAME'));
|
||||||
|
Config::define('DB_USER', env('DB_USER'));
|
||||||
|
Config::define('DB_PASSWORD', env('DB_PASSWORD'));
|
||||||
|
Config::define('DB_HOST', env('DB_HOST') ?: 'localhost');
|
||||||
|
Config::define('DB_CHARSET', 'utf8mb4');
|
||||||
|
Config::define('DB_COLLATE', '');
|
||||||
|
$table_prefix = env('DB_PREFIX') ?: 'wp_';
|
||||||
|
|
||||||
|
if (env('DATABASE_URL')) {
|
||||||
|
$dsn = (object) parse_url(env('DATABASE_URL'));
|
||||||
|
|
||||||
|
Config::define('DB_NAME', substr($dsn->path, 1));
|
||||||
|
Config::define('DB_USER', $dsn->user);
|
||||||
|
Config::define('DB_PASSWORD', isset($dsn->pass) ? $dsn->pass : null);
|
||||||
|
Config::define('DB_HOST', isset($dsn->port) ? "{$dsn->host}:{$dsn->port}" : $dsn->host);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authentication Unique Keys and Salts
|
||||||
|
*/
|
||||||
|
Config::define('AUTH_KEY', env('AUTH_KEY'));
|
||||||
|
Config::define('SECURE_AUTH_KEY', env('SECURE_AUTH_KEY'));
|
||||||
|
Config::define('LOGGED_IN_KEY', env('LOGGED_IN_KEY'));
|
||||||
|
Config::define('NONCE_KEY', env('NONCE_KEY'));
|
||||||
|
Config::define('AUTH_SALT', env('AUTH_SALT'));
|
||||||
|
Config::define('SECURE_AUTH_SALT', env('SECURE_AUTH_SALT'));
|
||||||
|
Config::define('LOGGED_IN_SALT', env('LOGGED_IN_SALT'));
|
||||||
|
Config::define('NONCE_SALT', env('NONCE_SALT'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Settings
|
||||||
|
*/
|
||||||
|
Config::define('AUTOMATIC_UPDATER_DISABLED', true);
|
||||||
|
Config::define('DISABLE_WP_CRON', env('DISABLE_WP_CRON') ?: false);
|
||||||
|
|
||||||
|
// Disable the plugin and theme file editor in the admin
|
||||||
|
Config::define('DISALLOW_FILE_EDIT', true);
|
||||||
|
|
||||||
|
// Disable plugin and theme updates and installation from the admin
|
||||||
|
Config::define('DISALLOW_FILE_MODS', true);
|
||||||
|
|
||||||
|
// Limit the number of post revisions
|
||||||
|
Config::define('WP_POST_REVISIONS', env('WP_POST_REVISIONS') ?? true);
|
||||||
|
|
||||||
|
// Disable script concatenation
|
||||||
|
Config::define('CONCATENATE_SCRIPTS', false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debugging Settings
|
||||||
|
*/
|
||||||
|
Config::define('WP_DEBUG_DISPLAY', false);
|
||||||
|
Config::define('WP_DEBUG_LOG', false);
|
||||||
|
Config::define('SCRIPT_DEBUG', false);
|
||||||
|
ini_set('display_errors', '0');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow WordPress to detect HTTPS when used behind a reverse proxy or a load balancer
|
||||||
|
* See https://codex.wordpress.org/Function_Reference/is_ssl#Notes
|
||||||
|
*/
|
||||||
|
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||||
|
$_SERVER['HTTPS'] = 'on';
|
||||||
|
}
|
||||||
|
|
||||||
|
$env_config = __DIR__ . '/environments/' . WP_ENV . '.php';
|
||||||
|
|
||||||
|
if (file_exists($env_config)) {
|
||||||
|
require_once $env_config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Advanced Custom Fields Pro License
|
||||||
|
*/
|
||||||
|
Config::define('ACF_PRO_LICENSE', env('ACF_PRO_LICENSE'));
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* s3 uploads settings
|
||||||
|
*/
|
||||||
|
Config::define('S3_UPLOADS_BUCKET', env('S3_UPLOADS_BUCKET'));
|
||||||
|
Config::define('S3_UPLOADS_BUCKET_URL', env('S3_UPLOADS_BUCKET_URL'));
|
||||||
|
Config::define('S3_UPLOADS_REGION', env('S3_UPLOADS_REGION'));
|
||||||
|
Config::define('S3_UPLOADS_KEY', env('S3_UPLOADS_KEY'));
|
||||||
|
Config::define('S3_UPLOADS_SECRET', env('S3_UPLOADS_SECRET'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fluent SMTP Setings
|
||||||
|
*/
|
||||||
|
Config::define('FLUENTMAIL_SMTP_USERNAME', env('FLUENTMAIL_SMTP_USERNAME'));
|
||||||
|
Config::define('FLUENTMAIL_SMTP_PASSWORD', env('FLUENTMAIL_SMTP_PASSWORD'));
|
||||||
|
Config::define('FLUENTMAIL_SENDINBLUE_API_KEY', env('FLUENTMAIL_SENDINBLUE_API_KEY'));
|
||||||
|
|
||||||
|
Config::apply();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap WordPress
|
||||||
|
*/
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
define('ABSPATH', $webroot_dir . '/wp/');
|
||||||
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Assets Manifest
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Your asset manifest is used by Sage to assist WordPress and your views
|
|
||||||
| with rendering the correct URLs for your assets. This is especially
|
|
||||||
| useful for statically referencing assets with dynamically changing names
|
|
||||||
| as in the case of cache-busting.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'manifest' => get_theme_file_path().'/dist/assets.json',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Assets Path URI
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The asset manifest contains relative paths to your assets. This URI will
|
|
||||||
| be prepended when using Sage's asset management system. Change this if
|
|
||||||
| you are using a CDN.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'uri' => get_theme_file_uri().'/dist',
|
|
||||||
];
|
|
||||||
22
config/environments/development.php
Normal file
22
config/environments/development.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration overrides for WP_ENV === 'development'
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
|
|
||||||
|
use function Env\env;
|
||||||
|
|
||||||
|
Config::define('SAVEQUERIES', true);
|
||||||
|
Config::define('WP_DEBUG', true);
|
||||||
|
Config::define('WP_DEBUG_DISPLAY', true);
|
||||||
|
Config::define('WP_DEBUG_LOG', env('WP_DEBUG_LOG') ?? true);
|
||||||
|
Config::define('WP_DISABLE_FATAL_ERROR_HANDLER', true);
|
||||||
|
Config::define('SCRIPT_DEBUG', true);
|
||||||
|
Config::define('DISALLOW_INDEXING', true);
|
||||||
|
|
||||||
|
ini_set('display_errors', '1');
|
||||||
|
|
||||||
|
// Enable plugin and theme updates and installation from the admin
|
||||||
|
Config::define('DISALLOW_FILE_MODS', false);
|
||||||
18
config/environments/staging.php
Normal file
18
config/environments/staging.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration overrides for WP_ENV === 'staging'
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You should try to keep staging as close to production as possible. However,
|
||||||
|
* should you need to, you can always override production configuration values
|
||||||
|
* with `Config::define`.
|
||||||
|
*
|
||||||
|
* Example: `Config::define('WP_DEBUG', true);`
|
||||||
|
* Example: `Config::define('DISALLOW_FILE_MODS', false);`
|
||||||
|
*/
|
||||||
|
|
||||||
|
Config::define('DISALLOW_INDEXING', true);
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Theme Directory
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the absolute path to your theme directory.
|
|
||||||
|
|
|
||||||
| Example:
|
|
||||||
| /srv/www/example.com/current/web/app/themes/sage
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'dir' => get_theme_file_path(),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Theme Directory URI
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the web server URI to your theme directory.
|
|
||||||
|
|
|
||||||
| Example:
|
|
||||||
| https://example.com/app/themes/sage
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'uri' => get_theme_file_uri(),
|
|
||||||
];
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| View Storage Paths
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Most template systems load templates from disk. Here you may specify
|
|
||||||
| an array of paths that should be checked for your views.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'paths' => [
|
|
||||||
get_theme_file_path().'/resources/views',
|
|
||||||
get_parent_theme_file_path().'/resources/views',
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Compiled View Path
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This option determines where all the compiled Blade templates will be
|
|
||||||
| stored for your application. Typically, this is within the uploads
|
|
||||||
| directory. However, as usual, you are free to change this value.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'compiled' => wp_upload_dir()['basedir'].'/cache',
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| View Namespaces
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Blade has an underutilized feature that allows developers to add
|
|
||||||
| supplemental view paths that may contain conflictingly named views.
|
|
||||||
| These paths are prefixed with a namespace to get around the conflicts.
|
|
||||||
| A use case might be including views from within a plugin folder.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'namespaces' => [
|
|
||||||
/* Given the below example, in your views use something like: @include('WC::some.view.or.partial.here') */
|
|
||||||
// 'WC' => WP_PLUGIN_DIR.'/woocommerce/templates/',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
63
docker-compose.yml
Normal file
63
docker-compose.yml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
image: nginx:latest
|
||||||
|
container_name: ${APP_NAME}-nginx
|
||||||
|
ports:
|
||||||
|
- '80:80'
|
||||||
|
- '443:443'
|
||||||
|
volumes:
|
||||||
|
- "./docker/nginx/:/etc/nginx/templates/"
|
||||||
|
- ./:/var/www/html:rw,cached
|
||||||
|
- ./docker/certs:/etc/certs
|
||||||
|
environment:
|
||||||
|
- "NGINX_ENVSUBST_TEMPLATE_SUFFIX=.conf"
|
||||||
|
- "DOMAIN=${DOMAIN}"
|
||||||
|
depends_on:
|
||||||
|
- wordpress
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: mariadb:10.7
|
||||||
|
container_name: ${APP_NAME}-mysql
|
||||||
|
command: --lower_case_table_names=2
|
||||||
|
volumes:
|
||||||
|
- './docker/data/db:/var/lib/mysql:delegated'
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
|
||||||
|
- MYSQL_DATABASE=${DB_NAME}
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- '3306:3306'
|
||||||
|
|
||||||
|
wordpress:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/Dockerfile
|
||||||
|
container_name: ${APP_NAME}-wordpress
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www/html:rw,cached
|
||||||
|
- ./docker/config/php.ini:/usr/local/etc/php/conf.d/php.ini
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
phpmyadmin:
|
||||||
|
image: arm64v8/phpmyadmin
|
||||||
|
container_name: ${APP_NAME}-phpmyadmin
|
||||||
|
volumes:
|
||||||
|
- ./docker/config/phpmyadmin.ini:/usr/local/etc/php/conf.d/phpmyadmin.ini
|
||||||
|
environment:
|
||||||
|
PMA_HOST: "${DB_HOST}"
|
||||||
|
PMA_PORT: 3306
|
||||||
|
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
|
||||||
|
ports:
|
||||||
|
- '8082:80'
|
||||||
|
links:
|
||||||
|
- mysql:mysql
|
||||||
|
|
||||||
|
mailpit:
|
||||||
|
container_name: ${APP_NAME}-mailpit
|
||||||
|
image: axllent/mailpit
|
||||||
|
ports:
|
||||||
|
- "8025:8025"
|
||||||
|
- "1025:1025"
|
||||||
4
docker/.gitignore
vendored
Normal file
4
docker/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
certs/*
|
||||||
|
!certs/.gitkeep
|
||||||
|
data/*
|
||||||
|
!data/.gitkeep
|
||||||
21
docker/Dockerfile
Normal file
21
docker/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM urre/wordpress-nginx-docker-compose-image:1.4.0
|
||||||
|
|
||||||
|
# PHP Extensions
|
||||||
|
RUN docker-php-ext-configure calendar && docker-php-ext-install calendar
|
||||||
|
|
||||||
|
# Install wp-cli
|
||||||
|
RUN apt-get update && apt-get install -y sudo less mariadb-client
|
||||||
|
RUN curl -o /bin/wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
||||||
|
RUN chmod +x /bin/wp-cli.phar
|
||||||
|
RUN cd /bin && mv wp-cli.phar wp
|
||||||
|
RUN mkdir -p /var/www/.wp-cli/cache && chown www-data:www-data /var/www/.wp-cli/cache
|
||||||
|
|
||||||
|
# Install composer
|
||||||
|
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
|
||||||
|
|
||||||
|
# Forward Message to mailhog
|
||||||
|
RUN curl --location --output /usr/local/bin/mhsendmail https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 && \
|
||||||
|
chmod +x /usr/local/bin/mhsendmail
|
||||||
|
RUN echo 'sendmail_path="/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025 --from=no-reply@gbp.lo"' > /usr/local/etc/php/conf.d/mailhog.ini
|
||||||
|
|
||||||
|
# Note: Use docker-compose up -d --force-recreate --build when Dockerfile has changed.
|
||||||
351
docker/README.md
Normal file
351
docker/README.md
Normal file
@@ -0,0 +1,351 @@
|
|||||||
|
|
||||||
|
# Docker Compose and WordPress
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[](https://www.paypal.me/urbansanden)
|
||||||
|
|
||||||
|
Use WordPress locally with Docker using [Docker compose](https://docs.docker.com/compose/)
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
+ A `Dockerfile` for extending a base image and using a custom [Docker image](https://github.com/urre/wordpress-nginx-docker-compose-image) with an [automated build on Docker Hub](https://cloud.docker.com/repository/docker/urre/wordpress-nginx-docker-compose-image)
|
||||||
|
+ PHP 8.1
|
||||||
|
+ Custom domain and HTTPS support. So you can use for example [https://myapp.local](https://myapp.local)
|
||||||
|
+ Custom nginx config in `./nginx`
|
||||||
|
+ Custom PHP `php.ini` config in `./config`
|
||||||
|
+ Volumes for `nginx`, `wordpress` and `mariadb`
|
||||||
|
+ [Bedrock](https://roots.io/bedrock/) - modern development tools, easier configuration, and an improved secured folder structure for WordPress
|
||||||
|
+ Composer
|
||||||
|
+ [WP-CLI](https://wp-cli.org/) - WP-CLI is the command-line interface for WordPress.
|
||||||
|
+ [MailHog](https://github.com/mailhog/MailHog) - An email testing tool for developers. Configure your outgoing SMTP server and view your outgoing email in a web UI.
|
||||||
|
+ [PhpMyAdmin](https://www.phpmyadmin.net/) - free and open source administration tool for MySQL and MariaDB
|
||||||
|
- PhpMyAdmin config in `./config`
|
||||||
|
+ CLI script to create a SSL certificate
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Requirements</summary>
|
||||||
|
|
||||||
|
+ [Docker](https://www.docker.com/get-started)
|
||||||
|
+ [mkcert](https://github.com/FiloSottile/mkcert) for creating the SSL cert.
|
||||||
|
|
||||||
|
Install mkcert:
|
||||||
|
|
||||||
|
```
|
||||||
|
brew install mkcert
|
||||||
|
brew install nss # if you use Firefox
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Setup</summary>
|
||||||
|
|
||||||
|
### Setup Environment variables
|
||||||
|
|
||||||
|
Both step 1. and 2. below are required:
|
||||||
|
|
||||||
|
#### 1. For Docker and the CLI script (Required step)
|
||||||
|
|
||||||
|
Copy `.env.example` in the project root to `.env` and edit your preferences.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```dotenv
|
||||||
|
IP=127.0.0.1
|
||||||
|
APP_NAME=myapp
|
||||||
|
DOMAIN="myapp.local"
|
||||||
|
DB_HOST=mysql
|
||||||
|
DB_NAME=myapp
|
||||||
|
DB_ROOT_PASSWORD=password
|
||||||
|
DB_TABLE_PREFIX=wp_
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. For WordPress (Required step)
|
||||||
|
|
||||||
|
Edit `./src/.env.example` to your needs. During the `composer create-project` command described below, an `./src/.env` will be created.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```dotenv
|
||||||
|
DB_NAME='myapp'
|
||||||
|
DB_USER='root'
|
||||||
|
DB_PASSWORD='password'
|
||||||
|
|
||||||
|
# Optionally, you can use a data source name (DSN)
|
||||||
|
# When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables
|
||||||
|
# DATABASE_URL='mysql://database_user:database_password@database_host:database_port/database_name'
|
||||||
|
|
||||||
|
# Optional variables
|
||||||
|
DB_HOST='mysql'
|
||||||
|
# DB_PREFIX='wp_'
|
||||||
|
|
||||||
|
WP_ENV='development'
|
||||||
|
WP_HOME='https://myapp.local'
|
||||||
|
WP_SITEURL="${WP_HOME}/wp"
|
||||||
|
WP_DEBUG_LOG=/path/to/debug.log
|
||||||
|
|
||||||
|
# Generate your keys here: https://roots.io/salts.html
|
||||||
|
AUTH_KEY='generateme'
|
||||||
|
SECURE_AUTH_KEY='generateme'
|
||||||
|
LOGGED_IN_KEY='generateme'
|
||||||
|
NONCE_KEY='generateme'
|
||||||
|
AUTH_SALT='generateme'
|
||||||
|
SECURE_AUTH_SALT='generateme'
|
||||||
|
LOGGED_IN_SALT='generateme'
|
||||||
|
NONCE_SALT='generateme'
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Option 1). Use HTTPS with a custom domain</summary>
|
||||||
|
|
||||||
|
1. Create a SSL cert:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd cli
|
||||||
|
./create-cert.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
This script will create a locally-trusted development certificates. It requires no configuration.
|
||||||
|
|
||||||
|
> mkcert needs to be installed like described in Requirements. Read more for [Windows](https://github.com/FiloSottile/mkcert#windows) and [Linux](https://github.com/FiloSottile/mkcert#linux)
|
||||||
|
|
||||||
|
1b. Make sure your `/etc/hosts` file has a record for used domains. On Windows the hosts file can be find at `C:\Windows\System32\drivers\etc`. Make sure to open it with admin rights.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo nano /etc/hosts
|
||||||
|
```
|
||||||
|
|
||||||
|
Add your selected domain like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
127.0.0.1 myapp.local
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Continue on the Install step below
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Option 2). Use a simple config</summary>
|
||||||
|
|
||||||
|
1. Edit `nginx/default.conf.conf` to use this simpler config (without using a cert and HTTPS)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
root /var/www/html/web;
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass wordpress:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Edit the nginx service in `docker-compose.yml` to use port 80. 443 is not needed now.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nginx:
|
||||||
|
image: nginx:latest
|
||||||
|
container_name: ${APP_NAME}-nginx
|
||||||
|
ports:
|
||||||
|
- '80:80'
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Continue on the Install step below
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Install</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose run composer create-project
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Run</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
Docker Compose will now start all the services for you:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
Starting myapp-mysql ... done
|
||||||
|
Starting myapp-composer ... done
|
||||||
|
Starting myapp-phpmyadmin ... done
|
||||||
|
Starting myapp-wordpress ... done
|
||||||
|
Starting myapp-nginx ... done
|
||||||
|
Starting myapp-mailhog ... done
|
||||||
|
```
|
||||||
|
|
||||||
|
🚀 Open [https://myapp.local](https://myapp.local) in your browser
|
||||||
|
|
||||||
|
## PhpMyAdmin
|
||||||
|
|
||||||
|
PhpMyAdmin comes installed as a service in docker-compose.
|
||||||
|
|
||||||
|
🚀 Open [http://127.0.0.1:8082/](http://127.0.0.1:8082/) in your browser
|
||||||
|
|
||||||
|
## MailHog
|
||||||
|
|
||||||
|
MailHog comes installed as a service in docker-compose.
|
||||||
|
|
||||||
|
🚀 Open [http://0.0.0.0:8025/](http://0.0.0.0:8025/) in your browser
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Tools</summary>
|
||||||
|
|
||||||
|
### Update WordPress Core and Composer packages (plugins/themes)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose run composer update
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Use WP-CLI
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker exec -it myapp-wordpress bash
|
||||||
|
```
|
||||||
|
|
||||||
|
Login to the container
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wp search-replace https://olddomain.com https://newdomain.com --allow-root
|
||||||
|
```
|
||||||
|
|
||||||
|
Run a wp-cli command
|
||||||
|
|
||||||
|
> You can use this command first after you've installed WordPress using Composer as the example above.
|
||||||
|
|
||||||
|
### Update plugins and themes from wp-admin?
|
||||||
|
|
||||||
|
You can, but I recommend to use Composer for this only. But to enable this edit `./src/config/environments/development.php` (for example to use it in Dev)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
Config::define('DISALLOW_FILE_EDIT', false);
|
||||||
|
Config::define('DISALLOW_FILE_MODS', false);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Useful Docker Commands
|
||||||
|
|
||||||
|
When making changes to the Dockerfile, use:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d --force-recreate --build
|
||||||
|
```
|
||||||
|
|
||||||
|
Login to the docker container
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker exec -it myapp-wordpress bash
|
||||||
|
```
|
||||||
|
|
||||||
|
Stop
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose stop
|
||||||
|
```
|
||||||
|
|
||||||
|
Down (stop and remove)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
Cleanup
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose rm -v
|
||||||
|
```
|
||||||
|
|
||||||
|
Recreate
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose up -d --force-recreate
|
||||||
|
```
|
||||||
|
|
||||||
|
Rebuild docker container when Dockerfile has changed
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose up -d --force-recreate --build
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Changelog</summary>
|
||||||
|
|
||||||
|
#### 2022-05-28
|
||||||
|
- Use PHP 8.1 [Dockerfile](https://github.com/urre/wordpress-nginx-docker-compose-image/blob/master/Dockerfile) is updated.
|
||||||
|
#### 2022-05-28
|
||||||
|
- Use php:8.0-fpm-alpine as the base image on the image in Dockerfile [](https://hub.docker.com/repository/registry-1.docker.io/urre/wordpress-nginx-docker-compose-image/general)
|
||||||
|
#### 2022-05-28
|
||||||
|
- Updated the Docker image to use PHP 8
|
||||||
|
#### 2021-08-04
|
||||||
|
- Updated to WordPress 5.8.0
|
||||||
|
#### 2021-03-16
|
||||||
|
- Changed root `.env-example` to `.env.example` to match the git ignore patterns. Thanks [@scottnunemacher](https://github.com/scottnunemacher)
|
||||||
|
#### 2021-03-05
|
||||||
|
- Clarify steps in the readme
|
||||||
|
#### 2021-03-02
|
||||||
|
- Fixed a misstake so instead of `./src/.env-example`, it should be `./src/.env.example`.
|
||||||
|
- Redirect HTTP to HTTPS. Thanks [@humblecoder](https://github.com/humblecoder)
|
||||||
|
#### 2021-01-02
|
||||||
|
- Use `NGINX_ENVSUBST_TEMPLATE_SUFFIX`. Use a template and better substution of ENV variables in nginx config.
|
||||||
|
#### 2020-10-04
|
||||||
|
- Added mariadb-client (Solves [#54](https://github.com/urre/wordpress-nginx-docker-compose/issues/54))
|
||||||
|
#### 2020-09-15
|
||||||
|
- Updated Bedrock. Update WordPress to 5.5.1 and other composer updates.
|
||||||
|
#### 2020-07-12
|
||||||
|
- Added Mailhog. Thanks [@mortensassi](https://github.com/mortensassi)
|
||||||
|
#### 2020-05-03
|
||||||
|
- Added nginx gzip compression
|
||||||
|
#### 2020-04-19
|
||||||
|
- Added Windows support for creating SSH cert, trusting it and setting up the host file entry. Thanks to [@styssi](https://github.com/styssi)
|
||||||
|
#### 2020-04-12
|
||||||
|
- Remove port number from `DB_HOST`. Generated database connection error in macOS Catalina. Thanks to [@nirvanadev](https://github.com/nirvanadev)
|
||||||
|
- Add missing ENV variable from mariadb Thanks to [@vonwa](https://github.com/vonwa)
|
||||||
|
#### 2020-03-26
|
||||||
|
- Added phpMyAdmin config.Thanks to [@titoffanton](https://github.com/titoffanton)
|
||||||
|
#### 2020-02-06
|
||||||
|
- Readme improvements. Explain `/etc/hosts` better
|
||||||
|
#### 2020-01-30
|
||||||
|
- Use `Entrypoint` command in Docker Compose to replace the domain name in the nginx config. Removing the need to manually edit the domain name in the nginx conf. Now using the `.env` value `DOMAIN`
|
||||||
|
- Added APP_NAME in `.env-example` Thanks to [@Dave3o3](https://github.com/Dave3o3)
|
||||||
|
#### 2020-01-11
|
||||||
|
- Added `.env` support for specifying your own app name, domain etc in Docker and cli scripts.
|
||||||
|
- Added phpMyAdmin. Visit [http://127.0.0.1:8080/](http://127.0.0.1:8080/)
|
||||||
|
|
||||||
|
#### 2019-08-02
|
||||||
|
- Added Linux support. Thanks to [@faysal-ishtiaq](https://github.com/faysal-ishtiaq).
|
||||||
|
|
||||||
|
</details>
|
||||||
13
docker/cli/create-cert.sh
Executable file
13
docker/cli/create-cert.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source "../../.env"
|
||||||
|
|
||||||
|
DOMAIN=$(echo "$DOMAIN")
|
||||||
|
|
||||||
|
mkcert -install "${DOMAIN}"
|
||||||
|
|
||||||
|
mkdir -p ../certs
|
||||||
|
|
||||||
|
find . -type f -name "*.pem" -exec mv {} ../certs \;
|
||||||
6
docker/config/php.ini
Normal file
6
docker/config/php.ini
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
file_uploads = On
|
||||||
|
memory_limit = 512M
|
||||||
|
upload_max_filesize = 128M
|
||||||
|
post_max_size = 128M
|
||||||
|
max_execution_time = 600
|
||||||
|
client_max_body_size = 128M
|
||||||
2
docker/config/phpmyadmin.ini
Normal file
2
docker/config/phpmyadmin.ini
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
upload_max_filesize = 128M
|
||||||
|
post_max_size = 128M
|
||||||
79
docker/nginx/default.conf.conf
Normal file
79
docker/nginx/default.conf.conf
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name ${DOMAIN};
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name ${DOMAIN} www.${DOMAIN};
|
||||||
|
|
||||||
|
ssl_certificate /etc/certs/${DOMAIN}.pem;
|
||||||
|
ssl_certificate_key /etc/certs/${DOMAIN}-key.pem;
|
||||||
|
|
||||||
|
add_header Strict-Transport-Security "max-age=31536000" always;
|
||||||
|
|
||||||
|
ssl_session_cache shared:SSL:20m;
|
||||||
|
ssl_session_timeout 10m;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
|
||||||
|
|
||||||
|
root /var/www/html/web;
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_min_length 0;
|
||||||
|
gzip_types text/plain application/javascript text/css text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype;
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
location ~ /.well-known/acme-challenge {
|
||||||
|
allow all;
|
||||||
|
root /var/www/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_buffers 8 16k;
|
||||||
|
fastcgi_buffer_size 32k;
|
||||||
|
fastcgi_connect_timeout 60;
|
||||||
|
fastcgi_read_timeout 300;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass wordpress:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.ht {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /favicon.ico {
|
||||||
|
log_not_found off; access_log off;
|
||||||
|
}
|
||||||
|
location = /robots.txt {
|
||||||
|
log_not_found off; access_log off; allow all;
|
||||||
|
}
|
||||||
|
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
|
||||||
|
expires max;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
}
|
||||||
9705
package-lock.json
generated
9705
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
132
package.json
132
package.json
@@ -1,132 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "sage",
|
|
||||||
"version": "9.0.0-beta.3",
|
|
||||||
"author": "Roots <team@roots.io>",
|
|
||||||
"homepage": "https://roots.io/sage/",
|
|
||||||
"private": true,
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/roots/sage.git"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/roots/sage/issues"
|
|
||||||
},
|
|
||||||
"licenses": [
|
|
||||||
{
|
|
||||||
"type": "MIT",
|
|
||||||
"url": "http://opensource.org/licenses/MIT"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"browserslist": [
|
|
||||||
"last 2 versions",
|
|
||||||
"android 4",
|
|
||||||
"opera 12"
|
|
||||||
],
|
|
||||||
"eslintConfig": {
|
|
||||||
"root": true,
|
|
||||||
"extends": "eslint:recommended",
|
|
||||||
"globals": {
|
|
||||||
"wp": true
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"node": true,
|
|
||||||
"es6": true,
|
|
||||||
"amd": true,
|
|
||||||
"browser": true,
|
|
||||||
"jquery": true
|
|
||||||
},
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaFeatures": {
|
|
||||||
"globalReturn": true,
|
|
||||||
"generators": false,
|
|
||||||
"objectLiteralDuplicateProperties": false,
|
|
||||||
"experimentalObjectRestSpread": true
|
|
||||||
},
|
|
||||||
"ecmaVersion": 2017,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"import"
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"import/core-modules": [],
|
|
||||||
"import/ignore": [
|
|
||||||
"node_modules",
|
|
||||||
"\\.(coffee|scss|css|less|hbs|svg|json)$"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"comma-dangle": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"arrays": "always-multiline",
|
|
||||||
"objects": "always-multiline",
|
|
||||||
"imports": "always-multiline",
|
|
||||||
"exports": "always-multiline",
|
|
||||||
"functions": "ignore"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stylelint": {
|
|
||||||
"extends": "stylelint-config-standard",
|
|
||||||
"rules": {
|
|
||||||
"no-empty-source": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "webpack --progress --config resources/assets/build/webpack.config.js",
|
|
||||||
"build:production": "webpack --progress -p --config resources/assets/build/webpack.config.js",
|
|
||||||
"build:profile": "webpack --progress --profile --json --config resources/assets/build/webpack.config.js",
|
|
||||||
"start": "webpack --hide-modules --watch --config resources/assets/build/webpack.config.js",
|
|
||||||
"rmdist": "rimraf dist",
|
|
||||||
"lint": "npm run -s lint:scripts && npm run -s lint:styles",
|
|
||||||
"lint:scripts": "eslint resources/assets/scripts resources/assets/build",
|
|
||||||
"lint:styles": "stylelint resources/assets/styles/**/*.{css,sass,scss,sss,less}",
|
|
||||||
"test": "npm run -s lint"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 6.9.4"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"autoprefixer": "~7.1",
|
|
||||||
"browser-sync": "~2.18",
|
|
||||||
"browsersync-webpack-plugin": "^0.6.0",
|
|
||||||
"bs-html-injector": "~3.0",
|
|
||||||
"buble-loader": "^0.4.1",
|
|
||||||
"cache-loader": "~1.0",
|
|
||||||
"clean-webpack-plugin": "^0.1.16",
|
|
||||||
"copy-globs-webpack-plugin": "^0.2.0",
|
|
||||||
"css-loader": "^0.28.4",
|
|
||||||
"cssnano": "~4.0.0-rc.1",
|
|
||||||
"eslint": "~4.2",
|
|
||||||
"eslint-loader": "~1.9",
|
|
||||||
"eslint-plugin-import": "~2.7",
|
|
||||||
"extract-text-webpack-plugin": "~3.0",
|
|
||||||
"file-loader": "^0.11.2",
|
|
||||||
"imagemin-mozjpeg": "~6.0",
|
|
||||||
"imagemin-webpack-plugin": "~1.5.0-beta.0",
|
|
||||||
"import-glob": "~1.5",
|
|
||||||
"node-sass": "~4.5",
|
|
||||||
"postcss-loader": "~2.0",
|
|
||||||
"postcss-safe-parser": "~3.0",
|
|
||||||
"resolve-url-loader": "~2.1",
|
|
||||||
"rimraf": "~2.6",
|
|
||||||
"sass-loader": "~6.0",
|
|
||||||
"style-loader": "^0.18.2",
|
|
||||||
"stylelint": "~7.12",
|
|
||||||
"stylelint-config-standard": "~16.0",
|
|
||||||
"stylelint-webpack-plugin": "^0.8.0",
|
|
||||||
"url-loader": "^0.5.9",
|
|
||||||
"webpack": "~3.3",
|
|
||||||
"webpack-assets-manifest": "^0.7.0",
|
|
||||||
"webpack-dev-middleware": "~1.11",
|
|
||||||
"webpack-hot-middleware": "~2.18",
|
|
||||||
"webpack-merge": "~4.1",
|
|
||||||
"yargs": "~8.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"bootstrap": "^4.0.0-alpha.6",
|
|
||||||
"jquery": "1.12.4 - 3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
71
phpcs.xml
71
phpcs.xml
@@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<ruleset name="Roots">
|
|
||||||
<description>Roots Coding Standards</description>
|
|
||||||
|
|
||||||
<!-- Scan these files -->
|
|
||||||
<file>resources/functions.php</file>
|
|
||||||
<file>resources/index.php</file>
|
|
||||||
<file>app</file>
|
|
||||||
<file>resources/views</file>
|
|
||||||
|
|
||||||
<!-- Show colors in console -->
|
|
||||||
<arg value="-colors"/>
|
|
||||||
|
|
||||||
<!-- Show sniff codes in all reports -->
|
|
||||||
<arg value="s"/>
|
|
||||||
|
|
||||||
<!-- Use PSR-2 as a base -->
|
|
||||||
<rule ref="PSR2"/>
|
|
||||||
|
|
||||||
<!-- Exclusions below are for resources/views/ folder -->
|
|
||||||
|
|
||||||
<!-- Allow php files without any PHP in them -->
|
|
||||||
<rule ref="Internal.NoCodeFound">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Allow braces on same line for named functions -->
|
|
||||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Allow closing braces to be on the same line -->
|
|
||||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Disable newline after opening brace -->
|
|
||||||
<rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Allow multiple PHP statements in the same line -->
|
|
||||||
<rule ref="Generic.Formatting.DisallowMultipleStatements.SameLine">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Disable PSR-2 indentation rules that are buggy with 2 spaces -->
|
|
||||||
<rule ref="PSR2.ControlStructures.SwitchDeclaration.BreakIndent">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Don't require a blank line after the last `use` -->
|
|
||||||
<rule ref="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Allow long lines -->
|
|
||||||
<rule ref="Generic.Files.LineLength.TooLong">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Ignore indentation rules -->
|
|
||||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- Allow PHP closing tags -->
|
|
||||||
<rule ref="PSR2.Files.ClosingTag.NotAllowed">
|
|
||||||
<exclude-pattern>resources/views</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
</ruleset>
|
|
||||||
9
pint.json
Normal file
9
pint.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"preset": "per",
|
||||||
|
"exclude": [
|
||||||
|
"web/wp",
|
||||||
|
"web/app/mu-plugins/bedrock-disallow-indexing",
|
||||||
|
"web/app/plugins",
|
||||||
|
"web/app/themes/twentytwentyfive"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"root": false,
|
|
||||||
"rules": {
|
|
||||||
"import/no-extraneous-dependencies": 0,
|
|
||||||
"prefer-rest-params": 0,
|
|
||||||
"comma-dangle": ["error", {
|
|
||||||
"arrays": "always-multiline",
|
|
||||||
"objects": "always-multiline",
|
|
||||||
"imports": "always-multiline",
|
|
||||||
"exports": "always-multiline",
|
|
||||||
"functions": "ignore"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
const path = require('path');
|
|
||||||
const { argv } = require('yargs');
|
|
||||||
const merge = require('webpack-merge');
|
|
||||||
|
|
||||||
const desire = require('./util/desire');
|
|
||||||
|
|
||||||
const userConfig = merge(desire(`${__dirname}/../config`), desire(`${__dirname}/../config-local`));
|
|
||||||
|
|
||||||
const isProduction = !!((argv.env && argv.env.production) || argv.p);
|
|
||||||
const rootPath = (userConfig.paths && userConfig.paths.root)
|
|
||||||
? userConfig.paths.root
|
|
||||||
: process.cwd();
|
|
||||||
|
|
||||||
const config = merge({
|
|
||||||
open: true,
|
|
||||||
copy: 'images/**/*',
|
|
||||||
proxyUrl: 'http://localhost:3000',
|
|
||||||
cacheBusting: '[name]_[hash]',
|
|
||||||
paths: {
|
|
||||||
root: rootPath,
|
|
||||||
assets: path.join(rootPath, 'resources/assets'),
|
|
||||||
dist: path.join(rootPath, 'dist'),
|
|
||||||
},
|
|
||||||
enabled: {
|
|
||||||
sourceMaps: !isProduction,
|
|
||||||
optimize: isProduction,
|
|
||||||
cacheBusting: isProduction,
|
|
||||||
watcher: !!argv.watch,
|
|
||||||
},
|
|
||||||
watch: [],
|
|
||||||
}, userConfig);
|
|
||||||
|
|
||||||
module.exports = merge(config, {
|
|
||||||
env: Object.assign({ production: isProduction, development: !isProduction }, argv.env),
|
|
||||||
publicPath: `${config.publicPath}/${path.basename(config.paths.dist)}/`,
|
|
||||||
manifest: {},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === undefined) {
|
|
||||||
process.env.NODE_ENV = isProduction ? 'production' : 'development';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If your publicPath differs between environments, but you know it at compile time,
|
|
||||||
* then set SAGE_DIST_PATH as an environment variable before compiling.
|
|
||||||
* Example:
|
|
||||||
* SAGE_DIST_PATH=/wp-content/themes/sage/dist yarn build:production
|
|
||||||
*/
|
|
||||||
if (process.env.SAGE_DIST_PATH) {
|
|
||||||
module.exports.publicPath = process.env.SAGE_DIST_PATH;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If you don't know your publicPath at compile time, then uncomment the lines
|
|
||||||
* below and use WordPress's wp_localize_script() to set SAGE_DIST_PATH global.
|
|
||||||
* Example:
|
|
||||||
* wp_localize_script('sage/main.js', 'SAGE_DIST_PATH', get_theme_file_uri('dist/'))
|
|
||||||
*/
|
|
||||||
// Object.keys(module.exports.entry).forEach(id =>
|
|
||||||
// module.exports.entry[id].unshift(path.join(__dirname, 'helpers/public-path.js')));
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
const hotMiddlewareScript = require('webpack-hot-middleware/client?noInfo=true&timeout=20000&reload=true');
|
|
||||||
|
|
||||||
hotMiddlewareScript.subscribe(event => {
|
|
||||||
if (event.action === 'reload') {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/* eslint-env browser */
|
|
||||||
/* globals SAGE_DIST_PATH */
|
|
||||||
|
|
||||||
/** Dynamically set absolute public path from current protocol and host */
|
|
||||||
if (SAGE_DIST_PATH) {
|
|
||||||
__webpack_public_path__ = SAGE_DIST_PATH; // eslint-disable-line no-undef, camelcase
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
const cssnanoConfig = {
|
|
||||||
preset: ['default', { discardComments: { removeAll: true } }]
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = ({ file, options }) => {
|
|
||||||
return {
|
|
||||||
parser: options.enabled.optimize ? 'postcss-safe-parser' : undefined,
|
|
||||||
plugins: {
|
|
||||||
cssnano: options.enabled.optimize ? cssnanoConfig : false,
|
|
||||||
autoprefixer: true,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/**
|
|
||||||
* Loop through webpack entry
|
|
||||||
* and add the hot middleware
|
|
||||||
* @param {Object} entry webpack entry
|
|
||||||
* @return {Object} entry with hot middleware
|
|
||||||
*/
|
|
||||||
module.exports = (entry) => {
|
|
||||||
const results = {};
|
|
||||||
|
|
||||||
Object.keys(entry).forEach((name) => {
|
|
||||||
results[name] = Array.isArray(entry[name]) ? entry[name].slice(0) : [entry[name]];
|
|
||||||
results[name].unshift(`${__dirname}/../helpers/hmr-client.js`);
|
|
||||||
});
|
|
||||||
return results;
|
|
||||||
};
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
const path = require('path');
|
|
||||||
|
|
||||||
module.exports = (key, value) => {
|
|
||||||
if (typeof value === 'string') {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
const manifest = value;
|
|
||||||
/**
|
|
||||||
* Hack to prepend scripts/ or styles/ to manifest keys
|
|
||||||
*
|
|
||||||
* This might need to be reworked at some point.
|
|
||||||
*
|
|
||||||
* Before:
|
|
||||||
* {
|
|
||||||
* "main.js": "scripts/main_abcdef.js"
|
|
||||||
* "main.css": "styles/main_abcdef.css"
|
|
||||||
* }
|
|
||||||
* After:
|
|
||||||
* {
|
|
||||||
* "scripts/main.js": "scripts/main_abcdef.js"
|
|
||||||
* "styles/main.css": "styles/main_abcdef.css"
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
Object.keys(manifest).forEach((src) => {
|
|
||||||
const sourcePath = path.basename(path.dirname(src));
|
|
||||||
const targetPath = path.basename(path.dirname(manifest[src]));
|
|
||||||
if (sourcePath === targetPath) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
manifest[`${targetPath}/${src}`] = manifest[src];
|
|
||||||
delete manifest[src];
|
|
||||||
});
|
|
||||||
return manifest;
|
|
||||||
};
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/**
|
|
||||||
* @export
|
|
||||||
* @param {string} dependency
|
|
||||||
* @param {any} [fallback]
|
|
||||||
* @return {any}
|
|
||||||
*/
|
|
||||||
module.exports = (dependency, fallback) => {
|
|
||||||
try {
|
|
||||||
require.resolve(dependency);
|
|
||||||
} catch (err) {
|
|
||||||
return fallback;
|
|
||||||
}
|
|
||||||
return require(dependency); // eslint-disable-line import/no-dynamic-require
|
|
||||||
};
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
'use strict'; // eslint-disable-line
|
|
||||||
|
|
||||||
const webpack = require('webpack');
|
|
||||||
const merge = require('webpack-merge');
|
|
||||||
const CleanPlugin = require('clean-webpack-plugin');
|
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
||||||
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
||||||
const CopyGlobsPlugin = require('copy-globs-webpack-plugin');
|
|
||||||
|
|
||||||
const config = require('./config');
|
|
||||||
|
|
||||||
const assetsFilenames = (config.enabled.cacheBusting) ? config.cacheBusting : '[name]';
|
|
||||||
|
|
||||||
let webpackConfig = {
|
|
||||||
context: config.paths.assets,
|
|
||||||
entry: config.entry,
|
|
||||||
devtool: (config.enabled.sourceMaps ? '#source-map' : undefined),
|
|
||||||
output: {
|
|
||||||
path: config.paths.dist,
|
|
||||||
publicPath: config.publicPath,
|
|
||||||
filename: `scripts/${assetsFilenames}.js`,
|
|
||||||
},
|
|
||||||
stats: {
|
|
||||||
hash: false,
|
|
||||||
version: false,
|
|
||||||
timings: false,
|
|
||||||
children: false,
|
|
||||||
errors: false,
|
|
||||||
errorDetails: false,
|
|
||||||
warnings: false,
|
|
||||||
chunks: false,
|
|
||||||
modules: false,
|
|
||||||
reasons: false,
|
|
||||||
source: false,
|
|
||||||
publicPath: false,
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
enforce: 'pre',
|
|
||||||
test: /\.js$/,
|
|
||||||
include: config.paths.assets,
|
|
||||||
use: 'eslint',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
enforce: 'pre',
|
|
||||||
test: /\.(js|s?[ca]ss)$/,
|
|
||||||
include: config.paths.assets,
|
|
||||||
loader: 'import-glob',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
exclude: [/(node_modules|bower_components)(?)/],
|
|
||||||
use: [
|
|
||||||
{ loader: 'cache' },
|
|
||||||
{ loader: 'buble', options: { objectAssign: 'Object.assign' } },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.css$/,
|
|
||||||
include: config.paths.assets,
|
|
||||||
use: ExtractTextPlugin.extract({
|
|
||||||
fallback: 'style',
|
|
||||||
use: [
|
|
||||||
{ loader: 'cache' },
|
|
||||||
{ loader: 'css', options: { sourceMap: config.enabled.sourceMaps } },
|
|
||||||
{
|
|
||||||
loader: 'postcss', options: {
|
|
||||||
config: { path: __dirname, ctx: config },
|
|
||||||
sourceMap: config.enabled.sourceMaps,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.scss$/,
|
|
||||||
include: config.paths.assets,
|
|
||||||
use: ExtractTextPlugin.extract({
|
|
||||||
fallback: 'style',
|
|
||||||
use: [
|
|
||||||
{ loader: 'cache' },
|
|
||||||
{ loader: 'css', options: { sourceMap: config.enabled.sourceMaps } },
|
|
||||||
{
|
|
||||||
loader: 'postcss', options: {
|
|
||||||
config: { path: __dirname, ctx: config },
|
|
||||||
sourceMap: config.enabled.sourceMaps,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ loader: 'resolve-url', options: { sourceMap: config.enabled.sourceMaps } },
|
|
||||||
{ loader: 'sass', options: { sourceMap: config.enabled.sourceMaps } },
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
|
|
||||||
include: config.paths.assets,
|
|
||||||
loader: 'url',
|
|
||||||
options: {
|
|
||||||
limit: 4096,
|
|
||||||
name: `[path]${assetsFilenames}.[ext]`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
|
|
||||||
include: /node_modules|bower_components/,
|
|
||||||
loader: 'url',
|
|
||||||
options: {
|
|
||||||
limit: 4096,
|
|
||||||
outputPath: 'vendor/',
|
|
||||||
name: `${config.cacheBusting}.[ext]`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
modules: [
|
|
||||||
config.paths.assets,
|
|
||||||
'node_modules',
|
|
||||||
'bower_components',
|
|
||||||
],
|
|
||||||
enforceExtension: false,
|
|
||||||
},
|
|
||||||
resolveLoader: {
|
|
||||||
moduleExtensions: ['-loader'],
|
|
||||||
},
|
|
||||||
externals: {
|
|
||||||
jquery: 'jQuery',
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
new CleanPlugin([config.paths.dist], {
|
|
||||||
root: config.paths.root,
|
|
||||||
verbose: false,
|
|
||||||
}),
|
|
||||||
/**
|
|
||||||
* It would be nice to switch to copy-webpack-plugin, but
|
|
||||||
* unfortunately it doesn't provide a reliable way of
|
|
||||||
* tracking the before/after file names
|
|
||||||
*/
|
|
||||||
new CopyGlobsPlugin({
|
|
||||||
pattern: config.copy,
|
|
||||||
output: `[path]${assetsFilenames}.[ext]`,
|
|
||||||
manifest: config.manifest,
|
|
||||||
}),
|
|
||||||
new ExtractTextPlugin({
|
|
||||||
filename: `styles/${assetsFilenames}.css`,
|
|
||||||
allChunks: true,
|
|
||||||
disable: (config.enabled.watcher),
|
|
||||||
}),
|
|
||||||
new webpack.ProvidePlugin({
|
|
||||||
$: 'jquery',
|
|
||||||
jQuery: 'jquery',
|
|
||||||
'window.jQuery': 'jquery',
|
|
||||||
Tether: 'tether',
|
|
||||||
'window.Tether': 'tether',
|
|
||||||
}),
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
|
||||||
minimize: config.enabled.optimize,
|
|
||||||
debug: config.enabled.watcher,
|
|
||||||
stats: { colors: true },
|
|
||||||
}),
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
|
||||||
test: /\.s?css$/,
|
|
||||||
options: {
|
|
||||||
output: { path: config.paths.dist },
|
|
||||||
context: config.paths.assets,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
|
||||||
test: /\.js$/,
|
|
||||||
options: {
|
|
||||||
eslint: { failOnWarning: false, failOnError: true },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
new StyleLintPlugin({
|
|
||||||
failOnError: !config.enabled.watcher,
|
|
||||||
syntax: 'scss',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
/* eslint-disable global-require */ /** Let's only load dependencies as needed */
|
|
||||||
|
|
||||||
if (config.enabled.optimize) {
|
|
||||||
webpackConfig = merge(webpackConfig, require('./webpack.config.optimize'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.env.production) {
|
|
||||||
webpackConfig.plugins.push(new webpack.NoEmitOnErrorsPlugin());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.enabled.cacheBusting) {
|
|
||||||
const WebpackAssetsManifest = require('webpack-assets-manifest');
|
|
||||||
|
|
||||||
webpackConfig.plugins.push(
|
|
||||||
new WebpackAssetsManifest({
|
|
||||||
output: 'assets.json',
|
|
||||||
space: 2,
|
|
||||||
writeToDisk: false,
|
|
||||||
assets: config.manifest,
|
|
||||||
replacer: require('./util/assetManifestsFormatter'),
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.enabled.watcher) {
|
|
||||||
webpackConfig.entry = require('./util/addHotMiddleware')(webpackConfig.entry);
|
|
||||||
webpackConfig = merge(webpackConfig, require('./webpack.config.watch'));
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = webpackConfig;
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
'use strict'; // eslint-disable-line
|
|
||||||
|
|
||||||
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
|
|
||||||
const imageminMozjpeg = require('imagemin-mozjpeg');
|
|
||||||
|
|
||||||
const config = require('./config');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
plugins: [
|
|
||||||
new ImageminPlugin({
|
|
||||||
optipng: { optimizationLevel: 7 },
|
|
||||||
gifsicle: { optimizationLevel: 3 },
|
|
||||||
pngquant: { quality: '65-90', speed: 4 },
|
|
||||||
svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
|
|
||||||
plugins: [imageminMozjpeg({ quality: 75 })],
|
|
||||||
disable: (config.enabled.watcher),
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
const url = require('url');
|
|
||||||
const webpack = require('webpack');
|
|
||||||
const BrowserSyncPlugin = require('browsersync-webpack-plugin');
|
|
||||||
|
|
||||||
const config = require('./config');
|
|
||||||
|
|
||||||
const target = process.env.DEVURL || config.devUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We do this to enable injection over SSL.
|
|
||||||
*/
|
|
||||||
if (url.parse(target).protocol === 'https:') {
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
output: {
|
|
||||||
pathinfo: true,
|
|
||||||
publicPath: config.proxyUrl + config.publicPath,
|
|
||||||
},
|
|
||||||
devtool: '#cheap-module-source-map',
|
|
||||||
stats: false,
|
|
||||||
plugins: [
|
|
||||||
new webpack.optimize.OccurrenceOrderPlugin(),
|
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
|
||||||
new BrowserSyncPlugin({
|
|
||||||
target,
|
|
||||||
open: config.open,
|
|
||||||
proxyUrl: config.proxyUrl,
|
|
||||||
watch: config.watch,
|
|
||||||
delay: 500,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"entry": {
|
|
||||||
"main": [
|
|
||||||
"./scripts/main.js",
|
|
||||||
"./styles/main.scss"
|
|
||||||
],
|
|
||||||
"customizer": [
|
|
||||||
"./scripts/customizer.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"publicPath": "/app/themes/sage",
|
|
||||||
"devUrl": "http://example.dev",
|
|
||||||
"proxyUrl": "http://localhost:3000",
|
|
||||||
"cacheBusting": "[name]_[hash:8]",
|
|
||||||
"watch": [
|
|
||||||
"app/**/*.php",
|
|
||||||
"config/**/*.php",
|
|
||||||
"resources/controllers/**/*.php",
|
|
||||||
"resources/views/**/*.php"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
import 'bootstrap';
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import $ from 'jquery';
|
|
||||||
|
|
||||||
wp.customize('blogname', (value) => {
|
|
||||||
value.bind(to => $('.brand').text(to));
|
|
||||||
});
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
// import external dependencies
|
|
||||||
import 'jquery';
|
|
||||||
|
|
||||||
// Import everything from autoload
|
|
||||||
import "./autoload/**/*"
|
|
||||||
|
|
||||||
// import local dependencies
|
|
||||||
import Router from './util/Router';
|
|
||||||
import common from './routes/common';
|
|
||||||
import home from './routes/home';
|
|
||||||
import aboutUs from './routes/about';
|
|
||||||
|
|
||||||
/** Populate Router instance with DOM routes */
|
|
||||||
const routes = new Router({
|
|
||||||
// All pages
|
|
||||||
common,
|
|
||||||
// Home page
|
|
||||||
home,
|
|
||||||
// About Us page, note the change from about-us to aboutUs.
|
|
||||||
aboutUs,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Load Events
|
|
||||||
jQuery(document).ready(() => routes.loadEvents());
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export default {
|
|
||||||
init() {
|
|
||||||
// JavaScript to be fired on the about us page
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
export default {
|
|
||||||
init() {
|
|
||||||
// JavaScript to be fired on all pages
|
|
||||||
},
|
|
||||||
finalize() {
|
|
||||||
// JavaScript to be fired on all pages, after page specific JS is fired
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
export default {
|
|
||||||
init() {
|
|
||||||
// JavaScript to be fired on the home page
|
|
||||||
},
|
|
||||||
finalize() {
|
|
||||||
// JavaScript to be fired on the home page, after the init JS
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
import camelCase from './camelCase';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DOM-based Routing
|
|
||||||
*
|
|
||||||
* Based on {@link http://goo.gl/EUTi53|Markup-based Unobtrusive Comprehensive DOM-ready Execution} by Paul Irish
|
|
||||||
*
|
|
||||||
* The routing fires all common scripts, followed by the page specific scripts.
|
|
||||||
* Add additional events for more control over timing e.g. a finalize event
|
|
||||||
*/
|
|
||||||
class Router {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new Router
|
|
||||||
* @param {Object} routes
|
|
||||||
*/
|
|
||||||
constructor(routes) {
|
|
||||||
this.routes = routes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fire Router events
|
|
||||||
* @param {string} route DOM-based route derived from body classes (`<body class="...">`)
|
|
||||||
* @param {string} [event] Events on the route. By default, `init` and `finalize` events are called.
|
|
||||||
* @param {string} [arg] Any custom argument to be passed to the event.
|
|
||||||
*/
|
|
||||||
fire(route, event = 'init', arg) {
|
|
||||||
const fire = route !== '' && this.routes[route] && typeof this.routes[route][event] === 'function';
|
|
||||||
if (fire) {
|
|
||||||
this.routes[route][event](arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically load and fire Router events
|
|
||||||
*
|
|
||||||
* Events are fired in the following order:
|
|
||||||
* * common init
|
|
||||||
* * page-specific init
|
|
||||||
* * page-specific finalize
|
|
||||||
* * common finalize
|
|
||||||
*/
|
|
||||||
loadEvents() {
|
|
||||||
// Fire common init JS
|
|
||||||
this.fire('common');
|
|
||||||
|
|
||||||
// Fire page-specific init JS, and then finalize JS
|
|
||||||
document.body.className
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/-/g, '_')
|
|
||||||
.split(/\s+/)
|
|
||||||
.map(camelCase)
|
|
||||||
.forEach((className) => {
|
|
||||||
this.fire(className);
|
|
||||||
this.fire(className, 'finalize');
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fire common finalize JS
|
|
||||||
this.fire('common', 'finalize');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Router
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/**
|
|
||||||
* the most terrible camelizer on the internet, guaranteed!
|
|
||||||
* @param {string} str String that isn't camel-case, e.g., CAMeL_CaSEiS-harD
|
|
||||||
* @return {string} String converted to camel-case, e.g., camelCaseIsHard
|
|
||||||
*/
|
|
||||||
export default str => `${str.charAt(0).toLowerCase()}${str.replace(/[\W_]/g, '|').split('|')
|
|
||||||
.map(part => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)
|
|
||||||
.join('')
|
|
||||||
.slice(1)}`;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
@import "~bootstrap/scss/bootstrap";
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/** Colors */
|
|
||||||
$brand-primary: #27ae60;
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
.comment-list {
|
|
||||||
@extend .list-unstyled;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment-list ol {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment-form p {
|
|
||||||
@extend .form-group;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment-form input[type="text"],
|
|
||||||
.comment-form input[type="email"],
|
|
||||||
.comment-form input[type="url"],
|
|
||||||
.comment-form textarea {
|
|
||||||
@extend .form-control;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment-form input[type="submit"] {
|
|
||||||
@extend .btn;
|
|
||||||
@extend .btn-secondary;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/** Search form */
|
|
||||||
.search-form {
|
|
||||||
@extend .form-inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-form label {
|
|
||||||
@extend .form-group;
|
|
||||||
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-form .search-field {
|
|
||||||
@extend .form-control;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-form .search-submit {
|
|
||||||
@extend .btn;
|
|
||||||
@extend .btn-secondary;
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
/**
|
|
||||||
* WordPress Generated Classes
|
|
||||||
* @see http://codex.wordpress.org/CSS#WordPress_Generated_Classes
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** Media alignment */
|
|
||||||
.alignnone {
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aligncenter {
|
|
||||||
display: block;
|
|
||||||
margin: ($spacer / 2) auto;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alignleft,
|
|
||||||
.alignright {
|
|
||||||
margin-bottom: ($spacer / 2);
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
|
||||||
.alignleft {
|
|
||||||
float: left;
|
|
||||||
margin-right: ($spacer / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.alignright {
|
|
||||||
float: right;
|
|
||||||
margin-left: ($spacer / 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Captions */
|
|
||||||
.wp-caption {
|
|
||||||
@extend .figure;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-caption img {
|
|
||||||
@extend .figure-img;
|
|
||||||
@extend .img-fluid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-caption-text {
|
|
||||||
@extend .figure-caption;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Text meant only for screen readers */
|
|
||||||
.screen-reader-text {
|
|
||||||
@extend .sr-only;
|
|
||||||
@extend .sr-only-focusable;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
.banner .nav li {
|
|
||||||
@extend .nav-item;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner .nav a {
|
|
||||||
@extend .nav-link;
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
body#tinymce {
|
|
||||||
margin: 12px !important;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
@import "common/variables";
|
|
||||||
|
|
||||||
/** Import everything from autoload */
|
|
||||||
@import "./autoload/**/*";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Import npm dependencies
|
|
||||||
*
|
|
||||||
* Prefix your imports with `~` to grab from node_modules/
|
|
||||||
* @see https://github.com/webpack-contrib/sass-loader#imports
|
|
||||||
*/
|
|
||||||
// @import "~some-node-module";
|
|
||||||
|
|
||||||
/** Import theme styles */
|
|
||||||
@import "common/global";
|
|
||||||
@import "components/buttons";
|
|
||||||
@import "components/comments";
|
|
||||||
@import "components/forms";
|
|
||||||
@import "components/wp-classes";
|
|
||||||
@import "layouts/header";
|
|
||||||
@import "layouts/sidebar";
|
|
||||||
@import "layouts/footer";
|
|
||||||
@import "layouts/pages";
|
|
||||||
@import "layouts/posts";
|
|
||||||
@import "layouts/tinymce";
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Sober\Controller\Controller;
|
|
||||||
|
|
||||||
class About extends Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Sober\Controller\Controller;
|
|
||||||
|
|
||||||
class App extends Controller
|
|
||||||
{
|
|
||||||
public function siteName()
|
|
||||||
{
|
|
||||||
return get_bloginfo('name');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Sober\Controller\Controller;
|
|
||||||
|
|
||||||
class Home extends Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Do not edit anything in this file unless you know what you're doing
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Roots\Sage\Config;
|
|
||||||
use Roots\Sage\Container;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper function for prettying up errors
|
|
||||||
* @param string $message
|
|
||||||
* @param string $subtitle
|
|
||||||
* @param string $title
|
|
||||||
*/
|
|
||||||
$sage_error = function ($message, $subtitle = '', $title = '') {
|
|
||||||
$title = $title ?: __('Sage › Error', 'sage');
|
|
||||||
$footer = '<a href="https://roots.io/sage/docs/">roots.io/sage/docs/</a>';
|
|
||||||
$message = "<h1>{$title}<br><small>{$subtitle}</small></h1><p>{$message}</p><p>{$footer}</p>";
|
|
||||||
wp_die($message, $title);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Ensure compatible version of PHP is used
|
|
||||||
*/
|
|
||||||
if (version_compare('7', phpversion(), '>=')) {
|
|
||||||
$sage_error(__('You must be using PHP 7 or greater.', 'sage'), __('Invalid PHP version', 'sage'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Ensure compatible version of WordPress is used
|
|
||||||
*/
|
|
||||||
if (version_compare('4.7.0', get_bloginfo('version'), '>=')) {
|
|
||||||
$sage_error(__('You must be using WordPress 4.7.0 or greater.', 'sage'), __('Invalid WordPress version', 'sage'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Ensure dependencies are loaded
|
|
||||||
*/
|
|
||||||
if (!class_exists('Roots\\Sage\\Container')) {
|
|
||||||
if (!file_exists($composer = __DIR__.'/../vendor/autoload.php')) {
|
|
||||||
$sage_error(
|
|
||||||
__('You must run <code>composer install</code> from the Sage directory.', 'sage'),
|
|
||||||
__('Autoloader not found.', 'sage')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
require_once $composer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sage required files
|
|
||||||
*
|
|
||||||
* The mapped array determines the code library included in your theme.
|
|
||||||
* Add or remove files to the array as needed. Supports child theme overrides.
|
|
||||||
*/
|
|
||||||
array_map(function ($file) use ($sage_error) {
|
|
||||||
$file = "../app/{$file}.php";
|
|
||||||
if (!locate_template($file, true, true)) {
|
|
||||||
$sage_error(sprintf(__('Error locating <code>%s</code> for inclusion.', 'sage'), $file), 'File not found');
|
|
||||||
}
|
|
||||||
}, ['helpers', 'setup', 'filters', 'admin']);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Here's what's happening with these hooks:
|
|
||||||
* 1. WordPress initially detects theme in themes/sage/resources
|
|
||||||
* 2. Upon activation, we tell WordPress that the theme is actually in themes/sage/resources/views
|
|
||||||
* 3. When we call get_template_directory() or get_template_directory_uri(), we point it back to themes/sage/resources
|
|
||||||
*
|
|
||||||
* We do this so that the Template Hierarchy will look in themes/sage/resources/views for core WordPress themes
|
|
||||||
* But functions.php, style.css, and index.php are all still located in themes/sage/resources
|
|
||||||
*
|
|
||||||
* This is not compatible with the WordPress Customizer theme preview prior to theme activation
|
|
||||||
*
|
|
||||||
* get_template_directory() -> /srv/www/example.com/current/web/app/themes/sage/resources
|
|
||||||
* get_stylesheet_directory() -> /srv/www/example.com/current/web/app/themes/sage/resources
|
|
||||||
* locate_template()
|
|
||||||
* ├── STYLESHEETPATH -> /srv/www/example.com/current/web/app/themes/sage/resources/views
|
|
||||||
* └── TEMPLATEPATH -> /srv/www/example.com/current/web/app/themes/sage/resources
|
|
||||||
*/
|
|
||||||
array_map(
|
|
||||||
'add_filter',
|
|
||||||
['theme_file_path', 'theme_file_uri', 'parent_theme_file_path', 'parent_theme_file_uri'],
|
|
||||||
array_fill(0, 4, 'dirname')
|
|
||||||
);
|
|
||||||
Container::getInstance()
|
|
||||||
->bindIf('config', function () {
|
|
||||||
return new Config([
|
|
||||||
'assets' => require dirname(__DIR__).'/config/assets.php',
|
|
||||||
'theme' => require dirname(__DIR__).'/config/theme.php',
|
|
||||||
'view' => require dirname(__DIR__).'/config/view.php',
|
|
||||||
]);
|
|
||||||
}, true);
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// this file is deliberately blank
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 225 B |
@@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
Theme Name: Sage Starter Theme
|
|
||||||
Theme URI: https://roots.io/sage/
|
|
||||||
Description: Sage is a WordPress starter theme.
|
|
||||||
Version: 9.0.0-beta.3
|
|
||||||
Author: Roots
|
|
||||||
Author URI: https://roots.io/
|
|
||||||
Text Domain: sage
|
|
||||||
|
|
||||||
License: MIT License
|
|
||||||
License URI: http://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@include('partials.page-header')
|
|
||||||
|
|
||||||
@if (!have_posts())
|
|
||||||
<div class="alert alert-warning">
|
|
||||||
{{ __('Sorry, but the page you were trying to view does not exist.', 'sage') }}
|
|
||||||
</div>
|
|
||||||
{!! get_search_form(false) !!}
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{!! get_the_posts_navigation() !!}
|
|
||||||
@endsection
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@include('partials.page-header')
|
|
||||||
|
|
||||||
@if (!have_posts())
|
|
||||||
<div class="alert alert-warning">
|
|
||||||
{{ __('Sorry, no results were found.', 'sage') }}
|
|
||||||
</div>
|
|
||||||
{!! get_search_form(false) !!}
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@while (have_posts()) @php(the_post())
|
|
||||||
@include('partials.content-'.get_post_type())
|
|
||||||
@endwhile
|
|
||||||
|
|
||||||
{!! get_the_posts_navigation() !!}
|
|
||||||
@endsection
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html @php(language_attributes())>
|
|
||||||
@include('partials.head')
|
|
||||||
<body @php(body_class())>
|
|
||||||
@php(do_action('get_header'))
|
|
||||||
@include('partials.header')
|
|
||||||
<div class="wrap container" role="document">
|
|
||||||
<div class="content">
|
|
||||||
<main class="main">
|
|
||||||
@yield('content')
|
|
||||||
</main>
|
|
||||||
@if (App\display_sidebar())
|
|
||||||
<aside class="sidebar">
|
|
||||||
@include('partials.sidebar')
|
|
||||||
</aside>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@php(do_action('get_footer'))
|
|
||||||
@include('partials.footer')
|
|
||||||
@php(wp_footer())
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
@php
|
|
||||||
if (post_password_required()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<section id="comments" class="comments">
|
|
||||||
@if (have_comments())
|
|
||||||
<h2>
|
|
||||||
{!! sprintf(_nx('One response to “%2$s”', '%1$s responses to “%2$s”', get_comments_number(), 'comments title', 'sage'), number_format_i18n(get_comments_number()), '<span>' . get_the_title() . '</span>') !!}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<ol class="comment-list">
|
|
||||||
{!! wp_list_comments(['style' => 'ol', 'short_ping' => true]) !!}
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
@if (get_comment_pages_count() > 1 && get_option('page_comments'))
|
|
||||||
<nav>
|
|
||||||
<ul class="pager">
|
|
||||||
@if (get_previous_comments_link())
|
|
||||||
<li class="previous">@php(previous_comments_link(__('← Older comments', 'sage')))</li>
|
|
||||||
@endif
|
|
||||||
@if (get_next_comments_link())
|
|
||||||
<li class="next">@php(next_comments_link(__('Newer comments →', 'sage')))</li>
|
|
||||||
@endif
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
@endif
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments'))
|
|
||||||
<div class="alert alert-warning">
|
|
||||||
{{ __('Comments are closed.', 'sage') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@php(comment_form())
|
|
||||||
</section>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@php(the_content())
|
|
||||||
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<article @php(post_class())>
|
|
||||||
<header>
|
|
||||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
|
||||||
@if (get_post_type() === 'post')
|
|
||||||
@include('partials/entry-meta')
|
|
||||||
@endif
|
|
||||||
</header>
|
|
||||||
<div class="entry-summary">
|
|
||||||
@php(the_excerpt())
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<article @php(post_class())>
|
|
||||||
<header>
|
|
||||||
<h1 class="entry-title">{{ get_the_title() }}</h1>
|
|
||||||
@include('partials/entry-meta')
|
|
||||||
</header>
|
|
||||||
<div class="entry-content">
|
|
||||||
@php(the_content())
|
|
||||||
</div>
|
|
||||||
<footer>
|
|
||||||
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
|
||||||
</footer>
|
|
||||||
@php(comments_template('/partials/comments.blade.php'))
|
|
||||||
</article>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<article @php(post_class())>
|
|
||||||
<header>
|
|
||||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
|
||||||
@include('partials/entry-meta')
|
|
||||||
</header>
|
|
||||||
<div class="entry-summary">
|
|
||||||
@php(the_excerpt())
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<time class="updated" datetime="{{ get_post_time('c', true) }}">{{ get_the_date() }}</time>
|
|
||||||
<p class="byline author vcard">
|
|
||||||
{{ __('By', 'sage') }} <a href="{{ get_author_posts_url(get_the_author_meta('ID')) }}" rel="author" class="fn">
|
|
||||||
{{ get_the_author() }}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<footer class="content-info">
|
|
||||||
<div class="container">
|
|
||||||
@php(dynamic_sidebar('sidebar-footer'))
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
@php(wp_head())
|
|
||||||
</head>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<header class="banner">
|
|
||||||
<div class="container">
|
|
||||||
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a>
|
|
||||||
<nav class="nav-primary">
|
|
||||||
@if (has_nav_menu('primary_navigation'))
|
|
||||||
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']) !!}
|
|
||||||
@endif
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
16
web/app/mu-plugins/bedrock-autoloader.php
Normal file
16
web/app/mu-plugins/bedrock-autoloader.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin Name: Bedrock Autoloader
|
||||||
|
* Plugin URI: https://github.com/roots/bedrock-autoloader
|
||||||
|
* Description: An autoloader that enables standard plugins to be required just like must-use plugins. The autoloaded plugins are included during mu-plugin loading. An asterisk (*) next to the name of the plugin designates the plugins that have been autoloaded.
|
||||||
|
* Author: Roots
|
||||||
|
* Author URI: https://roots.io/
|
||||||
|
* License: MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Roots\Bedrock;
|
||||||
|
|
||||||
|
if (is_blog_installed() && class_exists(Autoloader::class)) {
|
||||||
|
new Autoloader();
|
||||||
|
}
|
||||||
@@ -1,17 +1,25 @@
|
|||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
quote_type = single
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.php]
|
[*.php]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.blade.php]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[resources/views/**.php]
|
[resources/views/**.php]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[index.php]
|
||||||
|
indent_size = 2
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
/.github export-ignore
|
|
||||||
/.gitattributes export-ignore
|
/.gitattributes export-ignore
|
||||||
/.travis.yml export-ignore
|
/.github export-ignore
|
||||||
23
web/app/themes/badegg/.github/labeler.yml
vendored
Normal file
23
web/app/themes/badegg/.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
build:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- vite.config.js
|
||||||
|
dependencies:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- package-lock.json
|
||||||
|
javascript:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- resources/js/**/*.js
|
||||||
|
php:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- functions.php
|
||||||
|
- app/**/*.php
|
||||||
|
- resources/views/**/*.php
|
||||||
|
views:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- index.php
|
||||||
|
- resources/views/**/*.php
|
||||||
23
web/app/themes/badegg/.github/renovate.json
vendored
Normal file
23
web/app/themes/badegg/.github/renovate.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"baseBranches": [
|
||||||
|
"main"
|
||||||
|
],
|
||||||
|
"commitMessageAction": "⬆️ Bump",
|
||||||
|
"commitMessageTopic": "{{depName}}",
|
||||||
|
"extends": [
|
||||||
|
"config:recommended",
|
||||||
|
"schedule:weekly"
|
||||||
|
],
|
||||||
|
"rangeStrategy": "bump",
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"matchUpdateTypes": [
|
||||||
|
"minor",
|
||||||
|
"patch",
|
||||||
|
"pin"
|
||||||
|
],
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timezone": "America/Detroit"
|
||||||
|
}
|
||||||
18
web/app/themes/badegg/.github/workflows/discourse.yml
vendored
Normal file
18
web/app/themes/badegg/.github/workflows/discourse.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Post release topic on Discourse
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
post:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: roots/discourse-topic-github-release-action@main
|
||||||
|
with:
|
||||||
|
discourse-api-key: ${{ secrets.DISCOURSE_RELEASES_API_KEY }}
|
||||||
|
discourse-base-url: ${{ secrets.DISCOURSE_BASE_URL }}
|
||||||
|
discourse-author-username: ben
|
||||||
|
discourse-category: 11
|
||||||
|
discourse-tags:
|
||||||
|
releases
|
||||||
11
web/app/themes/badegg/.github/workflows/labeler.yml
vendored
Normal file
11
web/app/themes/badegg/.github/workflows/labeler.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: "Pull Request Labeler"
|
||||||
|
on:
|
||||||
|
- pull_request_target
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v5
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
91
web/app/themes/badegg/.github/workflows/main.yml
vendored
Normal file
91
web/app/themes/badegg/.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
name: Main
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
node:
|
||||||
|
name: Node ${{ matrix.node }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node: ['20']
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the project
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup the Node ${{ matrix.node }} environment on ${{ runner.os }}
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install dependencies using npm
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build and compile assets
|
||||||
|
run: |
|
||||||
|
npm run build
|
||||||
|
cat public/build/manifest.json
|
||||||
|
|
||||||
|
- name: Validate theme.json
|
||||||
|
run: |
|
||||||
|
THEME_JSON="public/build/assets/theme.json"
|
||||||
|
|
||||||
|
if [ ! -f "$THEME_JSON" ]; then
|
||||||
|
echo "❌ theme.json not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
jq -e '
|
||||||
|
(.settings.color.palette | length > 0) and
|
||||||
|
(.settings.typography.fontFamilies | length > 0) and
|
||||||
|
(.settings.typography.fontSizes | length > 0)
|
||||||
|
' "$THEME_JSON" 2>&1 || {
|
||||||
|
echo "❌ Invalid theme.json structure or missing required values"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
php:
|
||||||
|
name: PHP ${{ matrix.php }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php: ['8.2']
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the project
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup the PHP ${{ matrix.php }} environment on ${{ runner.os }}
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php }}
|
||||||
|
coverage: xdebug
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Restore the Composer cache directory
|
||||||
|
id: composercache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composercache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest
|
||||||
|
|
||||||
|
- name: Run Pint
|
||||||
|
run: vendor/bin/pint --test
|
||||||
6
web/app/themes/badegg/.gitignore
vendored
Normal file
6
web/app/themes/badegg/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/node_modules
|
||||||
|
/vendor
|
||||||
|
/public/*
|
||||||
|
!/public/.gitkeep
|
||||||
|
.env
|
||||||
|
npm-debug.log
|
||||||
19
web/app/themes/badegg/LICENSE.md
Normal file
19
web/app/themes/badegg/LICENSE.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) Roots Software LLC
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
31
web/app/themes/badegg/README.md
Normal file
31
web/app/themes/badegg/README.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<p align="center">
|
||||||
|
<a href="https://roots.io/sage/"><img alt="Sage" src="https://cdn.roots.io/app/uploads/logo-sage.svg" height="100"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://packagist.org/packages/roots/sage"><img alt="Packagist Installs" src="https://img.shields.io/packagist/dt/roots/sage?label=projects%20created&colorB=2b3072&colorA=525ddc&style=flat-square"></a>
|
||||||
|
<a href="https://github.com/roots/sage/actions/workflows/main.yml"><img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/roots/sage/main.yml?branch=main&logo=github&label=CI&style=flat-square"></a>
|
||||||
|
<a href="https://bsky.app/profile/roots.dev"><img alt="Follow roots.dev on Bluesky" src="https://img.shields.io/badge/follow-@roots.dev-0085ff?logo=bluesky&style=flat-square"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# Sage
|
||||||
|
|
||||||
|
**Advanced hybrid WordPress starter theme with Laravel Blade and Tailwind CSS**
|
||||||
|
|
||||||
|
- 🔧 Clean, efficient theme templating with Laravel Blade
|
||||||
|
- ⚡️ Modern front-end development workflow powered by Vite
|
||||||
|
- 🎨 Out of the box support for Tailwind CSS
|
||||||
|
- 🚀 Harness the power of Laravel with [Acorn integration](https://github.com/roots/acorn)
|
||||||
|
- 📦 Block editor support built-in
|
||||||
|
|
||||||
|
Sage brings proper PHP templating and modern JavaScript tooling to WordPress themes. Write organized, component-based code using Laravel Blade, enjoy instant builds and CSS hot-reloading with Vite, and leverage Laravel's robust feature set through Acorn.
|
||||||
|
|
||||||
|
[Read the docs to get started](https://roots.io/sage/docs/installation/)
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
Sage is an open source project and completely free to use. If you've benefited from our projects and would like to support our future endeavors, [please consider sponsoring us](https://github.com/sponsors/roots).
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<a href="https://carrot.com/"><img src="https://cdn.roots.io/app/uploads/carrot.svg" alt="Carrot" width="120" height="90"></a> <a href="https://wordpress.com/"><img src="https://cdn.roots.io/app/uploads/wordpress.svg" alt="WordPress.com" width="120" height="90"></a> <a href="https://worksitesafety.ca/careers/"><img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="120" height="90"></a> <a href="https://40q.agency/"><img src="https://cdn.roots.io/app/uploads/40q.svg" alt="40Q" width="120" height="90"></a> <a href="https://www.itineris.co.uk/"><img src="https://cdn.roots.io/app/uploads/itineris.svg" alt="Itineris" width="120" height="90"></a> <a href="https://bonsai.so/"><img src="https://cdn.roots.io/app/uploads/bonsai.svg" alt="Bonsai" width="120" height="90"></a>
|
||||||
|
</div>
|
||||||
28
web/app/themes/badegg/app/ACF/CloneGroup.php
Normal file
28
web/app/themes/badegg/app/ACF/CloneGroup.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\ACF;
|
||||||
|
|
||||||
|
class CloneGroup
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public function background()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'contrast',
|
||||||
|
'bg_type',
|
||||||
|
'bg_colour',
|
||||||
|
'bg_tint',
|
||||||
|
'bg_opacity',
|
||||||
|
'bg_image',
|
||||||
|
'bg_video',
|
||||||
|
'pattern',
|
||||||
|
'pattern_top',
|
||||||
|
'pattern_bottom',
|
||||||
|
'padding_top',
|
||||||
|
'padding_bottom',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
102
web/app/themes/badegg/app/ACF/Dynamic.php
Normal file
102
web/app/themes/badegg/app/ACF/Dynamic.php
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\ACF;
|
||||||
|
use ourcodeworld\NameThatColor\ColorInterpreter as NameThatColor;
|
||||||
|
use App\Utilities;
|
||||||
|
|
||||||
|
class Dynamic
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
add_filter('acf/load_field/name=colour', [ $this, 'load_colours' ]);
|
||||||
|
add_filter('acf/load_field/name=bg_colour', [ $this, 'load_colours' ]);
|
||||||
|
add_filter('acf/load_field/name=tint', [ $this, 'load_tints' ]);
|
||||||
|
add_filter('acf/load_field/name=bg_tint', [ $this, 'load_tints' ]);
|
||||||
|
add_filter('acf/load_field/name=fontawesome_regular', [ $this, 'load_fontawesome_regular_icons' ]);
|
||||||
|
add_filter('acf/load_field/name=fontawesome_solid', [ $this, 'load_fontawesome_solid_icons' ]);
|
||||||
|
add_filter('acf/load_field/name=fontawesome_brands', [ $this, 'load_fontawesome_brand_icons' ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load_colours( $field )
|
||||||
|
{
|
||||||
|
$colour = new Utilities\Colour;
|
||||||
|
$NameThatColour = new NameThatColor;
|
||||||
|
|
||||||
|
$colours = $colour->values();
|
||||||
|
|
||||||
|
$field['choices'] = [];
|
||||||
|
|
||||||
|
foreach($colours as $slug => $hex):
|
||||||
|
$field['choices'][$slug] = '<i class="fas fa-circle" style="color: '. $hex .'"></i> ' . @$NameThatColour->name($hex)['name'];
|
||||||
|
endforeach;
|
||||||
|
|
||||||
|
return $field;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load_tints( $field )
|
||||||
|
{
|
||||||
|
$colour = new Utilities\Colour;
|
||||||
|
$tints = $colour->tints();
|
||||||
|
|
||||||
|
$field['choices'] = [];
|
||||||
|
|
||||||
|
foreach($tints as $slug => $hex):
|
||||||
|
if($slug):
|
||||||
|
$field['choices'][$slug] = ucfirst($slug);
|
||||||
|
|
||||||
|
else:
|
||||||
|
$field['choices'][0] = 'None';
|
||||||
|
endif;
|
||||||
|
endforeach;
|
||||||
|
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load_fontawesome_regular_icons( $field )
|
||||||
|
{
|
||||||
|
$field['choices'] = [];
|
||||||
|
$field['choices'] = $this->fontawesome_choices('regular');
|
||||||
|
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load_fontawesome_solid_icons( $field )
|
||||||
|
{
|
||||||
|
$field['choices'] = [];
|
||||||
|
$field['choices'] = $this->fontawesome_choices('solid');
|
||||||
|
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load_fontawesome_brand_icons( $field )
|
||||||
|
{
|
||||||
|
$field['choices'] = [];
|
||||||
|
$field['choices'] = $this->fontawesome_choices('brands');
|
||||||
|
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fontawesome_choices($set = 'solid')
|
||||||
|
{
|
||||||
|
$path = get_stylesheet_directory() . '/resources/json/font-awesome-' . $set . '.json';
|
||||||
|
|
||||||
|
$json = @file_get_contents($path);
|
||||||
|
|
||||||
|
if(!$json) return false;
|
||||||
|
$icons = json_decode($json, true);
|
||||||
|
|
||||||
|
$choices = [
|
||||||
|
'0' => '<i class="fa-solid"></i> <span>Please select an icon</span>',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach($icons as $slug => $props):
|
||||||
|
if(in_array($slug, range(0,9))) continue;
|
||||||
|
|
||||||
|
$choices[$slug] = '<i class="fa-'.$set.' fa-'.$slug.'" style="color: #2271b1;"></i> <span>' . (ucwords(str_replace('-', ' ', $slug))) . '</span>';
|
||||||
|
endforeach;
|
||||||
|
|
||||||
|
return $choices;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
25
web/app/themes/badegg/app/ACF/JSON.php
Normal file
25
web/app/themes/badegg/app/ACF/JSON.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\ACF;
|
||||||
|
|
||||||
|
class JSON
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
add_filter('acf/settings/save_json', [$this, 'save']);
|
||||||
|
add_filter('acf/settings/load_json', [$this, 'load']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function save( $path )
|
||||||
|
{
|
||||||
|
$path = get_stylesheet_directory() . '/resources/acf';
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load( $paths )
|
||||||
|
{
|
||||||
|
unset($paths[0]);
|
||||||
|
$paths[] = get_stylesheet_directory() . '/resources/acf';
|
||||||
|
return $paths;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
web/app/themes/badegg/app/ACF/Options.php
Normal file
23
web/app/themes/badegg/app/ACF/Options.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\ACF;
|
||||||
|
|
||||||
|
class Options
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
add_filter('acf/init', [$this, 'company']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function company()
|
||||||
|
{
|
||||||
|
acf_add_options_page([
|
||||||
|
'page_title' => __('Global Settings'),
|
||||||
|
'menu_title' => __('Global Settings'),
|
||||||
|
'menu_slug' => 'theme-global-settings',
|
||||||
|
'capability' => 'edit_others_posts',
|
||||||
|
'redirect' => false,
|
||||||
|
'icon_url' => 'dashicons-admin-site',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
135
web/app/themes/badegg/app/Admin/Blocks.php
Normal file
135
web/app/themes/badegg/app/Admin/Blocks.php
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Admin;
|
||||||
|
|
||||||
|
class Blocks
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
add_action('allowed_block_types_all', [$this, 'blacklist'], 100, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function blacklist()
|
||||||
|
{
|
||||||
|
// Reference:
|
||||||
|
// https://www.wpexplorer.com/how-to-remove-gutenberg-blocks/
|
||||||
|
// https://www.wpexplorer.com/wordpress-core-blocks-list/
|
||||||
|
|
||||||
|
// Existing blocks with Blade templates
|
||||||
|
// https://roots.io/acorn/docs/rendering-blade-views/#existing-blocks-with-blade-templates
|
||||||
|
|
||||||
|
$blocks = array_keys( \WP_Block_Type_Registry::get_instance()->get_all_registered() );
|
||||||
|
|
||||||
|
$blacklist = [
|
||||||
|
// Design
|
||||||
|
'core/button',
|
||||||
|
'core/comment-template',
|
||||||
|
'core/home-link',
|
||||||
|
'core/navigation-link',
|
||||||
|
'core/navigation-submenu',
|
||||||
|
'core/buttons',
|
||||||
|
'core/column',
|
||||||
|
'core/columns',
|
||||||
|
'core/group',
|
||||||
|
'core/more',
|
||||||
|
'core/nextpage',
|
||||||
|
'core/separator',
|
||||||
|
'core/spacer',
|
||||||
|
'core/text-columns',
|
||||||
|
|
||||||
|
// Embed
|
||||||
|
'core/embed',
|
||||||
|
|
||||||
|
// Media
|
||||||
|
'core/cover',
|
||||||
|
'core/file',
|
||||||
|
'core/gallery',
|
||||||
|
'core/image',
|
||||||
|
'core/media-text',
|
||||||
|
'core/audio',
|
||||||
|
'core/video',
|
||||||
|
|
||||||
|
// Reusable
|
||||||
|
'core/block',
|
||||||
|
|
||||||
|
// Text
|
||||||
|
'core/footnotes',
|
||||||
|
'core/heading',
|
||||||
|
'core/list',
|
||||||
|
'core/code',
|
||||||
|
'core/details',
|
||||||
|
'core/freeform',
|
||||||
|
'core/list-item',
|
||||||
|
'core/missing',
|
||||||
|
'core/paragraph',
|
||||||
|
'core/preformatted',
|
||||||
|
'core/pullquote',
|
||||||
|
'core/quote',
|
||||||
|
'core/table',
|
||||||
|
'core/verse',
|
||||||
|
|
||||||
|
// Theme
|
||||||
|
'core/avatar',
|
||||||
|
'core/comment-author-name',
|
||||||
|
'core/comment-content',
|
||||||
|
'core/comment-date',
|
||||||
|
'core/comment-edit-link',
|
||||||
|
'core/comment-reply-link',
|
||||||
|
'core/comments',
|
||||||
|
'core/comments-pagination',
|
||||||
|
'core/comments-pagination-next',
|
||||||
|
'core/comments-pagination-numbers',
|
||||||
|
'core/comments-pagination-previous',
|
||||||
|
'core/comments-title',
|
||||||
|
'core/loginout',
|
||||||
|
'core/navigation',
|
||||||
|
'core/pattern',
|
||||||
|
'core/post-author',
|
||||||
|
'core/post-author-biography',
|
||||||
|
'core/post-author-name',
|
||||||
|
'core/post-comments-form',
|
||||||
|
'core/post-content',
|
||||||
|
'core/post-date',
|
||||||
|
'core/post-excerpt',
|
||||||
|
'core/post-featured-image',
|
||||||
|
'core/post-navigation-link',
|
||||||
|
'core/post-template',
|
||||||
|
'core/post-terms',
|
||||||
|
'core/post-title',
|
||||||
|
'core/query',
|
||||||
|
'core/query-no-results',
|
||||||
|
'core/query-pagination',
|
||||||
|
'core/query-pagination-next',
|
||||||
|
'core/query-pagination-numbers',
|
||||||
|
'core/query-pagination-previous',
|
||||||
|
'core/query-title',
|
||||||
|
'core/read-more',
|
||||||
|
'core/site-logo',
|
||||||
|
'core/site-tagline',
|
||||||
|
'core/site-title',
|
||||||
|
'core/template-part',
|
||||||
|
'core/term-description',
|
||||||
|
'core/post-comments',
|
||||||
|
|
||||||
|
// Widgets
|
||||||
|
'core/legacy-widget',
|
||||||
|
'core/widget-group',
|
||||||
|
'core/archives',
|
||||||
|
'core/calendar',
|
||||||
|
'core/categories',
|
||||||
|
'core/latest-comments',
|
||||||
|
'core/latest-posts',
|
||||||
|
'core/page-list',
|
||||||
|
'core/page-list-item',
|
||||||
|
'core/rss',
|
||||||
|
'core/search',
|
||||||
|
'core/shortcode',
|
||||||
|
'core/social-link',
|
||||||
|
'core/tag-cloud',
|
||||||
|
'core/html',
|
||||||
|
'core/social-links',
|
||||||
|
];
|
||||||
|
|
||||||
|
return array_values( array_diff( $blocks, $blacklist ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user