Compare commits
740 Commits
Author | SHA1 | Date |
---|---|---|
|
577d2bbe6e | |
|
26159437b7 | |
|
b9ffd9598d | |
|
a6e1afcc80 | |
|
f6eef7257b | |
|
041e423d42 | |
|
e81bb254e7 | |
|
8866702717 | |
|
8d38b5c7e2 | |
|
2163e918cc | |
|
ba23fbc99e | |
|
9a6856ab06 | |
|
13785850b9 | |
|
11c22ea1ea | |
|
3f1e7d6b93 | |
|
96f9861020 | |
|
f12fadff66 | |
|
6e3d150fc3 | |
|
0fa54fbd7a | |
|
d6e163108a | |
|
d91b152329 | |
|
5b0af18658 | |
|
60ff4ea210 | |
|
8ac844a477 | |
|
1a44321cf4 | |
|
419c70fc77 | |
|
33a3ac9430 | |
|
480d921cef | |
|
4f65d3bf4e | |
|
c8e11d8e47 | |
|
c3d6f71d55 | |
|
5744de4e4d | |
|
a9c3dd1533 | |
|
b0e502cc72 | |
|
ef63a8d807 | |
|
00e1cbbc6b | |
|
b4a59f00d2 | |
|
a6ec609f49 | |
|
50b77b2836 | |
|
6759a28216 | |
|
16b24b1381 | |
|
06b4eb8fad | |
|
49562152d0 | |
|
bebcbfda1c | |
|
78560462ca | |
|
c816c5fc3d | |
|
4d5643f861 | |
|
2dde30daf3 | |
|
4acfb7b76a | |
|
33d34eea0f | |
|
088c913f67 | |
|
fd49282446 | |
|
0510d8f655 | |
|
e2fa33ad46 | |
|
21b554c341 | |
|
eec81f340f | |
|
6bbcd04910 | |
|
8fa0ef1381 | |
|
c943158c17 | |
|
67a61da329 | |
|
4eb6c7ff61 | |
|
c3c7eb6048 | |
|
cc3872f270 | |
|
03a4d345f0 | |
|
a22b1ad664 | |
|
0a6267c171 | |
|
4c31074d5c | |
|
94feae3cca | |
|
59c35d947c | |
|
3bdb8f768c | |
|
6fea38edd9 | |
|
8fc918d855 | |
|
81582cd147 | |
|
22f4ff0011 | |
|
d21901aa19 | |
|
587f85e2e0 | |
|
e8a701a215 | |
|
17e9df5f4d | |
|
98902cf06b | |
|
b2f82274ed | |
|
25f82b2f28 | |
|
d659edb7df | |
|
f9c29f8a21 | |
|
b04ca3fb3d | |
|
bce395070c | |
|
9433645cb6 | |
|
c282e97333 | |
|
6d4cf0584b | |
|
3ce38cc6f0 | |
|
9285958da9 | |
|
c045ea2c3c | |
|
a754abafa8 | |
|
f7032c7844 | |
|
c53eaf28ef | |
|
c83eb3b698 | |
|
eb866438a9 | |
|
4b85f9a13c | |
|
83d7a1422c | |
|
0e8f764870 | |
|
83d5984a53 | |
|
31fcdcf64e | |
|
c5f342c7f6 | |
|
b21e8497e5 | |
|
08d0427688 | |
|
e5faffe616 | |
|
900a945d0e | |
|
1680f5660a | |
|
26d70cf6f9 | |
|
8e497f7a43 | |
|
f3b9371d6c | |
|
cde3e2b05a | |
|
541e65b3e0 | |
|
1fb8fd524e | |
|
acb53bf7a7 | |
|
088be03f0b | |
|
1cf7d8bdd3 | |
|
7d1b63b11d | |
|
9a341f1724 | |
|
87bf9063d2 | |
|
9c79d95a60 | |
|
c514283044 | |
|
14b2c546fd | |
|
07a18847e8 | |
|
41cf5ac604 | |
|
fa6dac30a7 | |
|
0ab4b0fd7c | |
|
ae4e2fd850 | |
|
f0757d024a | |
|
c8f648d5c2 | |
|
28ba29ed4a | |
|
99ec58e91e | |
|
e876aa07c7 | |
|
332324f264 | |
|
d94a3d9707 | |
|
68ce84075e | |
|
6415614513 | |
|
4c600e8065 | |
|
4c8e536b64 | |
|
d25902cd0a | |
|
a61991c92c | |
|
e222cd3d2a | |
|
d7f270ef1a | |
|
a8ec541a7e | |
|
8bde58a79c | |
|
38dbb52f6d | |
|
8c4831f23d | |
|
9c54b590ec | |
|
99618781bc | |
|
928aa0ed51 | |
|
6cfbf4d946 | |
|
2001d17a55 | |
|
68ac9dd321 | |
|
84a99f1f34 | |
|
313ed046e8 | |
|
0083219c59 | |
|
77a0f60b6f | |
|
f0288c6106 | |
|
b2319886c9 | |
|
6cb5dde1dd | |
|
9a91dd93ce | |
|
56616242d3 | |
|
aa3a3c6504 | |
|
9f7047e662 | |
|
444f3175aa | |
|
3219dfac76 | |
|
0ac3f0e9d2 | |
|
baada03dd9 | |
|
fa8cc5782a | |
|
f3125a6e75 | |
|
cb37292b9f | |
|
2b63687c51 | |
|
8437ea3eb2 | |
|
0f7a3bec71 | |
|
a12d3f8e5b | |
|
71cc97b4bb | |
|
f2da0e6ae7 | |
|
4aa27418b1 | |
|
00ac16f3ad | |
|
b314c40312 | |
|
747c995c04 | |
|
dea1975e33 | |
|
82b5481914 | |
|
d19572206a | |
|
0c5d6d1125 | |
|
5142e27a62 | |
|
d23e94b820 | |
|
adc5f4a80d | |
|
8e2de6c6dc | |
|
153e6a60d1 | |
|
84379f67ff | |
|
a1a6d6f468 | |
|
cf6f3bed58 | |
|
92658f1b88 | |
|
71af1b71ac | |
|
c01a572d82 | |
|
ecedfebf75 | |
|
b667eac5da | |
|
e057da24d2 | |
|
6e58f8a67d | |
|
b495f6045c | |
|
9e0213f018 | |
|
36de6139fd | |
|
8d17419e35 | |
|
da0ea762d0 | |
|
f2a1cd5c2d | |
|
f2af0198fa | |
|
dbf421848f | |
|
782ac59c9b | |
|
838c9684a2 | |
|
b0be87c519 | |
|
982b87e3e5 | |
|
20c9f483e5 | |
|
e0aae4f096 | |
|
c89bf7cac5 | |
|
4db06f9aeb | |
|
1dcd318883 | |
|
1b9c2f28c3 | |
|
dba7573cfc | |
|
1e3241997d | |
|
fa3a47c52b | |
|
7a9020b52f | |
|
a431f466dc | |
|
763257a3ac | |
|
c9ee62bcde | |
|
2ca6096cdf | |
|
a15820cb37 | |
|
c8b33ae51e | |
|
0c6c30fec1 | |
|
6eb34e7124 | |
|
11fd48f5d0 | |
|
8cfe33965b | |
|
3ffe2b1002 | |
|
978791808f | |
|
c237e04744 | |
|
16edb5da3b | |
|
041fc30fe9 | |
|
a9f79b7495 | |
|
05c3fef94a | |
|
6e4ace75f8 | |
|
1373cfd3e4 | |
|
10c4226fce | |
|
dc1ea3dfaa | |
|
8a8ae76bf2 | |
|
8ae115e95c | |
|
4b3d31eff3 | |
|
e615de3755 | |
|
cd675cfc55 | |
|
088b21795c | |
|
ed0408da33 | |
|
e9a69ec8e0 | |
|
090de56037 | |
|
b6a532c22f | |
|
7c9fe0ef6f | |
|
a968a781df | |
|
515d7bcad2 | |
|
e92f8e55fb | |
|
ca67e579a9 | |
|
99c45443cf | |
|
56c7c9a466 | |
|
18e1edcf59 | |
|
4aa68dd954 | |
|
69633d15b8 | |
|
47f58668bb | |
|
ef51b7c6de | |
|
a6bfb51437 | |
|
365de08a37 | |
|
a785bb0dbf | |
|
394a018e08 | |
|
2dd90e3d20 | |
|
1e5a789156 | |
|
d1bf113a17 | |
|
0109db6173 | |
|
0cfab5dabb | |
|
e3015b9006 | |
|
e4fafd7359 | |
|
79a66d4fda | |
|
9b30ac01db | |
|
e70c968e56 | |
|
54c39a1297 | |
|
c87c9adece | |
|
03e673e6a5 | |
|
bba8df99ac | |
|
c96582cf47 | |
|
0ba7e136fc | |
|
75f7179050 | |
|
70f668e644 | |
|
e689e54112 | |
|
ef41fe92d1 | |
|
83b20869fa | |
|
6225dc132d | |
|
af4afd737a | |
|
ff660c0f17 | |
|
4363dc8421 | |
|
6118814a46 | |
|
6a65123650 | |
|
fb25ca40de | |
|
e58f3544af | |
|
5a74d6a027 | |
|
89c2b40935 | |
|
f4f035dbd4 | |
|
a40fe796f9 | |
|
7810026589 | |
|
d88f6c49be | |
|
94bda6faca | |
|
12fcf5f692 | |
|
92eb1f638e | |
|
479bc217d8 | |
|
1c8e681dee | |
|
0e697b27ca | |
|
fc4120662a | |
|
95f04231af | |
|
c22dbc06ee | |
|
80588df47b | |
|
29f7bb8c55 | |
|
dd600a2832 | |
|
ea7087dd7b | |
|
d23477615c | |
|
6c9e8f6106 | |
|
ad76d715fa | |
|
c43a61a60b | |
|
8d63467d62 | |
|
9982a3820c | |
|
31dffd65dc | |
|
26ff31bb24 | |
|
1607c0420a | |
|
5b9c42f5cb | |
|
325e3933f1 | |
|
91482d1006 | |
|
a8522ffe38 | |
|
c48c5843b3 | |
|
757408976e | |
|
688a9954f8 | |
|
5cd09f211b | |
|
6a1942bb32 | |
|
03c14cc790 | |
|
5303da1433 | |
|
c0e4d7d95c | |
|
baba66c71d | |
|
6c54b02f82 | |
|
4a2435f6c0 | |
|
c99f28dcd3 | |
|
fe536b81f2 | |
|
d0ef5f9439 | |
|
c91609e2e9 | |
|
be9307d490 | |
|
1d84103a54 | |
|
1ad429aeb3 | |
|
7fd252073a | |
|
74e53cc7d2 | |
|
3966543ea3 | |
|
f31082dec8 | |
|
09797137b6 | |
|
5a4c8b5450 | |
|
ad8a1b0390 | |
|
22e1f1727e | |
|
30d506af0f | |
|
1e90d7f077 | |
|
f34a827cea | |
|
743104db52 | |
|
c98a7f8efb | |
|
4818b3a116 | |
|
0be8ec4177 | |
|
7b8a23696a | |
|
8991555a28 | |
|
2b3a931d2d | |
|
a7b1f86982 | |
|
e60fa17e8c | |
|
8263ed3f55 | |
|
884dcca653 | |
|
abd600c986 | |
|
f475861d93 | |
|
706b93610b | |
|
05d84d0dc6 | |
|
a08f457141 | |
|
2b4ef71439 | |
|
9be448b06a | |
|
6ecc1fd278 | |
|
10c8c3fa69 | |
|
1a826a93ed | |
|
8147364e9a | |
|
3eb3565273 | |
|
3e6a30ad3b | |
|
c54319d1ab | |
|
e5c5767b29 | |
|
056c7e92fe | |
|
8cdb053266 | |
|
6f7e42ef63 | |
|
493cd0509f | |
|
d6b76de48c | |
|
7b6f9aad74 | |
|
e21dec04ef | |
|
27edd4b00f | |
|
09904652d0 | |
|
55787eeb7e | |
|
06ecd852f6 | |
|
e40aee9cf6 | |
|
dda884d483 | |
|
28780f215b | |
|
2613e085c3 | |
|
8b5ed30826 | |
|
0600b961fc | |
|
ac7eea4d29 | |
|
f627ed159c | |
|
b3046e8214 | |
|
696be6b0dd | |
|
e3dbdbf213 | |
|
58766a70d2 | |
|
7b3c9beb29 | |
|
154b499b56 | |
|
7fd8d902cf | |
|
f5da9f450e | |
|
c98178c1fa | |
|
f311a86d48 | |
|
5661c86c5e | |
|
0229db73c6 | |
|
5832facc61 | |
|
c7c63ebd17 | |
|
5999337717 | |
|
36f5593f8b | |
|
05136ecbde | |
|
dc86d23667 | |
|
d808b3d35a | |
|
d1a854793c | |
|
6bca3ce327 | |
|
bf74dd9fa4 | |
|
f1f89d29d7 | |
|
c8c3aa6d54 | |
|
60fc10dfb1 | |
|
7f86dab0d2 | |
|
5978d58a55 | |
|
c73465d878 | |
|
6af13bbb03 | |
|
e70d73f505 | |
|
4a42f4deef | |
|
a4803fa3cb | |
|
ce48bdc2a5 | |
|
443a79e302 | |
|
5893b5df1f | |
|
586fd9bc78 | |
|
dfe1cf866a | |
|
467ebf9e05 | |
|
b969af9fac | |
|
3db6307a94 | |
|
8796fcdf37 | |
|
2a4e98f037 | |
|
034574d597 | |
|
35ead410c7 | |
|
05ece71d61 | |
|
35759ee3f7 | |
|
b7ec1e3d7d | |
|
c654b195ed | |
|
2deaecf5b7 | |
|
bff55c09b1 | |
|
cc38c6ed78 | |
|
d4d6698168 | |
|
84f0861e8f | |
|
825dec2682 | |
|
ce6f67bcd7 | |
|
7d80304359 | |
|
7386795291 | |
|
013561242a | |
|
7ae3da4b46 | |
|
2c67d0643e | |
|
c3f2e52e66 | |
|
d3f3692511 | |
|
510f03d620 | |
|
ca977a97e2 | |
|
d18790c7aa | |
|
4138925778 | |
|
8ab314f864 | |
|
7ec5faff37 | |
|
d2a1b70ae2 | |
|
a8131ee447 | |
|
b9bd03eba6 | |
|
8e96406a65 | |
|
248a136ec8 | |
|
c3cc7aa0e0 | |
|
1f18c5ba45 | |
|
4a7f8742a0 | |
|
b67f0a7c73 | |
|
16c56d2129 | |
|
0d4fe03a45 | |
|
88c73a3aae | |
|
adf7f6f224 | |
|
159aaae1e5 | |
|
ebfe161c9d | |
|
4c4e981335 | |
|
0c391bbdb2 | |
|
3f866acd50 | |
|
06f4e57f8b | |
|
bd62b07323 | |
|
08e6b91252 | |
|
50c5d212de | |
|
aba3d34482 | |
|
aa72ff2a73 | |
|
ed21519b5b | |
|
85ecc6c7d0 | |
|
a8847f467e | |
|
68cb4b9b9f | |
|
99c70fd751 | |
|
5f35753c4c | |
|
f8ed14fa2d | |
|
ee36b266dc | |
|
8ff0cf96d1 | |
|
02a51499d2 | |
|
50fd11f9c4 | |
|
4468296e45 | |
|
da2057c9f1 | |
|
fbde7f34c2 | |
|
fb5175cd09 | |
|
a2d50c5a0c | |
|
361ab02713 | |
|
8ab00e2b8d | |
|
d96fcff619 | |
|
57ab4367be | |
|
d4b893ed6e | |
|
39af0d89d1 | |
|
ddcfc565e5 | |
|
227d9828e0 | |
|
82a44935be | |
|
6ecb954be5 | |
|
10c61e9913 | |
|
7452a19ee9 | |
|
1c6c398d2f | |
|
bed964b003 | |
|
8ab63bc6ec | |
|
cee105f210 | |
|
6f81187b19 | |
|
12a5f55b61 | |
|
ff1bea9af7 | |
|
45ec9f9223 | |
|
e52bee6f34 | |
|
a373d42e61 | |
|
496717c2b7 | |
|
9363b933c0 | |
|
7670727995 | |
|
71d8e2c2d4 | |
|
ecedf5e2e3 | |
|
9d625e6733 | |
|
43ca789903 | |
|
f9bd6a64e0 | |
|
08bda9879a | |
|
de4904d735 | |
|
02084066c7 | |
|
68da25785e | |
|
aaa0b65c0e | |
|
dacf98f197 | |
|
28013f5063 | |
|
1a9a76d532 | |
|
5c6695a183 | |
|
ff3e5b14e7 | |
|
7986ef4d5a | |
|
098e1db25d | |
|
8af0329237 | |
|
996ec56cd3 | |
|
79d19ea0cb | |
|
2a8d1dab16 | |
|
30899e64ab | |
|
54ccd5c724 | |
|
45504f6a9d | |
|
5c3167a563 | |
|
9e76d16476 | |
|
a97d750d31 | |
|
11315cd0c1 | |
|
8684e60075 | |
|
5d7e1d470f | |
|
4263af5a9f | |
|
f757c9ab9a | |
|
ef6f3c40b6 | |
|
7afb18671b | |
|
5fae5fea82 | |
|
e99609b14a | |
|
7f896634af | |
|
8a05800c9b | |
|
d73afe2fb9 | |
|
03bd9a1f05 | |
|
8b78d4869f | |
|
d124c15f6f | |
|
88dda94418 | |
|
3f9cb87342 | |
|
1b731ff278 | |
|
ceac8ca51a | |
|
ccc85d40bf | |
|
f7f3539bbc | |
|
b4f2ab1922 | |
|
cea548dedb | |
|
e0f6dba758 | |
|
c680635d5b | |
|
50bddc8a94 | |
|
71ccacd1d6 | |
|
e55ee1ef3b | |
|
15bb1ffe28 | |
|
9c0a233373 | |
|
1f1c6e47cd | |
|
fcffdfd8a6 | |
|
ae300f4f76 | |
|
d5b68b9439 | |
|
b64de1cfeb | |
|
a3c3096844 | |
|
1870b921c4 | |
|
eb4fcd1ab9 | |
|
dee12b8911 | |
|
495da3018d | |
|
46c6372063 | |
|
e9af9b4ef9 | |
|
2755727f0f | |
|
5c82b7f819 | |
|
8d88aa2f1d | |
|
4f1af7bbbe | |
|
85dede8e8a | |
|
ec9a05b6f5 | |
|
7ce64bd41c | |
|
1000b510a0 | |
|
8c90fadc3e | |
|
1f7bec4290 | |
|
6ef6b8bb58 | |
|
a621a4bdf4 | |
|
9be2f2e0e0 | |
|
62bdb96285 | |
|
847ad70742 | |
|
ea7701da58 | |
|
a05005028a | |
|
0fa638601a | |
|
d7f862bac5 | |
|
c250a4be2b | |
|
7238068ba4 | |
|
bab9d2e0a7 | |
|
e3616c5761 | |
|
5c7c8cd3ff | |
|
63c303b915 | |
|
1f96038a60 | |
|
91cafad2df | |
|
a3f3374857 | |
|
d9fa215e4f | |
|
0a7b3f23de | |
|
c7c6a23eac | |
|
3e74703122 | |
|
f386bc85bd | |
|
83d6634616 | |
|
c0404958c2 | |
|
1ce51ec4b8 | |
|
4c77a6ef61 | |
|
d286a5e1fe | |
|
1a830ce9b5 | |
|
53a69c0edb | |
|
d093c450e2 | |
|
5f4b79b38e | |
|
3f5575b0b0 | |
|
8c1f657f45 | |
|
c7c9d46d52 | |
|
e998514a53 | |
|
28a187895f | |
|
9b338b6b65 | |
|
7be7e80949 | |
|
ffcec42472 | |
|
36215c47b0 | |
|
dfaa87222a | |
|
edd2d7c564 | |
|
b42eee70b8 | |
|
aabec8e1f1 | |
|
d20a30832a | |
|
ec42820a7a | |
|
7ec1309115 | |
|
7e970f4c97 | |
|
594c8bf78d | |
|
b9bb291a8d | |
|
3bfc6ae439 | |
|
68e37ab7a5 | |
|
af7067b86f | |
|
0813583381 | |
|
54927b1826 | |
|
138d2bf7bb | |
|
66209846d5 | |
|
9c2647a092 | |
|
6a2eedbe31 | |
|
c678ff6408 | |
|
ab07ad8755 | |
|
b566d9860a | |
|
9a39318a1f | |
|
177e9be2b9 | |
|
7d5eddf58e | |
|
09e29fbc77 | |
|
246077e655 | |
|
0f9a78bbbc | |
|
3fcd6211a8 | |
|
5fbe11611b | |
|
be36981737 | |
|
648060108a | |
|
5af6bee4ab | |
|
74dad3147a | |
|
172ac4fc9a | |
|
1cb30ff9b2 | |
|
42cdeb24e8 | |
|
8f6202aa37 | |
|
8e9eaee296 | |
|
a1b11a6a04 | |
|
0105da87cd | |
|
efe48e0f44 | |
|
3bd6da3454 | |
|
01b8546a16 | |
|
47aa55956a | |
|
c3eff2da61 | |
|
7f5880617b | |
|
9e9a8c0423 | |
|
22661f03c2 | |
|
8edf7fdb2a | |
|
dc4d2ac4a4 | |
|
3c1aaaddf9 | |
|
d271918c51 | |
|
c28d0b3914 | |
|
5cbfe7e458 | |
|
30c5830815 | |
|
42ac8f8dae | |
|
07af879a40 | |
|
600c0d3908 | |
|
dc4dc1a85d | |
|
4db3763e6d | |
|
7c5a8cb764 | |
|
5e8d30c305 | |
|
d06253fce8 | |
|
ca977860f6 | |
|
484f52f2c8 | |
|
9ed67842e7 | |
|
51f6e82de9 | |
|
15569603e2 | |
|
1cec83d518 | |
|
a3a0232bbb | |
|
f45f61d725 | |
|
743acf0e11 | |
|
574275d650 | |
|
bd88fa6815 | |
|
11c6b99a9d | |
|
fb8c13f488 | |
|
924223e6e1 | |
|
4ab07a64ba | |
|
6e2c224bfc | |
|
79976c37ca | |
|
399d6f8b55 | |
|
7fd1d0a121 | |
|
772f342e7a |
|
@ -5,43 +5,58 @@ body:
|
|||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report! Before proceeding, please check that a similar issue has not already been reported. [View open issues](https://github.com/jpanther/congo/issues)
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
Before proceeding, please ensure the issue you're reporting is:
|
||||
- not caused by local customisations in your project
|
||||
- reproducible using the latest stable release of the theme
|
||||
- not due to the local Hugo cache being out of date (run `hugo mod clean` to clear the cache)
|
||||
- not already covered by an open issue ([check open issues](https://github.com/jpanther/congo/issues))
|
||||
- not a general question or feature request (use [GitHub Discussions](https://github.com/jpanther/congo/discussions) instead)
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
id: issue-description
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Describe the issue and how to reproduce it, including what you expected to happen.
|
||||
label: Issue description
|
||||
description: Describe the issue and how to reproduce it, including what you expected to happen. Be as detailed as possible, particularly if the issue only appears under a specific configuration.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: theme-version
|
||||
attributes:
|
||||
label: Theme version
|
||||
description: What version of the theme are you using?
|
||||
placeholder: eg. v1.1.0
|
||||
description: What version of Congo are you using? An easy way to check the version of the code running in your environment is by verifying the theme version comment at the top of the `main.css` file in the built output of your site.
|
||||
placeholder: eg. v2.7.1
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: hugo-version
|
||||
attributes:
|
||||
label: Hugo version
|
||||
description: What version of Hugo are you using?
|
||||
placeholder: eg. v0.86.1
|
||||
description: What version of Hugo are you using? Please provide the output of the `hugo version` command.
|
||||
placeholder: eg. hugo v0.119.0+extended darwin/arm64
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: browsers
|
||||
attributes:
|
||||
label: What browsers are you seeing the problem on?
|
||||
label: Which browser rendering engines are you seeing the problem on?
|
||||
description: Select any that you have tested. This is particularly important for CSS issue reports.
|
||||
multiple: true
|
||||
options:
|
||||
- Firefox
|
||||
- Chrome
|
||||
- Safari
|
||||
- Microsoft Edge
|
||||
- Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.)
|
||||
- Firefox (Mozilla Firefox)
|
||||
- WebKit (Safari)
|
||||
- Other (Please include details in the issue description)
|
||||
- type: input
|
||||
id: sample-url
|
||||
attributes:
|
||||
label: URL to sample repository or website
|
||||
description: If you have a repository or deployed Hugo website that demonstrates this issue, please provide the URL.
|
||||
placeholder: https://github.com/jpanther/congo
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant Hugo log output
|
||||
description: Please copy and paste any relevant Hugo log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
label: Hugo output or build error messages
|
||||
description: Please copy and paste any relevant log output from Hugo or your build system. This will be automatically formatted into code, so no need for backticks.
|
||||
render: bash
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
i18n:
|
||||
- i18n/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: i18n/*
|
||||
|
||||
documentation:
|
||||
- "*.md"
|
||||
- exampleSite/content/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "**/*.md"
|
||||
|
|
|
@ -8,36 +8,36 @@ jobs:
|
|||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "${{ github.head_ref }}"
|
||||
- name: Install dependencies and Build Theme
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
- run: npm install
|
||||
- run: npm run assets
|
||||
- name: Commit and push Chart.js changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
branch: "${{ github.head_ref }}"
|
||||
push_options: "--dry-run"
|
||||
file_pattern: "assets/lib/chart/*"
|
||||
commit_message: "📦 Update packaged ChartJS"
|
||||
- name: Commit Fuse changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
branch: "${{ github.head_ref }}"
|
||||
push_options: "--dry-run"
|
||||
file_pattern: "assets/lib/fuse/*"
|
||||
commit_message: "📦 Update packaged FuseJS"
|
||||
- name: Commit KaTeX changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
branch: "${{ github.head_ref }}"
|
||||
push_options: "--dry-run"
|
||||
file_pattern: "assets/lib/katex/*"
|
||||
commit_message: "📦 Update packaged KaTeX"
|
||||
- name: Commit Mermaid changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
branch: "${{ github.head_ref }}"
|
||||
push_options: "--dry-run"
|
||||
|
@ -45,7 +45,7 @@ jobs:
|
|||
commit_message: "📦 Update packaged Mermaid"
|
||||
- run: npm run build
|
||||
- name: Commit CSS changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
branch: "${{ github.head_ref }}"
|
||||
push_options: "--dry-run"
|
||||
|
|
|
@ -13,22 +13,23 @@ jobs:
|
|||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
uses: peaceiris/actions-hugo@v3
|
||||
with:
|
||||
hugo-version: "latest"
|
||||
extended: true
|
||||
|
||||
- name: Build
|
||||
working-directory: ./exampleSite
|
||||
run: hugo --minify --themesDir ../.. --buildDrafts --baseURL https://jpanther.github.io/congo/
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: ${{ github.ref == 'refs/heads/stable' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Label
|
||||
uses: actions/labeler@v4
|
||||
uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/labeller.yml
|
||||
|
|
|
@ -10,10 +10,10 @@ jobs:
|
|||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v6
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
days-before-stale: 30
|
||||
days-before-close: 14
|
||||
days-before-stale: 120
|
||||
days-before-close: 30
|
||||
stale-issue-label: "stale"
|
||||
exempt-issue-labels: "wip"
|
||||
stale-pr-label: "stale"
|
||||
|
@ -23,10 +23,10 @@ jobs:
|
|||
|
||||
If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open.
|
||||
|
||||
This issue will automactically close in 14 days if no further activity occurs.
|
||||
This issue will automatically close in 30 days if no further activity occurs.
|
||||
stale-pr-message: >
|
||||
This pull request has been automatically marked as stale because it has not had any recent activity.
|
||||
|
||||
Please review the PR history and add a reply with any requested information. If no information has been requested, it may be that this contribution does not fit with the project objectives, or does not adhere to the [contributing guidelines](https://github.com/jpanther/congo/blob/dev/CONTRIBUTING.md). If this is in error, please add a reply with further details.
|
||||
|
||||
This PR will automactically close in 14 days if no further activity occurs.
|
||||
This PR will automatically close in 30 days if no further activity occurs.
|
||||
|
|
|
@ -10,15 +10,16 @@ jobs:
|
|||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
uses: peaceiris/actions-hugo@v3
|
||||
with:
|
||||
hugo-version: "latest"
|
||||
extended: true
|
||||
|
||||
- name: Build
|
||||
working-directory: ./exampleSite
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/assets/css/compiled/
|
||||
/assets/lib/
|
||||
|
||||
/layouts/_default/_markup/*.html
|
||||
/layouts/shortcodes/figure.html
|
||||
/layouts/shortcodes/screenshot.html
|
||||
|
||||
/exampleSite/content/docs/version-2/lighthouse.html
|
|
@ -1,13 +1,15 @@
|
|||
{
|
||||
"plugins": ["prettier-plugin-go-template", "prettier-plugin-tailwindcss"],
|
||||
"goTemplateBracketSpacing": true,
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"printWidth": 100,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"trailingComma": "es5",
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"files": ["*.html", "layouts/_default/*.json"],
|
||||
"options": {
|
||||
"parser": "go-template"
|
||||
}
|
||||
|
|
333
CHANGELOG.md
|
@ -6,6 +6,316 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Umami Analytics support ([#832](https://github.com/jpanther/congo/pull/832))
|
||||
- Theme parameter to set a default HTML theme colour ([#849](https://github.com/jpanther/congo/pull/849))
|
||||
- New icon for `bluesky` ([#851](https://github.com/jpanther/congo/pull/851))
|
||||
|
||||
## [2.8.2] - 2024-04-17
|
||||
|
||||
### Added
|
||||
|
||||
- Tamil translation ([#830](https://github.com/jpanther/congo/pull/830))
|
||||
- Vietnamese translation ([#845](https://github.com/jpanther/congo/pull/845))
|
||||
- Swedish translation ([#852](https://github.com/jpanther/congo/pull/852))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to KaTeX v0.16.10 ([#839](https://github.com/jpanther/congo/pull/839))
|
||||
- Upgrade to Typography v0.5.12 ([#841](https://github.com/jpanther/congo/pull/841), [#860](https://github.com/jpanther/congo/pull/860))
|
||||
- Upgrade to Tailwind v3.4.3 ([#843](https://github.com/jpanther/congo/pull/843))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Background color inconsistent on mobile when dark mode enabled ([#796](https://github.com/jpanther/congo/issues/796))
|
||||
|
||||
## [2.8.1] - 2024-03-09
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to ChartJS v4.4.2 ([#817](https://github.com/jpanther/congo/pull/817))
|
||||
- Upgrade to Mermaid v10.9.0 ([#825](https://github.com/jpanther/congo/pull/825))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Table of Contents missing left border detail ([#794](https://github.com/jpanther/congo/issues/794))
|
||||
- `x-twitter` option missing when using sharing links ([#809](https://github.com/jpanther/congo/issues/809))
|
||||
- Chinese default config contains incorrect `author` block name ([#807](https://github.com/jpanther/congo/pull/807))
|
||||
- Links in articles are prefixed with a blank space ([#813](https://github.com/jpanther/congo/pull/813))
|
||||
- HTML tables would not fill the container width on desktop ([#826](https://github.com/jpanther/congo/issues/826))
|
||||
|
||||
## [2.8.0] - 2024-01-22
|
||||
|
||||
### Added
|
||||
|
||||
- Quicklink support ([#646](https://github.com/jpanther/congo/pull/646))
|
||||
- Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693))
|
||||
- Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
|
||||
- Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719))
|
||||
- New icons for `line`, `google-scholar`, `mendeley` and `weibo` ([#719](https://github.com/jpanther/congo/pull/719), [#755](https://github.com/jpanther/congo/pull/755), [#756](https://github.com/jpanther/congo/pull/756))
|
||||
- Weibo sharing links ([#756](https://github.com/jpanther/congo/pull/756))
|
||||
- Support for Tailwind '950' colour variants ([#751](https://github.com/jpanther/congo/pull/751))
|
||||
- Table of contents will now scroll if taller than the browser height ([#733](https://github.com/jpanther/congo/pull/733))
|
||||
- External URL article stubs now auto-redirect if leaf pages are generated ([#778](https://github.com/jpanther/congo/pull/778))
|
||||
- Korean translation ([#731](https://github.com/jpanther/congo/pull/731))
|
||||
- Chinese translation of Example site and Docs ([#776](https://github.com/jpanther/congo/pull/776))
|
||||
|
||||
### Changed
|
||||
|
||||
- ⚠️ Hugo extended version is now required when building sites
|
||||
- ⚠️ Author params block in language configuration has been moved to `params.author` ([#704](https://github.com/jpanther/congo/pull/704))
|
||||
- Refactored image logic into a new `picture.html` partial ([#693](https://github.com/jpanther/congo/pull/693))
|
||||
- Upgrade to ChartJS v4.4.1 ([#736](https://github.com/jpanther/congo/pull/736))
|
||||
- Upgrade to Tailwind v3.4.1 ([#737](https://github.com/jpanther/congo/pull/737), [#752](https://github.com/jpanther/congo/pull/752), [#759](https://github.com/jpanther/congo/pull/759), [#774](https://github.com/jpanther/congo/pull/774))
|
||||
- Upgrade to Mermaid v10.7.0 ([#782](https://github.com/jpanther/congo/pull/782))
|
||||
- Updated Japanese translation ([#750](https://github.com/jpanther/congo/pull/750))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Hamburger menu is not dismissed when links are clicked ([#705](https://github.com/jpanther/congo/pull/705))
|
||||
- KaTeX, table and code elements wider than the page are not formatted correctly ([#753](https://github.com/jpanther/congo/pull/753))
|
||||
- 'ß' character is output at the top of articles ([#764](https://github.com/jpanther/congo/pull/764))
|
||||
- Article metadata element is output when there is no metadata to display ([#786](https://github.com/jpanther/congo/pull/786))
|
||||
- Header elements not vertically centered when using locale switcher ([#788](https://github.com/jpanther/congo/pull/788))
|
||||
|
||||
### Removed
|
||||
|
||||
- Fathom Analytics custom domain parameter, as this is no longer supported by Fathom
|
||||
|
||||
## [2.7.6] - 2023-11-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Some Mermaid diagram elements not styled correctly in dark mode ([#706](https://github.com/jpanther/congo/issues/706))
|
||||
|
||||
## [2.7.5] - 2023-11-25
|
||||
|
||||
### Added
|
||||
|
||||
- Ukrainian translation ([#703](https://github.com/jpanther/congo/pull/703))
|
||||
- Bulgarian translation ([#718](https://github.com/jpanther/congo/pull/718))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Dutch translation ([#696](https://github.com/jpanther/congo/pull/696))
|
||||
- Upgrade to Mermaid v10.6.1 ([#697](https://github.com/jpanther/congo/pull/697))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Some files have unnecessary execute permissions ([#714](https://github.com/jpanther/congo/pull/714))
|
||||
- Empty block is output when locale switcher is hidden ([#699](https://github.com/jpanther/congo/pull/699))
|
||||
|
||||
## [2.7.4] - 2023-11-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- Links with non-whitespace characters preceeding them are prefixed with a space ([#695](https://github.com/jpanther/congo/issues/695))
|
||||
|
||||
## [2.7.3] - 2023-10-31
|
||||
|
||||
### Fixed
|
||||
|
||||
- Article metadata HTML is output as text when using Hugo v0.120.0 ([#689](https://github.com/jpanther/congo/pull/689))
|
||||
|
||||
## [2.7.2] - 2023-10-26
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to Tailwind v3.3.5 ([#681](https://github.com/jpanther/congo/pull/681), [#686](https://github.com/jpanther/congo/pull/686))
|
||||
- Upgrade to Mermaid v10.6.0 ([#684](https://github.com/jpanther/congo/pull/684))
|
||||
- Upgrade to FuseJS v7.0.0 ([#685](https://github.com/jpanther/congo/pull/685))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Empty block is output when locale switcher is hidden ([#678](https://github.com/jpanther/congo/issues/678))
|
||||
- Extra whitespace added after links ([#679](https://github.com/jpanther/congo/issues/679))
|
||||
|
||||
## [2.7.1] - 2023-10-24
|
||||
|
||||
### Changed
|
||||
|
||||
- Minor refactor to improve memory efficiency in search results ([#650](https://github.com/jpanther/congo/pull/650))
|
||||
- Links in Markdown content are now portable ([#655](https://github.com/jpanther/congo/pull/655))
|
||||
|
||||
### Fixed
|
||||
|
||||
- JavaScript error setting theme colour when site is loaded in dark mode ([#676](https://github.com/jpanther/congo/issues/676))
|
||||
|
||||
## [2.7.0] - 2023-10-23
|
||||
|
||||
### Added
|
||||
|
||||
- New portable locale picker that can be placed in any menu using the `locale` action ([#583](https://github.com/jpanther/congo/issues/583))
|
||||
- New icons for `chevron-down`, `chevron-up`, `globe`, `translate`, `coffee` and `x-twitter` ([#669](https://github.com/jpanther/congo/pull/669))
|
||||
- Plausible Analytics support ([#584](https://github.com/jpanther/congo/pull/584))
|
||||
- Spanish translation of example site samples ([#606](https://github.com/jpanther/congo/pull/606))
|
||||
- Japanese translation of docs and example site ([#618](https://github.com/jpanther/congo/pull/618))
|
||||
- German translation of example site ([#631](https://github.com/jpanther/congo/pull/631))
|
||||
|
||||
### Changed
|
||||
|
||||
- ⚠️ Renamed the `params.rtl` language parameter to `languageDirection` as this is now supported by Hugo ([#583](https://github.com/jpanther/congo/issues/583))
|
||||
- Robots.txt file now allows all by default without concern for whether the environment is set to production ([#620](https://github.com/jpanther/congo/pull/620))
|
||||
- Refactored the `head.html` partial to improve perceived performance on page load
|
||||
- Upgrade to Mermaid v10.5.1 ([#577](https://github.com/jpanther/congo/pull/577), [#582](https://github.com/jpanther/congo/pull/582), [#626](https://github.com/jpanther/congo/pull/626), [#638](https://github.com/jpanther/congo/pull/638), [#663](https://github.com/jpanther/congo/pull/663), [#674](https://github.com/jpanther/congo/pull/674))
|
||||
- Upgrade to KaTeX v0.16.9 ([#590](https://github.com/jpanther/congo/pull/590), [#664](https://github.com/jpanther/congo/pull/664))
|
||||
- Upgrade to Tailwind v3.3.3 ([#602](https://github.com/jpanther/congo/pull/602))
|
||||
- Upgrade to ChartJS v4.3.3 ([#616](https://github.com/jpanther/congo/pull/616), [#627](https://github.com/jpanther/congo/pull/627), [#635](https://github.com/jpanther/congo/pull/635))
|
||||
- Upgrade to Typography v0.5.10 ([#641](https://github.com/jpanther/congo/pull/641))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Prominent images in content and site layout are lazy loaded ([#591](https://github.com/jpanther/congo/issues/591))
|
||||
- TypeError is output to console when viewing leaf pages ([#596](https://github.com/jpanther/congo/issues/596))
|
||||
- URL to Congo project in footer used deprecated git.io short link ([#605](https://github.com/jpanther/congo/issues/605))
|
||||
- Various typos in the docs and example site ([#608](https://github.com/jpanther/congo/pull/608), [#609](https://github.com/jpanther/congo/pull/609), [#613](https://github.com/jpanther/congo/pull/613))
|
||||
- Incorrect `render` value is used in the 'external' archetype ([#630](https://github.com/jpanther/congo/pull/630))
|
||||
- Images are missing `width` and `height` attributes ([#645](https://github.com/jpanther/congo/pull/645))
|
||||
- Extended head partial does not include page context ([#658](https://github.com/jpanther/congo/pull/658))
|
||||
- Taxonomy tags aren't padded when wrapping onto a new line ([#671](https://github.com/jpanther/congo/pull/671))
|
||||
- Minor CSS improvements, mainly relating to RTL styling
|
||||
- Minor typos
|
||||
|
||||
### Removed
|
||||
|
||||
- Locales no longer appear next to the site name/logo as they are now part of the menu system ([#583](https://github.com/jpanther/congo/issues/583))
|
||||
- Language parameters `isoCode` and `displayName` are no longer supported ([#583](https://github.com/jpanther/congo/issues/583))
|
||||
- Meta `content-language` tag as it was not conveying the intended data (which is already included via the HTML `lang` attribute)
|
||||
|
||||
## [2.6.1] - 2023-06-04
|
||||
|
||||
### Changed
|
||||
|
||||
- Images are now marked for lazy loading by default ([#552](https://github.com/jpanther/congo/pull/552))
|
||||
- Current language is no longer displayed in language selection ([#565](https://github.com/jpanther/congo/issues/565))
|
||||
- Updated Simplified Chinese (China) translation ([#573](https://github.com/jpanther/congo/pull/573))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Language selection repeats current language on multilingual sites instead of linking to translated content ([#565](https://github.com/jpanther/congo/issues/565))
|
||||
- Icon padding inconsistent when using `--minify` option to build site ([#568](https://github.com/jpanther/congo/pull/568))
|
||||
- Copyright string in the language configuration does not apply ([#572](https://github.com/jpanther/congo/issues/572))
|
||||
- Upgrade to Mermaid v10.2.1 ([#569](https://github.com/jpanther/congo/pull/569))
|
||||
|
||||
## [2.6.0] - 2023-05-25
|
||||
|
||||
### Added
|
||||
|
||||
- Support for Hugo v0.112.0
|
||||
- Ability to specify an alternate logo image when dark appearance is active ([#533](https://github.com/jpanther/congo/pull/533), [#543](https://github.com/jpanther/congo/pull/543))
|
||||
- Ability to specify the hashing algorithm that is used when fingerprinting assets ([#478](https://github.com/jpanther/congo/issues/478))
|
||||
- Arabic translation ([#521](https://github.com/jpanther/congo/pull/521))
|
||||
- Slovak translation ([#541](https://github.com/jpanther/congo/pull/541))
|
||||
- Czech translation ([#541](https://github.com/jpanther/congo/pull/541))
|
||||
|
||||
### Changed
|
||||
|
||||
- ⚠️ Some parameters in the root of the Languages config file have been nested under the `params` block
|
||||
- Search results now respect `showDate` value when displaying article metadata ([#511](https://github.com/jpanther/congo/pull/511))
|
||||
- Adopted new Tailwind logical properties for RTL styling
|
||||
- Article sharing links now open in a new tab/window
|
||||
- Updated Dutch translation ([#544](https://github.com/jpanther/congo/pull/544))
|
||||
- Upgrade to Tailwind v3.3.1 ([#523](https://github.com/jpanther/congo/pull/523))
|
||||
- Upgrade to KaTeX v0.16.7 ([#538](https://github.com/jpanther/congo/pull/538), [#549](https://github.com/jpanther/congo/pull/549))
|
||||
- Upgrade to Chart.js v4.3.0 ([#551](https://github.com/jpanther/congo/pull/551))
|
||||
- Upgrade to Mermaid v10.2.0 ([#563](https://github.com/jpanther/congo/pull/563))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Some `srcset` values are broken when using Hugo `--minify` option ([#508](https://github.com/jpanther/congo/pull/508))
|
||||
- Author images are cropped off-centre during image processing ([#527](https://github.com/jpanther/congo/pull/527))
|
||||
- Site doesn't build when using Hugo v0.112.0 ([#561](https://github.com/jpanther/congo/pull/561))
|
||||
|
||||
## [2.5.4] - 2023-03-20
|
||||
|
||||
### Added
|
||||
|
||||
- Polish translation ([#497](https://github.com/jpanther/congo/pull/497))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Russian translation ([#502](https://github.com/jpanther/congo/pull/502))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Bengali translation prevents site building in certain configurations ([#503](https://github.com/jpanther/congo/issues/503))
|
||||
|
||||
## [2.5.3] - 2023-03-05
|
||||
|
||||
### Added
|
||||
|
||||
- Russian translation ([#485](https://github.com/jpanther/congo/pull/485))
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated German translation ([#475](https://github.com/jpanther/congo/pull/475))
|
||||
- Upgrade to Chart.js v4.2.1 ([#472](https://github.com/jpanther/congo/pull/472))
|
||||
- Upgrade to Mermaid v9.4.0 ([#473](https://github.com/jpanther/congo/pull/473))
|
||||
- Upgrade to Tailwind v3.2.7 ([#491](https://github.com/jpanther/congo/pull/491))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Caching the analytics partial prevents some advanced analytics use cases ([#480](https://github.com/jpanther/congo/issues/480))
|
||||
|
||||
## [2.5.2] - 2023-01-24
|
||||
|
||||
### Added
|
||||
|
||||
- New icons for `mobile` and `phone`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Author links containing URLs in non-hypertext schemes (ie. `tel:`) would not be created as links ([#452](https://github.com/jpanther/congo/pull/452))
|
||||
- Extra whitespace inserted after links within Markdown content ([#456](https://github.com/jpanther/congo/pull/456))
|
||||
|
||||
## [2.5.1] - 2023-01-20
|
||||
|
||||
### Changed
|
||||
|
||||
- External links are now automatically appended with `rel="noreferrer noopener"` ([#446](https://github.com/jpanther/congo/pull/446))
|
||||
- Updated Traditional Chinese (Taiwan) translation ([#448](https://github.com/jpanther/congo/pull/448))
|
||||
- Upgrade to Chart.js v4.2.0 ([#449](https://github.com/jpanther/congo/pull/449))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Page alignment off-centre when opening hamburger menu at wide viewports ([#445](https://github.com/jpanther/congo/issues/445))
|
||||
|
||||
## [2.5.0] - 2023-01-17
|
||||
|
||||
### Added
|
||||
|
||||
- Support for icons in menus including support for links styled as an icon by itself or an icon with text
|
||||
- Search and appearance switcher links can now be fully customised and positioned anywhere in the menu
|
||||
- Front matter support for specifying article thumbnails, covers and featured image details (including filename pattern, alt text and caption)
|
||||
- Two new colour schemes - `cherry` and `sapphire`
|
||||
- Support for SVG assets as article thumbnails, covers and featured images
|
||||
- Front matter keywords support on a per article basis
|
||||
- Indonesian translation ([#398](https://github.com/jpanther/congo/pull/398))
|
||||
- Mastodon sharing links ([#405](https://github.com/jpanther/congo/pull/405))
|
||||
- `homepage.recentLimit` parameter to adjust the maximum number of recent items listed on the homepage ([#411](https://github.com/jpanther/congo/pull/411))
|
||||
|
||||
### Changed
|
||||
|
||||
- Images smaller than the article width are no longer resized to fill the content area and will now simply align centre ([#394](https://github.com/jpanther/congo/pull/394))
|
||||
- Upgrade to KaTeX v0.16.4 ([#414](https://github.com/jpanther/congo/pull/414))
|
||||
- Upgrade to Mermaid v9.3.0 ([#419](https://github.com/jpanther/congo/pull/419))
|
||||
- Upgrade to Chart.js v4.1.2 ([#420](https://github.com/jpanther/congo/pull/420), [#434](https://github.com/jpanther/congo/pull/434))
|
||||
- Upgrade to Typography v0.5.9 ([#437](https://github.com/jpanther/congo/pull/437))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `mainSections` parameter is language dependent and is not referenced from `params.toml` ([#376](https://github.com/jpanther/congo/pull/376))
|
||||
- Code highlight background cut off in Google Chrome when overflowing content area ([#383](https://github.com/jpanther/congo/pull/383))
|
||||
- Social icons shift position during CSS transition when hovered in Safari ([#396](https://github.com/jpanther/congo/pull/396))
|
||||
- Hamburger navigation menu is misaligned in mobile browsers ([#399](https://github.com/jpanther/congo/pull/399))
|
||||
- Error when attempting to resize SVG assets in page bundles ([#427](https://github.com/jpanther/congo/pull/427))
|
||||
- Appearance switcher missing `aria-label` ([#438](https://github.com/jpanther/congo/pull/438))
|
||||
- Article links missing `alt` text and `aria-label` ([#439](https://github.com/jpanther/congo/pull/439))
|
||||
- Line height in article tag list would cause overlap when wrapping to a new line ([#444](https://github.com/jpanther/congo/pull/444))
|
||||
- Figure shortcode would not apply `class` or `href` attribtues in some cases
|
||||
- Charts displaying with incorrect theme colours
|
||||
|
||||
## [2.4.2] - 2022-11-22
|
||||
|
||||
### Added
|
||||
|
@ -134,7 +444,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
### Added
|
||||
|
||||
- Breadcrumb display can now be can now be specificed in front matter for articles and list pages
|
||||
- Breadcrumb display can now be can now be specified in front matter for articles and list pages
|
||||
- Italian translation ([#209](https://github.com/jpanther/congo/pull/209))
|
||||
|
||||
### Changed
|
||||
|
@ -434,7 +744,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
- Dark mode toggle with new theme parameters for managing light/dark appearance
|
||||
- French translation ([#18](https://github.com/jpanther/congo/pull/18))
|
||||
- Author bio in article footer
|
||||
- Grouping by year can now be specificed in front matter on list pages
|
||||
- Grouping by year can now be specified in front matter on list pages
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -570,7 +880,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
- Advanced customisation using simple Tailwind colour definitions and styles
|
||||
- Fully documented
|
||||
|
||||
[unreleased]: https://github.com/jpanther/congo/compare/v2.4.2...HEAD
|
||||
[Unreleased]: https://github.com/jpanther/congo/compare/v2.8.2...HEAD
|
||||
[2.8.2]: https://github.com/jpanther/congo/compare/v2.8.1...v2.8.2
|
||||
[2.8.1]: https://github.com/jpanther/congo/compare/v2.8.0...v2.8.1
|
||||
[2.8.0]: https://github.com/jpanther/congo/compare/v2.7.6...v2.8.0
|
||||
[2.7.6]: https://github.com/jpanther/congo/compare/v2.7.5...v2.7.6
|
||||
[2.7.5]: https://github.com/jpanther/congo/compare/v2.7.4...v2.7.5
|
||||
[2.7.4]: https://github.com/jpanther/congo/compare/v2.7.3...v2.7.4
|
||||
[2.7.3]: https://github.com/jpanther/congo/compare/v2.7.2...v2.7.3
|
||||
[2.7.2]: https://github.com/jpanther/congo/compare/v2.7.1...v2.7.2
|
||||
[2.7.1]: https://github.com/jpanther/congo/compare/v2.7.0...v2.7.1
|
||||
[2.7.0]: https://github.com/jpanther/congo/compare/v2.6.1...v2.7.0
|
||||
[2.6.1]: https://github.com/jpanther/congo/compare/v2.6.0...v2.6.1
|
||||
[2.6.0]: https://github.com/jpanther/congo/compare/v2.5.4...v2.6.0
|
||||
[2.5.4]: https://github.com/jpanther/congo/compare/v2.5.3...v2.5.4
|
||||
[2.5.3]: https://github.com/jpanther/congo/compare/v2.5.2...v2.5.3
|
||||
[2.5.2]: https://github.com/jpanther/congo/compare/v2.5.1...v2.5.2
|
||||
[2.5.1]: https://github.com/jpanther/congo/compare/v2.5.0...v2.5.1
|
||||
[2.5.0]: https://github.com/jpanther/congo/compare/v2.4.2...v2.5.0
|
||||
[2.4.2]: https://github.com/jpanther/congo/compare/v2.4.1...v2.4.2
|
||||
[2.4.1]: https://github.com/jpanther/congo/compare/v2.4.0...v2.4.1
|
||||
[2.4.0]: https://github.com/jpanther/congo/compare/v2.3.1...v2.4.0
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
# Code of Conduct - Congo
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behaviour that contributes to a positive environment for our community include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologising to those affected by our mistakes, and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the overall community
|
||||
|
||||
Examples of unacceptable behaviour include:
|
||||
|
||||
- The use of sexualised language or imagery, and sexual attention or advances
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any instances of unacceptable behaviour.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the [project maintainer](https://github.com/jpanther/). All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version [1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and [2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md), and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
|
|
@ -35,9 +35,9 @@
|
|||
- Indent using 2 spaces (soft tabs).
|
||||
- Put spaces between list items (ie. `[1, 2, 3]`, not `[1,2,3]`), around operators (ie. `1 + 1`, not `1+1`) and inside go templating tags (ie. `{{< alert >}}`, not `{{<alert>}}`).
|
||||
- Avoid code reuse in templates by extracting components into partials.
|
||||
- Layout code in a logical manner that prioritises readibility.
|
||||
- Layout code in a logical manner that prioritises readability.
|
||||
- Add comments when the intent of the code isn't immediately apparent or to break up large blocks of logic.
|
||||
- Use relative paths to assets without including the preceeding slash but, when referring to a folder, including a trailing slash (ie. `static/img/`, not `/static/img/` or `/static/img`).
|
||||
- Use relative paths to assets without including the preceding slash but, when referring to a folder, including a trailing slash (ie. `static/img/`, not `/static/img/` or `/static/img`).
|
||||
- Any static text must be referenced using the `i18n` methods and included in the localisation assets.
|
||||
- Commit often, preferring incremental changes rather than bundling everything into a single, large commit.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Congo is designed to be a powerful, lightweight theme for [Hugo](https://gohugo.
|
|||
- Highly customisable configuration
|
||||
- Multiple homepage layouts
|
||||
- Flexible with any content types, taxonomies and menus
|
||||
- Multilingual content support inlcuding support for RTL languages
|
||||
- Multilingual content support including support for RTL languages
|
||||
- Ability to link to posts on third-party websites
|
||||
- Client-side site search powered by Fuse.js
|
||||
- Diagrams and visualisations using Mermaid
|
||||
|
@ -28,7 +28,7 @@ Congo is designed to be a powerful, lightweight theme for [Hugo](https://gohugo.
|
|||
- Heading anchors, Tables of Contents, Code copy, Buttons, Badges and more
|
||||
- HTML and Emoji support in articles 🎉
|
||||
- SEO friendly with links for sharing to social media
|
||||
- Fathom Analytics and Google Analytics support
|
||||
- Fathom Analytics, Plausible Analytics, Umami Analytics and Google Analytics support
|
||||
- RSS feeds, Favicons and comments support
|
||||
- Advanced customisation using simple Tailwind colour definitions and styles
|
||||
- Optimised for performance and accessibility with perfect Lighthouse scores
|
||||
|
|
|
@ -5,6 +5,5 @@ externalUrl: ""
|
|||
summary: ""
|
||||
showReadingTime: false
|
||||
_build:
|
||||
render: "false"
|
||||
list: "local"
|
||||
render: "never"
|
||||
---
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*! Congo v2.4.2 | MIT License | https://github.com/jpanther/congo */
|
||||
/*! Congo v2.8.2 | MIT License | https://github.com/jpanther/congo */
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
|
@ -23,7 +23,7 @@ body button {
|
|||
|
||||
/* Hamburger menu */
|
||||
body:has(#menu-controller:checked) {
|
||||
@apply overflow-y-hidden;
|
||||
@apply h-screen overflow-hidden;
|
||||
}
|
||||
#menu-button:has(#menu-controller:checked) {
|
||||
@apply invisible;
|
||||
|
@ -59,12 +59,18 @@ body:has(#menu-controller:checked) {
|
|||
}
|
||||
|
||||
/* Table of Contents */
|
||||
.toc {
|
||||
max-height: 100vh;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.toc ul,
|
||||
.toc li {
|
||||
@apply px-0 leading-snug list-none;
|
||||
@apply list-none px-0 leading-snug;
|
||||
}
|
||||
.toc ul ul {
|
||||
@apply ltr:pl-4 rtl:pr-4;
|
||||
@apply ps-4;
|
||||
}
|
||||
.toc a {
|
||||
@apply font-normal text-neutral-700 dark:text-neutral-400;
|
||||
|
@ -84,7 +90,7 @@ body:has(#menu-controller:checked) {
|
|||
@apply visible;
|
||||
}
|
||||
.copy-button {
|
||||
@apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
|
||||
@apply invisible absolute right-0 top-0 z-10 w-20 cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 py-1 font-mono text-sm text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
|
||||
}
|
||||
.copy-button:hover,
|
||||
.copy-button:focus,
|
||||
|
@ -96,34 +102,49 @@ body:has(#menu-controller:checked) {
|
|||
@apply absolute -z-10 opacity-5;
|
||||
}
|
||||
|
||||
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
|
||||
.katex-display {
|
||||
overflow: auto hidden;
|
||||
}
|
||||
|
||||
/* Fix long tables breaking out of article on mobile */
|
||||
table {
|
||||
@apply block overflow-auto md:table;
|
||||
}
|
||||
|
||||
/* Fix long inline code sections breaking out of article on mobile */
|
||||
code {
|
||||
word-wrap: break-word; /* All browsers since IE 5.5+ */
|
||||
@apply break-words;
|
||||
}
|
||||
|
||||
/* -- Chroma Highlight -- */
|
||||
/* Background */
|
||||
.prose .chroma {
|
||||
@apply static rounded-md bg-neutral-50 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
|
||||
.chroma {
|
||||
@apply rounded-md bg-neutral-50 py-3 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
|
||||
}
|
||||
/* LineTableTD */
|
||||
.chroma .lntd,
|
||||
.chroma .lntd pre {
|
||||
@apply p-0 m-0 overflow-hidden align-top border-none;
|
||||
.chroma pre {
|
||||
@apply m-0 p-0;
|
||||
}
|
||||
/* LineTable */
|
||||
.chroma .lntable {
|
||||
@apply block w-auto py-3 overflow-x-auto text-base;
|
||||
border-spacing: 0;
|
||||
}
|
||||
/* LineTable Line */
|
||||
.chroma .lntable .line {
|
||||
@apply pr-4;
|
||||
}
|
||||
/* LineHighlight */
|
||||
.chroma .hl {
|
||||
@apply block w-auto bg-primary-100 dark:bg-primary-900;
|
||||
@apply m-0 block w-auto overflow-auto text-base;
|
||||
}
|
||||
/* LineNumbersTable */
|
||||
/* LineNumbers */
|
||||
.chroma .lnt,
|
||||
.chroma .ln {
|
||||
@apply mr-[0.4em] px-[0.4em] py-0 text-neutral-600 dark:text-neutral-300;
|
||||
@apply mr-2 px-2 text-neutral-600 dark:text-neutral-300;
|
||||
}
|
||||
.chroma .lntd {
|
||||
@apply p-0 align-top;
|
||||
}
|
||||
.chroma .lntd:last-of-type {
|
||||
@apply w-full;
|
||||
}
|
||||
/* LineHighlight */
|
||||
.chroma .hl {
|
||||
@apply block w-full bg-primary-100 dark:bg-primary-900;
|
||||
}
|
||||
/* Keyword */
|
||||
/* KeywordDeclaration */
|
||||
|
@ -275,7 +296,7 @@ body:has(#menu-controller:checked) {
|
|||
}
|
||||
/* CommentHashbang */
|
||||
.chroma .ch {
|
||||
@apply italic font-semibold text-neutral-500 dark:text-neutral-400;
|
||||
@apply font-semibold italic text-neutral-500 dark:text-neutral-400;
|
||||
}
|
||||
/* GenericEmph */
|
||||
.chroma .ge {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
--color-neutral-700: 68, 64, 60;
|
||||
--color-neutral-800: 41, 37, 36;
|
||||
--color-neutral-900: 28, 25, 23;
|
||||
--color-neutral-950: 12, 10, 9;
|
||||
/* Lime */
|
||||
--color-primary-50: 247, 254, 231;
|
||||
--color-primary-100: 236, 252, 203;
|
||||
|
@ -23,6 +24,7 @@
|
|||
--color-primary-700: 77, 124, 15;
|
||||
--color-primary-800: 63, 98, 18;
|
||||
--color-primary-900: 54, 83, 20;
|
||||
--color-primary-950: 26, 46, 5;
|
||||
/* Emerald */
|
||||
--color-secondary-50: 236, 253, 245;
|
||||
--color-secondary-100: 209, 250, 229;
|
||||
|
@ -34,4 +36,5 @@
|
|||
--color-secondary-700: 4, 120, 87;
|
||||
--color-secondary-800: 6, 95, 70;
|
||||
--color-secondary-900: 6, 78, 59;
|
||||
--color-secondary-950: 2, 44, 34;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/* Cherry scheme */
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
/* Neutral */
|
||||
--color-neutral-50: 250, 250, 250;
|
||||
--color-neutral-100: 245, 245, 245;
|
||||
--color-neutral-200: 229, 229, 229;
|
||||
--color-neutral-300: 212, 212, 212;
|
||||
--color-neutral-400: 163, 163, 163;
|
||||
--color-neutral-500: 115, 115, 115;
|
||||
--color-neutral-600: 82, 82, 82;
|
||||
--color-neutral-700: 64, 64, 64;
|
||||
--color-neutral-800: 38, 38, 38;
|
||||
--color-neutral-900: 23, 23, 23;
|
||||
--color-neutral-950: 10, 10, 10;
|
||||
/* Rose */
|
||||
--color-primary-50: 255, 241, 242;
|
||||
--color-primary-100: 255, 228, 230;
|
||||
--color-primary-200: 254, 205, 211;
|
||||
--color-primary-300: 253, 164, 175;
|
||||
--color-primary-400: 251, 113, 133;
|
||||
--color-primary-500: 244, 63, 94;
|
||||
--color-primary-600: 225, 29, 72;
|
||||
--color-primary-700: 190, 18, 60;
|
||||
--color-primary-800: 159, 18, 57;
|
||||
--color-primary-900: 136, 19, 55;
|
||||
--color-primary-950: 76, 5, 25;
|
||||
/* Green */
|
||||
--color-secondary-50: 240, 253, 244;
|
||||
--color-secondary-100: 220, 252, 231;
|
||||
--color-secondary-200: 187, 247, 208;
|
||||
--color-secondary-300: 134, 239, 172;
|
||||
--color-secondary-400: 74, 222, 128;
|
||||
--color-secondary-500: 34, 197, 94;
|
||||
--color-secondary-600: 22, 163, 74;
|
||||
--color-secondary-700: 21, 128, 61;
|
||||
--color-secondary-800: 22, 101, 52;
|
||||
--color-secondary-900: 20, 83, 45;
|
||||
--color-secondary-950: 5, 46, 22;
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
--color-neutral-700: 63, 63, 70;
|
||||
--color-neutral-800: 39, 39, 42;
|
||||
--color-neutral-900: 24, 24, 27;
|
||||
--color-neutral-950: 3, 7, 18;
|
||||
/* Violet */
|
||||
--color-primary-50: 245, 243, 255;
|
||||
--color-primary-100: 237, 233, 254;
|
||||
|
@ -23,6 +24,7 @@
|
|||
--color-primary-700: 109, 40, 217;
|
||||
--color-primary-800: 91, 33, 182;
|
||||
--color-primary-900: 76, 29, 149;
|
||||
--color-primary-950: 46, 16, 101;
|
||||
/* Fuchsia */
|
||||
--color-secondary-50: 253, 244, 255;
|
||||
--color-secondary-100: 250, 232, 255;
|
||||
|
@ -34,4 +36,5 @@
|
|||
--color-secondary-700: 162, 28, 175;
|
||||
--color-secondary-800: 134, 25, 143;
|
||||
--color-secondary-900: 112, 26, 117;
|
||||
--color-secondary-950: 74, 4, 78;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
--color-neutral-700: 68, 64, 60;
|
||||
--color-neutral-800: 41, 37, 36;
|
||||
--color-neutral-900: 28, 25, 23;
|
||||
--color-neutral-950: 12, 10, 9;
|
||||
/* Orange */
|
||||
--color-primary-50: 255, 247, 237;
|
||||
--color-primary-100: 255, 237, 213;
|
||||
|
@ -23,6 +24,7 @@
|
|||
--color-primary-700: 194, 65, 12;
|
||||
--color-primary-800: 154, 52, 18;
|
||||
--color-primary-900: 124, 45, 18;
|
||||
--color-primary-950: 69, 10, 10;
|
||||
/* Rose */
|
||||
--color-secondary-50: 255, 241, 242;
|
||||
--color-secondary-100: 255, 228, 230;
|
||||
|
@ -34,4 +36,5 @@
|
|||
--color-secondary-700: 190, 18, 60;
|
||||
--color-secondary-800: 159, 18, 57;
|
||||
--color-secondary-900: 136, 19, 55;
|
||||
--color-secondary-950: 76, 5, 25;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Ocean scheme */
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
/* Gray */
|
||||
/* Slate */
|
||||
--color-neutral-50: 248, 250, 252;
|
||||
--color-neutral-100: 241, 245, 249;
|
||||
--color-neutral-200: 226, 232, 240;
|
||||
|
@ -12,6 +12,7 @@
|
|||
--color-neutral-700: 51, 65, 85;
|
||||
--color-neutral-800: 30, 41, 59;
|
||||
--color-neutral-900: 15, 23, 42;
|
||||
--color-neutral-950: 2, 6, 23;
|
||||
/* Blue */
|
||||
--color-primary-50: 239, 246, 255;
|
||||
--color-primary-100: 219, 234, 254;
|
||||
|
@ -23,6 +24,7 @@
|
|||
--color-primary-700: 29, 78, 216;
|
||||
--color-primary-800: 30, 64, 175;
|
||||
--color-primary-900: 30, 58, 138;
|
||||
--color-primary-950: 23, 37, 8;
|
||||
/* Cyan */
|
||||
--color-secondary-50: 236, 254, 255;
|
||||
--color-secondary-100: 207, 250, 254;
|
||||
|
@ -34,4 +36,5 @@
|
|||
--color-secondary-700: 14, 116, 144;
|
||||
--color-secondary-800: 21, 94, 117;
|
||||
--color-secondary-900: 22, 78, 99;
|
||||
--color-secondary-950: 8, 51, 69;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/* Sapphire scheme */
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
/* Slate */
|
||||
--color-neutral-50: 248, 250, 252;
|
||||
--color-neutral-100: 241, 245, 249;
|
||||
--color-neutral-200: 226, 232, 240;
|
||||
--color-neutral-300: 203, 213, 225;
|
||||
--color-neutral-400: 148, 163, 184;
|
||||
--color-neutral-500: 100, 116, 139;
|
||||
--color-neutral-600: 71, 85, 105;
|
||||
--color-neutral-700: 51, 65, 85;
|
||||
--color-neutral-800: 30, 41, 59;
|
||||
--color-neutral-900: 15, 23, 42;
|
||||
--color-neutral-950: 10, 10, 10;
|
||||
/* Indigo */
|
||||
--color-primary-50: 238, 242, 255;
|
||||
--color-primary-100: 224, 231, 255;
|
||||
--color-primary-200: 199, 210, 254;
|
||||
--color-primary-300: 165, 180, 252;
|
||||
--color-primary-400: 129, 140, 248;
|
||||
--color-primary-500: 99, 102, 241;
|
||||
--color-primary-600: 79, 70, 229;
|
||||
--color-primary-700: 67, 56, 202;
|
||||
--color-primary-800: 55, 48, 163;
|
||||
--color-primary-900: 49, 46, 129;
|
||||
--color-primary-950: 30, 27, 75;
|
||||
/* Pink */
|
||||
--color-secondary-50: 253, 242, 248;
|
||||
--color-secondary-100: 252, 231, 243;
|
||||
--color-secondary-200: 251, 207, 232;
|
||||
--color-secondary-300: 249, 168, 212;
|
||||
--color-secondary-400: 244, 114, 182;
|
||||
--color-secondary-500: 236, 72, 153;
|
||||
--color-secondary-600: 219, 39, 119;
|
||||
--color-secondary-700: 190, 24, 93;
|
||||
--color-secondary-800: 157, 23, 77;
|
||||
--color-secondary-900: 131, 24, 67;
|
||||
--color-secondary-950: 80, 7, 36;
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
--color-neutral-700: 55, 65, 81;
|
||||
--color-neutral-800: 31, 41, 55;
|
||||
--color-neutral-900: 17, 24, 39;
|
||||
--color-neutral-950: 17, 24, 39;
|
||||
/* Slate */
|
||||
--color-primary-50: 248, 250, 252;
|
||||
--color-primary-100: 241, 245, 249;
|
||||
|
@ -23,6 +24,7 @@
|
|||
--color-primary-700: 51, 65, 85;
|
||||
--color-primary-800: 30, 41, 59;
|
||||
--color-primary-900: 15, 23, 42;
|
||||
--color-primary-950: 2, 6, 23;
|
||||
/* Gray */
|
||||
--color-secondary-50: 249, 250, 251;
|
||||
--color-secondary-100: 243, 244, 246;
|
||||
|
@ -34,4 +36,5 @@
|
|||
--color-secondary-700: 55, 65, 81;
|
||||
--color-secondary-800: 31, 41, 55;
|
||||
--color-secondary-900: 17, 24, 39;
|
||||
--color-secondary-950: 10, 10, 10;
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M407.8 294.7c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3C61.6-9.4 37.5-1.7 21.6 5.5C3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7c3.3-.5 6.6-.9 10-1.4c-3.3 .5-6.6 1-10 1.4C74.3 308.6-9.1 342.8 100.3 464.5C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4c102.4-103.4 28.1-156-65.8-169.9c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3c64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1z"/></svg>
|
After Width: | Height: | Size: 786 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>
|
After Width: | Height: | Size: 269 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"/></svg>
|
After Width: | Height: | Size: 269 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="0.89em" viewBox="0 0 512 512"><path fill="currentColor" d="M88 0C74.7 0 64 10.7 64 24c0 38.9 23.4 59.4 39.1 73.1l1.1 1C120.5 112.3 128 119.9 128 136c0 13.3 10.7 24 24 24s24-10.7 24-24c0-38.9-23.4-59.4-39.1-73.1l-1.1-1C119.5 47.7 112 40.1 112 24c0-13.3-10.7-24-24-24zM32 192c-17.7 0-32 14.3-32 32V416c0 53 43 96 96 96H288c53 0 96-43 96-96h16c61.9 0 112-50.1 112-112s-50.1-112-112-112H352 32zm352 64h16c26.5 0 48 21.5 48 48s-21.5 48-48 48H384V256zM224 24c0-13.3-10.7-24-24-24s-24 10.7-24 24c0 38.9 23.4 59.4 39.1 73.1l1.1 1C232.5 112.3 240 119.9 240 136c0 13.3 10.7 24 24 24s24-10.7 24-24c0-38.9-23.4-59.4-39.1-73.1l-1.1-1C231.5 47.7 224 40.1 224 24z"/></svg>
|
After Width: | Height: | Size: 706 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path fill="currentColor" d="M390.9 298.5c0 0 0 .1 .1 .1c9.2 19.4 14.4 41.1 14.4 64C405.3 445.1 338.5 512 256 512s-149.3-66.9-149.3-149.3c0-22.9 5.2-44.6 14.4-64h0c1.7-3.6 3.6-7.2 5.6-10.7c4.4-7.6 9.4-14.7 15-21.3c27.4-32.6 68.5-53.3 114.4-53.3c33.6 0 64.6 11.1 89.6 29.9c9.1 6.9 17.4 14.7 24.8 23.5c5.6 6.6 10.6 13.8 15 21.3c2 3.4 3.8 7 5.5 10.5zm26.4-18.8c-30.1-58.4-91-98.4-161.3-98.4s-131.2 40-161.3 98.4L0 202.7 256 0 512 202.7l-94.7 77.1z"/></svg>
|
After Width: | Height: | Size: 689 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License -https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M311 196.8v81.3c0 2.1-1.6 3.7-3.7 3.7h-13c-1.3 0-2.4-.7-3-1.5l-37.3-50.3v48.2c0 2.1-1.6 3.7-3.7 3.7h-13c-2.1 0-3.7-1.6-3.7-3.7V196.9c0-2.1 1.6-3.7 3.7-3.7h12.9c1.1 0 2.4 .6 3 1.6l37.3 50.3V196.9c0-2.1 1.6-3.7 3.7-3.7h13c2.1-.1 3.8 1.6 3.8 3.5zm-93.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 2.1 1.6 3.7 3.7 3.7h13c2.1 0 3.7-1.6 3.7-3.7V196.8c0-1.9-1.6-3.7-3.7-3.7zm-31.4 68.1H150.3V196.8c0-2.1-1.6-3.7-3.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 1 .3 1.8 1 2.5c.7 .6 1.5 1 2.5 1h52.2c2.1 0 3.7-1.6 3.7-3.7v-13c0-1.9-1.6-3.7-3.5-3.7zm193.7-68.1H327.3c-1.9 0-3.7 1.6-3.7 3.7v81.3c0 1.9 1.6 3.7 3.7 3.7h52.2c2.1 0 3.7-1.6 3.7-3.7V265c0-2.1-1.6-3.7-3.7-3.7H344V247.7h35.5c2.1 0 3.7-1.6 3.7-3.7V230.9c0-2.1-1.6-3.7-3.7-3.7H344V213.5h35.5c2.1 0 3.7-1.6 3.7-3.7v-13c-.1-1.9-1.7-3.7-3.7-3.7zM512 93.4V419.4c-.1 51.2-42.1 92.7-93.4 92.6H92.6C41.4 511.9-.1 469.8 0 418.6V92.6C.1 41.4 42.2-.1 93.4 0H419.4c51.2 .1 92.7 42.1 92.6 93.4zM441.6 233.5c0-83.4-83.7-151.3-186.4-151.3s-186.4 67.9-186.4 151.3c0 74.7 66.3 137.4 155.9 149.3c21.8 4.7 19.3 12.7 14.4 42.1c-.8 4.7-3.8 18.4 16.1 10.1s107.3-63.2 146.5-108.2c27-29.7 39.9-59.8 39.9-93.1z" /></svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="20" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path opacity="1" fill="currentColor" d="M624.6 325.2c-12.3-12.4-29.7-19.2-48.4-17.2-43.3-1-49.7-34.9-37.5-98.8 22.8-57.5-14.9-131.5-87.4-130.8-77.4 .7-81.7 82-130.9 82-48.1 0-54-81.3-130.9-82-72.9-.8-110.1 73.3-87.4 130.8 12.2 63.9 5.8 97.8-37.5 98.8-21.2-2.3-37 6.5-53 22.5-19.9 19.7-19.3 94.8 42.6 102.6 47.1 5.9 81.6-42.9 61.2-87.8-47.3-103.7 185.9-106.1 146.5-8.2-.1 .1-.2 .2-.3 .4-26.8 42.8 6.8 97.4 58.8 95.2 52.1 2.1 85.4-52.6 58.8-95.2-.1-.2-.2-.3-.3-.4-39.4-97.9 193.8-95.5 146.5 8.2-4.6 10-6.7 21.3-5.7 33 4.9 53.4 68.7 74.1 104.9 35.2 17.8-14.8 23.1-65.6 0-88.3zm-303.9-19.1h-.6c-43.4 0-62.8-37.5-62.8-62.8 0-34.7 28.2-62.8 62.8-62.8h.6c34.7 0 62.8 28.1 62.8 62.8 0 25-19.2 62.8-62.8 62.8z"/></svg>
|
After Width: | Height: | Size: 946 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M16 64C16 28.7 44.7 0 80 0H304c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64V64zM144 448c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16s-7.2-16-16-16H160c-8.8 0-16 7.2-16 16zM304 64H80V384H304V64z"/></svg>
|
After Width: | Height: | Size: 316 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"/></svg>
|
After Width: | Height: | Size: 378 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M331.5 235.7c2.2 .9 4.2 1.9 6.3 2.8c29.2 14.1 50.6 35.2 61.8 61.4c15.7 36.5 17.2 95.8-30.3 143.2c-36.2 36.2-80.3 52.5-142.6 53h-.3c-70.2-.5-124.1-24.1-160.4-70.2c-32.3-41-48.9-98.1-49.5-169.6V256v-.2C17 184.3 33.6 127.2 65.9 86.2C102.2 40.1 156.2 16.5 226.4 16h.3c70.3 .5 124.9 24 162.3 69.9c18.4 22.7 32 50 40.6 81.7l-40.4 10.8c-7.1-25.8-17.8-47.8-32.2-65.4c-29.2-35.8-73-54.2-130.5-54.6c-57 .5-100.1 18.8-128.2 54.4C72.1 146.1 58.5 194.3 58 256c.5 61.7 14.1 109.9 40.3 143.3c28 35.6 71.2 53.9 128.2 54.4c51.4-.4 85.4-12.6 113.7-40.9c32.3-32.2 31.7-71.8 21.4-95.9c-6.1-14.2-17.1-26-31.9-34.9c-3.7 26.9-11.8 48.3-24.7 64.8c-17.1 21.8-41.4 33.6-72.7 35.3c-23.6 1.3-46.3-4.4-63.9-16c-20.8-13.8-33-34.8-34.3-59.3c-2.5-48.3 35.7-83 95.2-86.4c21.1-1.2 40.9-.3 59.2 2.8c-2.4-14.8-7.3-26.6-14.6-35.2c-10-11.7-25.6-17.7-46.2-17.8H227c-16.6 0-39 4.6-53.3 26.3l-34.4-23.6c19.2-29.1 50.3-45.1 87.8-45.1h.8c62.6 .4 99.9 39.5 103.7 107.7l-.2 .2zm-156 68.8c1.3 25.1 28.4 36.8 54.6 35.3c25.6-1.4 54.6-11.4 59.5-73.2c-13.2-2.9-27.8-4.4-43.4-4.4c-4.8 0-9.6 .1-14.4 .4c-42.9 2.4-57.2 23.2-56.2 41.8l-.1 .1z"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<path fill="currentColor" d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"/>
|
||||
<path fill="currentColor" d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 775 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path fill="currentColor" d="M407 177.6c7.6-24-13.4-46.8-37.4-41.7-22 4.8-28.8-28.1-7.1-32.8 50.1-10.9 92.3 37.1 76.5 84.8-6.8 21.2-38.8 10.8-32-10.3zM214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6 79.5-33.6 140.5-16.8 114 51.4-3.7 9.4 1.1 10.9 8.3 13.1 135.7 42.3 34.8 215.2-169.7 215.2zm143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116zM347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3 72.3-15.2 134.8 52.8 111.7 124-7.4 24.2 29.1 37 37.4 12 31.9-99.8-55.1-195.9-157.4-174.3zm-78.5 311c-17.1 38.8-66.8 60-109.1 46.3-40.8-13.1-58-53.4-40.3-89.7 17.7-35.4 63.1-55.4 103.4-45.1 42 10.8 63.1 50.2 46 88.5zm-86.3-30c-12.9-5.4-30 .3-38 12.9-8.3 12.9-4.3 28 8.6 34 13.1 6 30.8 .3 39.1-12.9 8-13.1 3.7-28.3-9.7-34zm32.6-13.4c-5.1-1.7-11.4 .6-14.3 5.4-2.9 5.1-1.4 10.6 3.7 12.9 5.1 2 11.7-.3 14.6-5.4 2.8-5.2 1.1-10.9-4-12.9z"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>
|
After Width: | Height: | Size: 257 B |
|
@ -39,8 +39,9 @@ if (document.documentElement.getAttribute("data-auto-appearance") === "true") {
|
|||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
const switcher = document.getElementById("appearance-switcher");
|
||||
if (switcher) {
|
||||
setThemeColor();
|
||||
var switchers = document.querySelectorAll("[id^='appearance-switcher']");
|
||||
switchers.forEach((switcher) => {
|
||||
switcher.addEventListener("click", () => {
|
||||
document.documentElement.classList.toggle("dark");
|
||||
setThemeColor();
|
||||
|
@ -53,5 +54,5 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
|||
event.preventDefault();
|
||||
localStorage.removeItem("appearance");
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@ function css(name) {
|
|||
}
|
||||
|
||||
Chart.defaults.font.size = 14;
|
||||
Chart.defaults.plugins.colors.enabled = false;
|
||||
Chart.defaults.backgroundColor = css("--color-primary-300");
|
||||
Chart.defaults.elements.point.borderColor = css("--color-primary-400");
|
||||
Chart.defaults.elements.bar.borderColor = css("--color-primary-500");
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Closes the hamburger menu when a link is clicked.
|
||||
*/
|
||||
function close_menu() {
|
||||
document.getElementById("menu-controller").checked = false;
|
||||
}
|
|
@ -2,19 +2,29 @@ function css(name) {
|
|||
return "rgb(" + getComputedStyle(document.documentElement).getPropertyValue(name) + ")";
|
||||
}
|
||||
|
||||
let isDark = document.documentElement.classList.contains("dark");
|
||||
|
||||
mermaid.initialize({
|
||||
theme: "base",
|
||||
themeVariables: {
|
||||
background: css("--color-neutral"),
|
||||
primaryColor: css("--color-primary-200"),
|
||||
secondaryColor: css("--color-secondary-200"),
|
||||
tertiaryColor: css("--color-neutral-100"),
|
||||
primaryBorderColor: css("--color-primary-400"),
|
||||
primaryTextColor: isDark ? css("--color-neutral-200") : css("--color-neutral-700"),
|
||||
primaryColor: isDark ? css("--color-primary-700") : css("--color-primary-200"),
|
||||
secondaryColor: isDark ? css("--color-secondary-700") : css("--color-secondary-200"),
|
||||
tertiaryColor: isDark ? css("--color-neutral-700") : css("--color-neutral-100"),
|
||||
primaryBorderColor: isDark ? css("--color-primary-500") : css("--color-primary-400"),
|
||||
secondaryBorderColor: css("--color-secondary-400"),
|
||||
tertiaryBorderColor: css("--color-neutral-400"),
|
||||
lineColor: css("--color-neutral-600"),
|
||||
tertiaryBorderColor: isDark ? css("--color-neutral-300") : css("--color-neutral-400"),
|
||||
lineColor: isDark ? css("--color-neutral-300") : css("--color-neutral-600"),
|
||||
fontFamily:
|
||||
"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif",
|
||||
fontSize: "16px",
|
||||
pieTitleTextSize: "19px",
|
||||
pieSectionTextSize: "16px",
|
||||
pieLegendTextSize: "16px",
|
||||
pieStrokeWidth: "1px",
|
||||
pieOuterStrokeWidth: "0.5px",
|
||||
pieStrokeColor: isDark ? css("--color-neutral-300") : css("--color-neutral-400"),
|
||||
pieOpacity: "1",
|
||||
},
|
||||
});
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
window.addEventListener("load", () => {
|
||||
quicklink.listen();
|
||||
});
|
|
@ -133,21 +133,20 @@ function executeQuery(term) {
|
|||
let resultsHTML = "";
|
||||
|
||||
if (results.length > 0) {
|
||||
results.forEach(function (value, key) {
|
||||
resultsHTML =
|
||||
resultsHTML +
|
||||
`<li class="mb-2">
|
||||
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
|
||||
<div class="grow">
|
||||
<div class="-mb-1 text-lg font-bold">${value.item.title}</div>
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">·</span>${value.item.date}</span></div>
|
||||
<div class="text-sm italic">${value.item.summary}</div>
|
||||
</div>
|
||||
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">→</div>
|
||||
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">←</div>
|
||||
</a>
|
||||
</li>`;
|
||||
});
|
||||
// prettier-ignore
|
||||
resultsHTML = results.map(function (value, key) {
|
||||
return `<li class="mb-2">
|
||||
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
|
||||
<div class="grow">
|
||||
<div class="-mb-1 text-lg font-bold">${value.item.title}</div>
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}${value.item.date == null ? '' : `<span class="px-2 text-primary-500">·</span>${value.item.date}</span>`}</div>
|
||||
<div class="text-sm italic">${value.item.summary}</div>
|
||||
</div>
|
||||
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">→</div>
|
||||
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">←</div>
|
||||
</a>
|
||||
</li>`;
|
||||
}).join("");
|
||||
hasResults = true;
|
||||
} else {
|
||||
resultsHTML = "";
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i={};return function(){n.d(i,{default:function(){return s}});var e=n(771),t=n.n(e),r=function(e,t,r){for(var n=r,i=0,a=e.length;n<t.length;){var o=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;"\\"===o?n++:"{"===o?i++:"}"===o&&i--,n++}return-1},a=/^\\begin{/,o=function(e,t){for(var n,i=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(i.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;var d=e.slice(0,n+t[l].right.length),s=a.test(d)?d:e.slice(t[l].left.length,n);i.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&i.push({type:"text",data:e}),i},l=function(e,r){var n=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;for(var i=document.createDocumentFragment(),a=0;a<n.length;a++)if("text"===n[a].type)i.appendChild(document.createTextNode(n[a].data));else{var l=document.createElement("span"),d=n[a].data;r.displayMode=n[a].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(e instanceof t().ParseError))throw e;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[a].data+"` with ",e),i.appendChild(document.createTextNode(n[a].rawData));continue}i.appendChild(l)}return i},d=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(3===i.nodeType){for(var a=i.textContent,o=i.nextSibling,d=0;o&&o.nodeType===Node.TEXT_NODE;)a+=o.textContent,o=o.nextSibling,d++;var s=l(a,r);if(s){for(var f=0;f<d;f++)i.nextSibling.remove();n+=s.childNodes.length-1,t.replaceChild(s,i)}else n+=d}else 1===i.nodeType&&function(){var t=" "+i.className+" ";-1===r.ignoredTags.indexOf(i.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(i,r)}()}},s=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),i=i.default}()}));
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
|
|
@ -0,0 +1 @@
|
|||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.quicklink={})}(this,function(e){function n(e){return new Promise(function(n,r,t){(t=new XMLHttpRequest).open("GET",e,t.withCredentials=!0),t.onload=function(){200===t.status?n():r()},t.send()})}var r,t=(r=document.createElement("link")).relList&&r.relList.supports&&r.relList.supports("prefetch")?function(e){return new Promise(function(n,r,t){(t=document.createElement("link")).rel="prefetch",t.href=e,t.onload=n,t.onerror=r,document.head.appendChild(t)})}:n,o=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},i=new Set,c=new Set,u=!1;function a(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function s(e,r,o){var s=a(navigator.connection);return s instanceof Error?Promise.reject(new Error("Cannot prefetch, "+s.message)):(c.size>0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){if(!i.has(e))return i.add(e),(r?function(e){return window.fetch?fetch(e,{credentials:"include"}):n(e)}:t)(new URL(e,location.href).toString())})))}function f(e,n){var r=a(navigator.connection);if(r instanceof Error)return Promise.reject(new Error("Cannot prerender, "+r.message));if(!HTMLScriptElement.supports("speculationrules"))return s(e),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));if(document.querySelector('script[type="speculationrules"]'))return Promise.reject(new Error("Speculation Rules is already defined and cannot be altered."));for(var t=0,o=[].concat(e);t<o.length;t+=1){var f=o[t];if(window.location.origin!==new URL(f,window.location.href).origin)return Promise.reject(new Error("Only same origin URLs are allowed: "+f));c.add(f)}i.size>0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var l=function(e){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list","urls": ["'+Array.from(e).join('","')+'"]}]}';try{document.head.appendChild(n)}catch(e){return e}return!0}(c);return!0===l?Promise.resolve():Promise.reject(l)}e.listen=function(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],r=0;function t(){r<e&&n.length>0&&(n.shift()(),r++)}return[function(e){n.push(e)>1||t()},function(){r--,t()}]}(e.throttle||1/0),r=n[0],t=n[1],a=e.limit||1/0,l=e.origins||[location.hostname],d=e.ignores||[],h=e.delay||0,p=[],m=e.timeoutFn||o,w="function"==typeof e.hrefFn&&e.hrefFn,g=e.prerender||!1;u=e.prerenderAndPrefetch||!1;var v=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)p.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){-1!==p.indexOf(n.href)&&(v.unobserve(n),(u||g)&&c.size<1?f(w?w(n):n.href).catch(function(n){if(!e.onError)throw n;e.onError(n)}):i.size<a&&!g&&r(function(){s(w?w(n):n.href,e.priority).then(t).catch(function(n){t(),e.onError&&e.onError(n)})}))},h);else{var o=p.indexOf((n=n.target).href);o>-1&&p.splice(o)}})},{threshold:e.threshold||0});return m(function(){(e.el||document).querySelectorAll("a").forEach(function(e){l.length&&!l.includes(e.hostname)||function e(n,r){return Array.isArray(r)?r.some(function(r){return e(n,r)}):(r.test||r).call(r,n.href,n)}(e,d)||v.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),v.disconnect()}}},e.prefetch=s,e.prerender=f});
|
|
@ -1,18 +1,18 @@
|
|||
languageCode = "en"
|
||||
languageName = "English"
|
||||
displayName = "EN"
|
||||
isoCode = "en"
|
||||
languageDirection = "ltr"
|
||||
weight = 1
|
||||
rtl = false
|
||||
|
||||
title = "Congo"
|
||||
# logo = "img/logo.jpg"
|
||||
# description = "My awesome website"
|
||||
# copyright = "Copy, _right?_ :thinking_face:"
|
||||
|
||||
dateFormat = "2 January 2006"
|
||||
[params]
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
[author]
|
||||
# mainSections = ["section1", "section2"]
|
||||
# description = "My awesome website"
|
||||
|
||||
[params.author]
|
||||
# name = "Your name here"
|
||||
# image = "img/author.jpg"
|
||||
# headline = "I'm only human"
|
||||
|
@ -33,6 +33,7 @@ dateFormat = "2 January 2006"
|
|||
# { github = "https://github.com/username" },
|
||||
# { gitlab = "https://gitlab.com/username" },
|
||||
# { google = "https://www.google.com/" },
|
||||
# { google-scholar = "https://scholar.google.com/citations?user=user-id" },
|
||||
# { hashnode = "https://username.hashnode.dev" },
|
||||
# { instagram = "https://instagram.com/username" },
|
||||
# { keybase = "https://keybase.io/username" },
|
||||
|
@ -41,6 +42,7 @@ dateFormat = "2 January 2006"
|
|||
# { linkedin = "https://linkedin.com/in/username" },
|
||||
# { mastodon = "https://mastodon.instance/@username" },
|
||||
# { medium = "https://medium.com/username" },
|
||||
# { mendeley = "https://www.mendeley.com/" },
|
||||
# { microsoft = "https://www.microsoft.com/" },
|
||||
# { orcid = "https://orcid.org/userid" },
|
||||
# { patreon = "https://www.patreon.com/username" },
|
||||
|
@ -56,7 +58,7 @@ dateFormat = "2 January 2006"
|
|||
# { tiktok = "https://tiktok.com/@username" },
|
||||
# { tumblr = "https://username.tumblr.com" },
|
||||
# { twitch = "https://twitch.tv/username" },
|
||||
# { twitter = "https://twitter.com/username" },
|
||||
# { whatsapp = "https://wa.me/phone-number" },
|
||||
# { x-twitter = "https://twitter.com/username" },
|
||||
# { youtube = "https://youtube.com/username" },
|
||||
# ]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -- Main Menu --
|
||||
# The main menu is displayed in the header at the top of the page.
|
||||
# Acceptable parameters are name, pageRef, page, url, title, weight.
|
||||
#
|
||||
#
|
||||
# The simplest menu configuration is to provide:
|
||||
# name = The name to be displayed for this menu link
|
||||
# pageRef = The identifier of the page or section to link to
|
||||
|
@ -25,6 +25,17 @@
|
|||
pageRef = "tags"
|
||||
weight = 30
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
|
||||
[[main]]
|
||||
identifier = "locale"
|
||||
weight = 100
|
||||
[main.params]
|
||||
action = "locale"
|
||||
|
||||
# -- Footer Menu --
|
||||
# The footer menu is displayed at the bottom of the page, just before
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[hugoVersion]
|
||||
extended = false
|
||||
extended = true
|
||||
min = "0.87.0"
|
||||
|
|
|
@ -9,15 +9,20 @@ colorScheme = "congo"
|
|||
defaultAppearance = "light" # valid options: light or dark
|
||||
autoSwitchAppearance = true
|
||||
|
||||
defaultThemeColor = "#FFFFFF"
|
||||
|
||||
enableSearch = false
|
||||
enableCodeCopy = false
|
||||
enableImageLazyLoading = true
|
||||
enableImageWebp = true
|
||||
|
||||
# mainSections = ["section1", "section2"]
|
||||
# robots = ""
|
||||
fingerprintAlgorithm = "sha256"
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
||||
# logo = "img/logo.jpg"
|
||||
# logoDark = "img/dark-logo.jpg"
|
||||
showTitle = true
|
||||
|
||||
[footer]
|
||||
|
@ -29,6 +34,7 @@ enableCodeCopy = false
|
|||
[homepage]
|
||||
layout = "page" # valid options: page, profile, custom
|
||||
showRecent = false
|
||||
recentLimit = 5
|
||||
|
||||
[article]
|
||||
showDate = true
|
||||
|
@ -47,7 +53,7 @@ enableCodeCopy = false
|
|||
showTaxonomies = false
|
||||
showWordCount = false
|
||||
showComments = false
|
||||
# sharingLinks = ["facebook", "twitter", "pinterest", "reddit", "linkedin", "email"]
|
||||
# sharingLinks = ["facebook", "x-twitter", "mastodon", "pinterest", "reddit", "linkedin", "email", "telegram", "line", "weibo"]
|
||||
|
||||
[list]
|
||||
showBreadcrumbs = false
|
||||
|
@ -65,7 +71,15 @@ enableCodeCopy = false
|
|||
|
||||
[fathomAnalytics]
|
||||
# site = "ABC12345"
|
||||
# domain = "llama.yoursite.com"
|
||||
|
||||
[plausibleAnalytics]
|
||||
# domain = "blog.yoursite.com"
|
||||
# event = ""
|
||||
# script = ""
|
||||
|
||||
#[umamiAnalytics]
|
||||
# site = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
# region = "eu" # can be either "eu" or "us"
|
||||
|
||||
[verification]
|
||||
# google = ""
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
"title": "sharing.linkedin",
|
||||
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
|
||||
},
|
||||
"mastodon": {
|
||||
"icon": "mastodon",
|
||||
"title": "sharing.mastodon",
|
||||
"url": "https://tootpick.org/#text=%s %s"
|
||||
},
|
||||
"pinterest": {
|
||||
"icon": "pinterest",
|
||||
"title": "sharing.pinterest",
|
||||
|
@ -28,5 +33,25 @@
|
|||
"icon": "twitter",
|
||||
"title": "sharing.twitter",
|
||||
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
|
||||
},
|
||||
"x-twitter": {
|
||||
"icon": "x-twitter",
|
||||
"title": "sharing.x-twitter",
|
||||
"url": "https://x.com/intent/tweet/?url=%s&text=%s"
|
||||
},
|
||||
"telegram": {
|
||||
"icon": "telegram",
|
||||
"title": "sharing.telegram",
|
||||
"url": "https://telegram.me/share/url?text=%s&url=%s"
|
||||
},
|
||||
"line": {
|
||||
"icon": "line",
|
||||
"title": "sharing.line",
|
||||
"url": "https://line.me/R/share?text=%s%s"
|
||||
},
|
||||
"weibo": {
|
||||
"icon": "weibo",
|
||||
"title": "sharing.weibo",
|
||||
"url": "https://service.weibo.com/share/share.php?url=%s&appkey=&title=%s&pic=&ralateUid=&lang"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
languageCode = "de-DE"
|
||||
languageName = "Deutsch (Deutschland)"
|
||||
languageDirection = "ltr"
|
||||
weight = 4
|
||||
|
||||
title = "Congo"
|
||||
copyright = "© 2023 Congo contributors"
|
||||
|
||||
[params]
|
||||
dateFormat = "2. January 2006"
|
||||
|
||||
mainSections = ["samples"]
|
||||
description = "Ein leistungsstarkes, leichtgewichtiges Theme für Hugo, das mit Tailwind CSS erstellt wurde."
|
||||
|
||||
[params.author]
|
||||
name = "Congo"
|
||||
image = "img/author.jpg"
|
||||
headline = "Nicht dein Durschnitts-Theme!"
|
||||
bio = "Dies ist ein Beispiel für eine Autorenbiografie, und obwohl hier ein Stockfoto eines Hundes zu sehen ist, wurde dieser Artikel tatsächlich von einem Menschen verfasst. :dog:"
|
||||
links = [
|
||||
{ x-twitter = "https://twitter.com/" },
|
||||
{ facebook = "https://facebook.com/" },
|
||||
{ linkedin = "https://linkedin.com/" },
|
||||
{ youtube = "https://youtube.com/" },
|
||||
]
|
|
@ -1,25 +1,25 @@
|
|||
languageCode = "en-au"
|
||||
languageCode = "en-AU"
|
||||
languageName = "English (Australia)"
|
||||
displayName = ":flag-au:"
|
||||
isoCode = "en-AU"
|
||||
languageDirection = "ltr"
|
||||
weight = 1
|
||||
rtl = false
|
||||
|
||||
title = "Congo"
|
||||
# logo = "img/logo.jpg"
|
||||
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
|
||||
copyright = "© 2022 Congo contributors"
|
||||
copyright = "© 2023 Congo contributors"
|
||||
|
||||
dateFormat = "2 January 2006"
|
||||
[params]
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
[author]
|
||||
mainSections = ["samples"]
|
||||
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
|
||||
|
||||
[params.author]
|
||||
name = "Congo"
|
||||
image = "img/author.jpg"
|
||||
headline = "Not your ordinary theme!"
|
||||
bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
|
||||
links = [
|
||||
{ twitter = "https://twitter.com/" },
|
||||
{ x-twitter = "https://twitter.com/" },
|
||||
{ facebook = "https://facebook.com/" },
|
||||
{ linkedin = "https://linkedin.com/" },
|
||||
{ youtube = "https://youtube.com/" },
|
||||
]
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
languageCode = "es-MX"
|
||||
languageName = "Español (México)"
|
||||
languageDirection = "ltr"
|
||||
weight = 2
|
||||
|
||||
title = "Congo"
|
||||
copyright = "© 2023 Congo contributors"
|
||||
|
||||
[params]
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
mainSections = ["samples"]
|
||||
description = "Un tema poderoso y liviano para Hugo creado con Tailwind CSS."
|
||||
|
||||
[params.author]
|
||||
name = "Congo"
|
||||
image = "img/author.jpg"
|
||||
headline = "¡No es tu tema ordinario!"
|
||||
bio = "Esta es una biografía de autor de ejemplo, y aunque aquí hay una foto de un perro, este artículo en realidad fue creado por un ser humano. :dog:"
|
||||
links = [
|
||||
{ x-twitter = "https://twitter.com/" },
|
||||
{ facebook = "https://facebook.com/" },
|
||||
{ linkedin = "https://linkedin.com/" },
|
||||
{ youtube = "https://youtube.com/" },
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
languageCode = "ja"
|
||||
languageName = "日本語"
|
||||
languageDirection = "ltr"
|
||||
weight = 2
|
||||
|
||||
title = "Congo"
|
||||
copyright = "© 2023 Congo contributors"
|
||||
|
||||
[params]
|
||||
dateFormat = "2006年1月2日"
|
||||
|
||||
mainSections = ["samples"]
|
||||
description = "Tailwind CSSをベースに開発された強力で軽量なHugo向けテーマ"
|
||||
|
||||
[params.author]
|
||||
name = "Congo"
|
||||
image = "img/author.jpg"
|
||||
headline = "ただならぬテーマ!"
|
||||
bio = "これは著者の経歴の例で、ここには犬の画像があるが、実際には人間が作成したものである。 :dog:"
|
||||
links = [
|
||||
{ x-twitter = "https://twitter.com/" },
|
||||
{ facebook = "https://facebook.com/" },
|
||||
{ linkedin = "https://linkedin.com/" },
|
||||
{ youtube = "https://youtube.com/" },
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
languageCode = "zh-CN"
|
||||
languageName = "简体中文"
|
||||
languageDirection = "ltr"
|
||||
weight = 2
|
||||
|
||||
title = "Congo"
|
||||
copyright = "© 2023 Congo contributors"
|
||||
|
||||
[params]
|
||||
dateFormat = "2006年1月2日"
|
||||
|
||||
mainSections = ["samples"]
|
||||
description = "一款基于Tailwindcss的强大且轻量的Hugo主题"
|
||||
|
||||
[params.author]
|
||||
name = "Congo"
|
||||
image = "img/author.jpg"
|
||||
headline = "非凡的主题!"
|
||||
bio = "这是一个作者简介示例,虽然这里有一张狗的库存照片,但实际上这篇文章是由人创建的。 :dog:"
|
||||
links = [
|
||||
{ x-twitter = "https://twitter.com/" },
|
||||
{ facebook = "https://facebook.com/" },
|
||||
{ linkedin = "https://linkedin.com/" },
|
||||
{ youtube = "https://youtube.com/" },
|
||||
]
|
|
@ -10,4 +10,4 @@
|
|||
|
||||
[tableOfContents]
|
||||
startLevel = 2
|
||||
endLevel = 4
|
||||
endLevel = 3
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
# -- Main Menu --
|
||||
# The main menu is displayed in the header at the top of the page.
|
||||
# Acceptable parameters are name, pageRef, page, url, title, weight.
|
||||
#
|
||||
# The simplest menu configuration is to provide:
|
||||
# name = The name to be displayed for this menu link
|
||||
# pageRef = The identifier of the page or section to link to
|
||||
#
|
||||
# By default the menu is ordered alphabetically. This can be
|
||||
# overridden by providing a weight value. The menu will then be
|
||||
# ordered by weight from lowest to highest.
|
||||
|
||||
[[main]]
|
||||
name = "Dokumentation"
|
||||
pageRef = "docs"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "Beispiele"
|
||||
pageRef = "samples"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "Genutzt von"
|
||||
pageRef = "users"
|
||||
weight = 30
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 40
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
|
||||
[[main]]
|
||||
identifier = "locale"
|
||||
weight = 100
|
||||
[main.params]
|
||||
action = "locale"
|
||||
|
||||
# -- Footer Menu --
|
||||
# The footer menu is displayed at the bottom of the page, just before
|
||||
# the copyright notice. Configure as per the main menu above.
|
||||
|
||||
# [[footer]]
|
||||
# name = "Tags"
|
||||
# pageRef = "tags"
|
||||
# weight = 10
|
|
@ -1,7 +1,7 @@
|
|||
# -- Main Menu --
|
||||
# The main menu is displayed in the header at the top of the page.
|
||||
# Acceptable parameters are name, pageRef, page, url, title, weight.
|
||||
#
|
||||
#
|
||||
# The simplest menu configuration is to provide:
|
||||
# name = The name to be displayed for this menu link
|
||||
# pageRef = The identifier of the page or section to link to
|
||||
|
@ -24,12 +24,27 @@
|
|||
name = "Users"
|
||||
pageRef = "users"
|
||||
weight = 30
|
||||
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 40
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
|
||||
[[main]]
|
||||
identifier = "locale"
|
||||
weight = 100
|
||||
[main.params]
|
||||
action = "locale"
|
||||
|
||||
# -- Footer Menu --
|
||||
# The footer menu is displayed at the bottom of the page, just before
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
# -- Main Menu --
|
||||
# The main menu is displayed in the header at the top of the page.
|
||||
# Acceptable parameters are name, pageRef, page, url, title, weight.
|
||||
#
|
||||
# The simplest menu configuration is to provide:
|
||||
# name = The name to be displayed for this menu link
|
||||
# pageRef = The identifier of the page or section to link to
|
||||
#
|
||||
# By default the menu is ordered alphabetically. This can be
|
||||
# overridden by providing a weight value. The menu will then be
|
||||
# ordered by weight from lowest to highest.
|
||||
|
||||
[[main]]
|
||||
name = "Docs"
|
||||
url = "/docs"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "Ejemplos"
|
||||
pageRef = "samples"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "Usuarios"
|
||||
pageRef = "users"
|
||||
weight = 30
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 40
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
|
||||
[[main]]
|
||||
identifier = "locale"
|
||||
weight = 100
|
||||
[main.params]
|
||||
action = "locale"
|
||||
|
||||
# -- Footer Menu --
|
||||
# The footer menu is displayed at the bottom of the page, just before
|
||||
# the copyright notice. Configure as per the main menu above.
|
||||
|
||||
# [[footer]]
|
||||
# name = "Tags"
|
||||
# pageRef = "tags"
|
||||
# weight = 10
|
|
@ -0,0 +1,56 @@
|
|||
# -- Main Menu --
|
||||
# The main menu is displayed in the header at the top of the page.
|
||||
# Acceptable parameters are name, pageRef, page, url, title, weight.
|
||||
#
|
||||
# The simplest menu configuration is to provide:
|
||||
# name = The name to be displayed for this menu link
|
||||
# pageRef = The identifier of the page or section to link to
|
||||
#
|
||||
# By default the menu is ordered alphabetically. This can be
|
||||
# overridden by providing a weight value. The menu will then be
|
||||
# ordered by weight from lowest to highest.
|
||||
|
||||
[[main]]
|
||||
name = "ドキュメント"
|
||||
pageRef = "docs"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "サンプル"
|
||||
pageRef = "samples"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "利用例"
|
||||
pageRef = "users"
|
||||
weight = 30
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 40
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "検索"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
|
||||
[[main]]
|
||||
identifier = "locale"
|
||||
weight = 100
|
||||
[main.params]
|
||||
action = "locale"
|
||||
|
||||
# -- Footer Menu --
|
||||
# The footer menu is displayed at the bottom of the page, just before
|
||||
# the copyright notice. Configure as per the main menu above.
|
||||
|
||||
# [[footer]]
|
||||
# name = "Tags"
|
||||
# pageRef = "tags"
|
||||
# weight = 10
|
|
@ -0,0 +1,56 @@
|
|||
# -- Main Menu --
|
||||
# The main menu is displayed in the header at the top of the page.
|
||||
# Acceptable parameters are name, pageRef, page, url, title, weight.
|
||||
#
|
||||
# The simplest menu configuration is to provide:
|
||||
# name = The name to be displayed for this menu link
|
||||
# pageRef = The identifier of the page or section to link to
|
||||
#
|
||||
# By default the menu is ordered alphabetically. This can be
|
||||
# overridden by providing a weight value. The menu will then be
|
||||
# ordered by weight from lowest to highest.
|
||||
|
||||
[[main]]
|
||||
name = "文档"
|
||||
pageRef = "docs"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "示例"
|
||||
pageRef = "samples"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "用户"
|
||||
pageRef = "users"
|
||||
weight = 30
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 40
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "搜索"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
|
||||
[[main]]
|
||||
identifier = "语言"
|
||||
weight = 100
|
||||
[main.params]
|
||||
action = "locale"
|
||||
|
||||
# -- Footer Menu --
|
||||
# The footer menu is displayed at the bottom of the page, just before
|
||||
# the copyright notice. Configure as per the main menu above.
|
||||
|
||||
# [[footer]]
|
||||
# name = "标签"
|
||||
# pageRef = "tags"
|
||||
# weight = 10
|
|
@ -1,3 +1,3 @@
|
|||
[hugoVersion]
|
||||
extended = false
|
||||
min = "0.86.1"
|
||||
extended = true
|
||||
min = "0.87.0"
|
||||
|
|
|
@ -11,13 +11,17 @@ autoSwitchAppearance = true
|
|||
|
||||
enableSearch = true
|
||||
enableCodeCopy = true
|
||||
enableImageLazyLoading = true
|
||||
enableImageWebp = true
|
||||
enableQuicklink = true
|
||||
|
||||
mainSections = ["samples"]
|
||||
# robots = ""
|
||||
fingerprintAlgorithm = "sha256"
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
||||
# logo = "img/logo.jpg"
|
||||
# logoDark = "img/dark-logo.jpg"
|
||||
showTitle = true
|
||||
|
||||
[footer]
|
||||
|
@ -29,6 +33,7 @@ mainSections = ["samples"]
|
|||
[homepage]
|
||||
layout = "custom" # valid options: page, profile, custom
|
||||
showRecent = true
|
||||
recentLimit = 5
|
||||
|
||||
[article]
|
||||
showDate = true
|
||||
|
@ -47,7 +52,7 @@ mainSections = ["samples"]
|
|||
showTaxonomies = false
|
||||
showWordCount = false
|
||||
showComments = false
|
||||
# sharingLinks = ["facebook", "twitter", "pinterest", "reddit", "linkedin", "email"]
|
||||
# sharingLinks = ["facebook", "twitter", "mastodon", "pinterest", "reddit", "linkedin", "email", "telegram", "line", "weibo"]
|
||||
|
||||
[list]
|
||||
showBreadcrumbs = true
|
||||
|
@ -65,7 +70,10 @@ mainSections = ["samples"]
|
|||
|
||||
[fathomAnalytics]
|
||||
# site = "ABC12345"
|
||||
# domain = "llama.yoursite.com"
|
||||
|
||||
#[umamiAnalytics]
|
||||
# site = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
# region = "eu" # Can be either "eu" or "us"
|
||||
|
||||
[verification]
|
||||
# google = ""
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: "Willkommen bei Congo! :tada:"
|
||||
description: "Dies ist eine Demo des Congo-Themes für Hugo."
|
||||
---
|
||||
|
||||
{{< lead >}}
|
||||
Ein mächtiges und gleichzeitig leichtes Theme für Hugo, das mit Tailwind CSS erstellt wurde.
|
||||
{{< /lead >}}
|
||||
|
||||
Dies ist eine Demo-Site, die vollständig mit Congo erstellt wurde. Sie enthält auch eine vollständige [Theme-Dokumentation]({{< ref path="docs" lang="en" >}}). Congo ist flexibel und eignet sich sowohl für statische seitenbasierte Inhalte (wie diese Demo) als auch für einen traditionellen Blog mit einem Feed der letzten Beiträge.
|
||||
|
||||
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center pe-3 text-primary-400">
|
||||
{{< icon "triangle-exclamation" >}}
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">Dies ist eine Demo des <code id="layout">page</code>-Layouts.</span>
|
||||
<button
|
||||
id="switch-layout-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||
>
|
||||
Layout ändern ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{< figure src="festivities.svg" class="m-auto mt-6 max-w-prose" >}}
|
||||
|
||||
Schau dir die [Beispielseiten]({{< ref "samples" >}}) an, um ein Gefühl für die Möglichkeiten von Congo zu bekommen. Wenn dir gefällt, was du siehst, dann schau dir sich das Projekt auf [Github](https://github.com/jpanther/congo) an oder lies die [Installationsanleitung]({{< ref path="docs/installation" lang="en">}}), um loszulegen.
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: "¡Bienvenido a Congo! :tada:"
|
||||
description: "Esta es una demostración del tema Congo para Hugo."
|
||||
---
|
||||
|
||||
{{< lead >}}
|
||||
Un tema poderoso y liviano para Hugo creado con Tailwind CSS.
|
||||
{{< /lead >}}
|
||||
|
||||
Este es un sitio de demostración creado completamente con Congo. También contiene un conjunto completo de artículos con [documentación del tema]({{< ref path="docs" lang="en" >}}). Congo es flexible y es excelente tanto para contenido estático basado en páginas (como es el caso de esta demostración) como para un blog tradicional con un feed de publicaciones recientes.
|
||||
|
||||
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center pe-3 text-primary-400">
|
||||
{{< icon "triangle-exclamation" >}}
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">Esta es la demostración en formato <code id="layout">page</code></span>
|
||||
<button
|
||||
id="switch-layout-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||
>
|
||||
Cambiar el diseño ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{< figure src="festivities.svg" class="m-auto mt-6 max-w-prose" >}}
|
||||
|
||||
Explora las [páginas de ejemplo]({{< ref "samples" >}}) para tener una idea de lo que Congo puede hacer. Si te gusta lo que ves, consulta el proyecto en [Github](https://github.com/jpanther/congo) o lee la [Guía de instalación]({{< ref path="docs/installation" lang="en" >}}) para comenzar.
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: "Congoへようこそ! :tada:"
|
||||
description: "これはHugo向けテーマ、Congoのデモです"
|
||||
---
|
||||
|
||||
{{< lead >}}
|
||||
Tailwind CSSをベースに開発された強力で軽量なHugo向けテーマ。
|
||||
{{< /lead >}}
|
||||
|
||||
これはCongoを使って構築されたデモサイトです。
|
||||
[Congoに関するドキュメント]({{< ref "docs" >}})も含まれています。
|
||||
Congoは柔軟性に富み、静的なコンテンツ配信にも、投稿フィード機能を持つようなBlogにも適しています。
|
||||
|
||||
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center pe-3 text-primary-400">
|
||||
{{< icon "triangle-exclamation" >}}
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">これは<code id="layout">page</code>レイアウトのデモです。</span>
|
||||
<button
|
||||
id="switch-layout-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||
>
|
||||
レイアウトを切り替える ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{< figure src="festivities.svg" class="m-auto mt-6 max-w-prose" >}}
|
||||
|
||||
[例]({{< ref "samples" >}})を見て、Congoの実力を実感してください。気に入ったら[GitHub](https://github.com/jpanther/congo)をチェックするか、[インストール]({{< ref "docs/installation" >}})を読んで実際に使い始めてほしい。
|
|
@ -10,7 +10,7 @@ A powerful, lightweight theme for Hugo built with Tailwind CSS.
|
|||
This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts.
|
||||
|
||||
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center ltr:pr-3 rtl:pl-3 text-primary-400">
|
||||
<span class="flex items-center pe-3 text-primary-400">
|
||||
{{< icon "triangle-exclamation" >}}
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
|
@ -24,6 +24,6 @@ This is a demo site built entirely using Congo. It also contains a complete set
|
|||
</span>
|
||||
</div>
|
||||
|
||||
Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started.
|
||||
{{< figure src="festivities.svg" class="m-auto mt-6 max-w-prose" >}}
|
||||
|
||||
 on [Unsplash](https://unsplash.com/s/photos/vibrant-purple?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).")
|
||||
Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started.
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: "欢迎使用Congo! :tada:"
|
||||
description: "这是一个基于Hugo的主题Congo示例。"
|
||||
---
|
||||
|
||||
{{< lead >}}
|
||||
一款基于Tailwindcss的强大且轻量Hugo主题
|
||||
{{< /lead >}}
|
||||
|
||||
这是一个完全使用Congo构建的演示站点。它还包含一个完整的 [主题文档]({{< ref "docs" >}}) 集。Congo是灵活的,非常适合静态基于页面的内容(就像你看到的这个演示)或具有最新文章的传统博客。
|
||||
|
||||
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center pe-3 text-primary-400">
|
||||
{{< icon "triangle-exclamation" >}}
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">这是一个 <code id="layout">page</code> 布局的示例.</span>
|
||||
<button
|
||||
id="switch-layout-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||
>
|
||||
切换布局 ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{< figure src="festivities.svg" class="m-auto mt-6 max-w-prose" >}}
|
||||
|
||||
探索 [示例页面]({{< ref "samples" >}}) 以感受Congo的强大功能。如果你喜欢该主题,请在 [Github](https://github.com/jpanther/congo) 上查看该项目,或阅读 [安装指南]({{< ref "docs/installation" >}}) 开始使用。
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: "ドキュメント"
|
||||
description: "Congoの特徴とその使い方について"
|
||||
|
||||
cascade:
|
||||
showDate: false
|
||||
showAuthor: false
|
||||
showSummary: true
|
||||
invertPagination: true
|
||||
---
|
||||
|
||||
{{< lead >}}
|
||||
シンプルでパワフル。Congoの使い方と特徴をご紹介します。
|
||||
{{< /lead >}}
|
||||
|
||||

|
||||
|
||||
このセクションにはCongoの知るべきすべてが含まれています。もしあなたがCongoに触れるのが初めてならば、[インストール]({{< ref "docs/installation" >}})ガイドを読むか、[例]({{< ref "samples" >}})を見て、Congoは何ができるか確認してください。
|
||||
|
||||
_このドキュメントに素晴らしいイラストを提供してくれた[Katerina Limpitsouni](https://ninalimpi.com)に感謝します。_
|
||||
|
||||
---
|
|
@ -5,6 +5,7 @@ description: "Learn how to use Congo and its features."
|
|||
cascade:
|
||||
showDate: false
|
||||
showAuthor: false
|
||||
showSummary: true
|
||||
invertPagination: true
|
||||
---
|
||||
|
||||
|
@ -16,4 +17,6 @@ Simple, yet powerful. Learn how to use Congo and its features.
|
|||
|
||||
This section contains everything you need to know about Congo. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Congo can do.
|
||||
|
||||
_Special thanks to [Katerina Limpitsouni](https://ninalimpi.com) for the excellent illustrations that are used throughout these docs!_
|
||||
|
||||
---
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: "文档"
|
||||
description: "了解如何使用Congo及其功能。"
|
||||
|
||||
cascade:
|
||||
showDate: false
|
||||
showAuthor: false
|
||||
showSummary: true
|
||||
invertPagination: true
|
||||
---
|
||||
|
||||
{{< lead >}}
|
||||
简单而强大。了解如何使用Congo及其功能。
|
||||
{{< /lead >}}
|
||||
|
||||

|
||||
|
||||
该部分包含关于Congo的所有必要信息。如果您是新手,请查看 [安装]({{< ref "docs/installation" >}}) 指南以开始,或访问 [示例]({{< ref "samples" >}}) 部分查看Congo的功能。
|
||||
|
||||
特别感谢 [Katerina Limpitsouni](https://ninalimpi.com) 为这些文档中使用的出色插图!
|
||||
|
||||
---
|
|
@ -0,0 +1,183 @@
|
|||
---
|
||||
title: "高度なカスタマイズ"
|
||||
date: 2020-08-08
|
||||
draft: false
|
||||
description: "Congoを手動で構築する方法"
|
||||
summary: "Congoは、基本的なTailwind設定の変更、手動でのテーマ構築、カスタムCSSの提供など、高度なカスタマイズをサポートしています。"
|
||||
slug: "advanced-customisation"
|
||||
tags: ["advanced", "css", "docs"]
|
||||
---
|
||||
|
||||
Congoに高度な変更を加える方法はたくさんあります。カスタマイズできる内容や、ご希望の結果を得るための最良の方法については、以下をお読みください。
|
||||
|
||||
さらにアドバイスが必要な場合は[GitHub Discussions](https://github.com/jpanther/congo/discussions)に質問を投稿してください。
|
||||
|
||||
## Hugoプロジェクトの構造
|
||||
|
||||
これらの作業に入る前に、[Hugoプロジェクトの構造](https://gohugo.io/getting-started/directory-structure/)とコンテンツやテーマを管理するためのベストプラクティスについて説明します。
|
||||
|
||||
{{< alert >}}
|
||||
**要約:** テーマファイルを直接編集するのではなく、Hugoプロジェクトのサブディレクトリでカスタマイズを行なってください。
|
||||
{{< /alert >}}
|
||||
|
||||
Congoは、Hugoの標準的なプラクティスをすべて活用できるように作られています。コアのテーマファイルを変更することなく、テーマのすべての側面をカスタマイズしたり上書きしたりできるように設計されています。これにより、ウェブサイトのルック&フィールを完全にコントロールしながら、シームレスなアップグレードが可能になります。
|
||||
|
||||
そのためには、テーマファイルを手動で直接調整してはいけません。Hugo モジュールを使ってインストールする場合でも、git サブモジュールとしてインストールする場合でも、手動でテーマを `themes/` ディレクトリにインクルードする場合でも、これらのファイルは常にそのままにしておくべきです。
|
||||
|
||||
テーマの動作を調整する正しい方法は、Hugoの強力な[file lookup order](https://gohugo.io/templates/lookup-order/)を使ってファイルを上書きすることです。そうすることで、あなたがプロジェクトディレクトリにインクルードしたファイルが自動的にテーマファイルよりも優先されることを保証します。
|
||||
|
||||
例えば、Congoのメイン記事テンプレートをオーバーライドしたい場合、独自の `layouts/_default/single.html` ファイルを作成し、プロジェクトのルートに置くだけです。このファイルはテーマを変更することなく、テーマの `single.html` を上書きします。これは、HTMLテンプレート、パーシャル、ショートコード、設定ファイル、データ、アセットなど、どんなテーマファイルにも使えます。
|
||||
|
||||
このシンプルな慣習に従う限り、あなたのカスタマイズを失うことなく、常にテーマをアップデート(または異なるテーマのバージョンをテスト)することができます。
|
||||
|
||||
## カラースキーム
|
||||
|
||||
Congoにはいくつかのカラースキームが同梱されています。配色を変更するには、 `colorScheme` テーマパラメーターを設定します。組み込みの配色について詳しくは[はじめに]({{< ref "getting-started" >}})セクションを参照してください。
|
||||
|
||||
デフォルトの配色に加えて、独自のスキームを作成し、ウェブサイト全体を好みのスタイルに変更することもできます。スキームは `assets/css/schemes/` ディレクトリに `<scheme-name>.css` ファイルを置くことで作成できます。ファイルを作成したら、テーマ設定の中でその名前を参照するだけです。
|
||||
|
||||
Congoは3色のパレットを定義してテーマ全体に使用しています。この3色は「ニュートラル」、「プライマリー」、「セカンダリー」として定義され、それぞれ10色の濃淡があります。
|
||||
|
||||
Tailwind CSS 3.0が不透明度を用いてカラー値を計算するため、使用するカラーは[特定のフォーマットに準拠](https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo)して指定するする必要があります。
|
||||
|
||||
```css
|
||||
:root {
|
||||
--color-primary-500: 139, 92, 246;
|
||||
}
|
||||
```
|
||||
|
||||
この例では、 `primary-500` をCSS変数として `Red: 139, Green: 92, Blue: 246` に定義しています。
|
||||
|
||||
既存のテーマスタイルシートのいずれかをテンプレートとして使用してください。独自の色を定義するのは自由ですが、インスピレーションを得るために、公式の[Tailwind color palette reference](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)もチェックしてみてください。
|
||||
|
||||
## スタイルのオーバーライド
|
||||
|
||||
独自のHTML要素にスタイルを設定するために、カスタムスタイルを追加する場合があります。Congoでは、独自のCSSスタイルシートでデフォルトのスタイルをオーバーライドすることができます。プロジェクトの `assets/css/` ディレクトリに `custom.css` ファイルを作成するだけです。
|
||||
|
||||
`custom.css` ファイルはHugoによってminifyされ、他のテーマスタイルの後に自動的に読み込まれます。
|
||||
|
||||
### フォントサイズの変更
|
||||
|
||||
`custom.css` を用いてフォントサイズをオーバーライドする例です。Congoでは、ベースとなるHTMLフォントサイズに由来するフォントサイズをテーマ全体で使用するため、フォントサイズの変更は簡単です。デフォルトでは、Tailwindはデフォルトサイズを`12pt`に設定していますが、お好きな値に変更することができます。
|
||||
|
||||
`assets/css/custom.css` を用意して下記のように記述してください:
|
||||
|
||||
```css
|
||||
/* Increase the default font size */
|
||||
html {
|
||||
font-size: 13pt;
|
||||
}
|
||||
```
|
||||
|
||||
この1つの値を変更するだけで、ウェブサイト上のすべてのフォントサイズが新しいサイズに合わせて調整されます。したがって、全体のフォントサイズを大きくするには、値を `12pt` より大きくします。同様に、フォントサイズを小さくするには、値を `12pt` より小さくします。
|
||||
|
||||
## ソースコードから再構築
|
||||
|
||||
大きな変更を加えたい場合は、Tailwind CSSのJITコンパイラを利用し、テーマCSS全体をゼロから再構築することができます。これは、Tailwindの設定を調整したり、メインのスタイルシートに追加のTailwindクラスを追加したい場合に便利です。
|
||||
|
||||
{{< alert >}}
|
||||
**注記:** 手動でテーマを再構築するのは上級者向けです。
|
||||
{{< /alert >}}
|
||||
|
||||
それでは、Tailwind CSSの構築方法を順を追って説明しましょう。
|
||||
|
||||
### Tailwindの設定
|
||||
|
||||
実際に使用されているTailwindのクラスのみを含むCSSファイルを生成するために、JITコンパイラはすべてのHTMLテンプレートとMarkdownファイルをスキャンして、どのスタイルが存在するかをチェックします。コンパイラは、テーマディレクトリのルートに含まれる `tailwind.config.js` ファイルを参照します:
|
||||
|
||||
```js
|
||||
// themes/congo/tailwind.config.js
|
||||
|
||||
module.exports = {
|
||||
content: [
|
||||
"./layouts/**/*.html",
|
||||
"./content/**/*.{html,md}",
|
||||
"./themes/congo/layouts/**/*.html",
|
||||
"./themes/congo/content/**/*.{html,md}",
|
||||
],
|
||||
|
||||
// and more...
|
||||
};
|
||||
```
|
||||
|
||||
デフォルトでは、特定のプロジェクト構造に従っていれば、修正することなく簡単に独自のCSSファイルを生成できるようにコンテンツパスが設定されています。つまり、**Congo を `themes/congo/` のサブディレクトリとしてプロジェクトに含める必要があります。**
|
||||
よって、Hugoモジュールを使って簡単にテーマをインストールすることはできず、 Gitサブモジュール(推奨)か手動インストールのどちらかの方法を取らなければなりません。[インストール]({{< ref "installation" >}})では、これらの方法のいずれかを使ってテーマをインストールする方法を説明しています。
|
||||
|
||||
### プロジェクトの構造
|
||||
|
||||
デフォルト設定の恩恵を授かるには、プロジェクトは下記のような構造になっているべきです。
|
||||
|
||||
```shell
|
||||
.
|
||||
├── assets
|
||||
│ └── css
|
||||
│ └── compiled
|
||||
│ └── main.css # this is the file we will generate
|
||||
├── config # site config
|
||||
│ └── _default
|
||||
├── content # site content
|
||||
│ ├── _index.md
|
||||
│ ├── projects
|
||||
│ │ └── _index.md
|
||||
│ └── blog
|
||||
│ └── _index.md
|
||||
├── layouts # custom layouts for your site
|
||||
│ ├── partials
|
||||
│ │ └── extend-article-link.html
|
||||
│ ├── projects
|
||||
│ │ └── list.html
|
||||
│ └── shortcodes
|
||||
│ └── disclaimer.html
|
||||
└── themes
|
||||
└── congo # git submodule or manual theme install
|
||||
```
|
||||
|
||||
この構造例では、独自のカスタムレイアウトを持つ新しい `projects` コンテンツタイプを、カスタムショートコードと拡張パーシャルとともに追加します。プロジェクトがこの構造に従っていれば、必要なのは `main.css` ファイルを再コンパイルすることだけです。
|
||||
|
||||
### 依存関係のインストール
|
||||
|
||||
上記を動作させるには、 `themes/congo/` ディレクトリにて、プロジェクトの依存関係をインストールする必要がある。このステップには[npm](https://docs.npmjs.com/cli/v7/configuring-npm/install)が必要です。
|
||||
|
||||
```shell
|
||||
cd themes/congo
|
||||
npm install
|
||||
```
|
||||
|
||||
### Tailwindコンパイラの実行
|
||||
|
||||
依存関係のインストールが完了したら、あとは[Tailwind CLI](https://v2.tailwindcss.com/docs/installation#using-tailwind-cli)を使ってJITコンパイラを起動するだけです。Hugoプロジェクトのルートに戻り、以下のコマンドを実行してください:
|
||||
|
||||
```shell
|
||||
cd ../..
|
||||
./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit
|
||||
```
|
||||
|
||||
このコマンドはパス指定の関係で少し醜いですが、基本的にはTailwind CLIを呼び出し、Tailwindの設定ファイル、 `main.css` の場所、そしてコンパイルされたCSSファイルを置く場所( `assets/css/compiled/` )を渡しています。
|
||||
|
||||
Tailwindの設定ファイルによって、プロジェクト内のすべてのコンテンツとレイアウト、およびテーマ内のすべてのコンテンツを自動的に走査し、ウェブサイトに必要なすべてのCSSを含む新しいCSSファイルを作成します。Hugoはプロジェクト内のファイルを自動的にテーマに付属するもので上書きします。
|
||||
|
||||
レイアウトを変更して新しいTailwind CSSスタイルが必要になるたびに、コマンドを再実行するだけで、新しいCSSファイルを生成することができます。コマンドの最後に `-w` を追加すると、JITコンパイラをウォッチモードで実行することもできます。
|
||||
|
||||
### buildスクリプトの準備
|
||||
|
||||
私がやっているように、必要なコマンドを含む `package.json` をプロジェクトのルートに追加して、再構築プロセスを簡単にすることもできます。
|
||||
|
||||
```js
|
||||
// package.json
|
||||
|
||||
{
|
||||
"name": "my-website",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"server": "hugo server -b http://localhost -p 8000",
|
||||
"dev": "NODE_ENV=development ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
|
||||
"build": "NODE_ENV=production ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit"
|
||||
},
|
||||
// and more...
|
||||
}
|
||||
```
|
||||
|
||||
これで、デザインに取りかかりたいときに `npm run dev` を実行すればコンパイラがウォッチモードで実行されます。デプロイする準備ができたら、 `npm run build` を実行すれば、通常のTailwind CSSビルドが実行されます。
|
||||
|
||||
🙋♀️ ヘルプが必要な場合は、遠慮なく[GitHub Discussions](https://github.com/jpanther/congo/discussions)に質問を投稿してください。
|
|
@ -3,6 +3,7 @@ title: "Advanced Customisation"
|
|||
date: 2020-08-08
|
||||
draft: false
|
||||
description: "Learn how to build Congo manually."
|
||||
summary: "Congo supports advanced customisations that include modifying the underlying Tailwind configuration, building the theme manually and providing custom CSS."
|
||||
slug: "advanced-customisation"
|
||||
tags: ["advanced", "css", "docs"]
|
||||
---
|
||||
|
@ -19,7 +20,7 @@ Before leaping into it, first a quick note about [Hugo project structure](https:
|
|||
**In summary:** Never directly edit the theme files. Only make customisations in your Hugo project's sub-directories, not in the themes directory itself.
|
||||
{{< /alert >}}
|
||||
|
||||
Congo is built to take advantage of all the standard Hugo practices. It is designed to allow all aspects of the theme to be customised and overriden without changing any of the core theme files. This allows for a seamless upgrade experience while giving you total control over the look and feel of your website.
|
||||
Congo is built to take advantage of all the standard Hugo practices. It is designed to allow all aspects of the theme to be customised and overridden without changing any of the core theme files. This allows for a seamless upgrade experience while giving you total control over the look and feel of your website.
|
||||
|
||||
In order to achieve this, you should never manually adjust any of the theme files directly. Whether you install using Hugo modules, as a git submodule or manually include the theme in your `themes/` directory, you should always leave these files intact.
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
---
|
||||
title: "高级定制"
|
||||
date: 2020年8月8日
|
||||
draft: false
|
||||
description: "学习如何手动构建 Congo。"
|
||||
summary: "Congo 支持高级定制,包括修改底层的 Tailwind 配置,手动构建主题以及提供自定义 CSS。"
|
||||
slug: "advanced-customisation"
|
||||
tags: ["高级", "CSS", "文档"]
|
||||
---
|
||||
|
||||
有许多方法可以对 Congo 进行高级更改。阅读以下内容,了解可以定制的内容以及实现所需结果的最佳方式。
|
||||
|
||||
如果您需要进一步的建议,请在 [GitHub 讨论区](https://github.com/jpanther/congo/discussions) 上发表您的问题。
|
||||
|
||||
## Hugo 项目结构
|
||||
|
||||
在深入了解之前,首先简要介绍一下[Hugo 项目结构](https://gohugo.io/getting-started/directory-structure/)和管理内容以及主题定制的最佳实践。
|
||||
|
||||
{{< alert >}}
|
||||
**总结:**永远不要直接编辑主题文件。只在 Hugo 项目的子目录中进行定制,而不要在主题目录本身进行定制。
|
||||
{{< /alert >}}
|
||||
|
||||
Congo 的构建旨在充分利用所有标准 Hugo 实践。它被设计为允许定制和覆盖主题的所有方面,而无需更改任何核心主题文件。这样一来,您可以在完全控制网站的外观和感觉的同时,获得无缝的升级体验。
|
||||
|
||||
为了实现这一点,您永远不应直接调整主题文件中的任何文件。无论您是使用 Hugo 模块安装,作为 git 子模块或手动将主题包含在您的 `themes/` 目录中,都应始终保持这些文件不变。
|
||||
|
||||
调整任何主题行为的正确方式是使用 Hugo 强大的[文件查找顺序](https://gohugo.io/templates/lookup-order/)。总体而言,查找顺序确保您在项目目录中包含的任何文件将自动优先于任何主题文件。
|
||||
|
||||
例如,如果您想要覆盖 Congo 中的主文章模板,您只需创建自己的 `layouts/_default/single.html` 文件并将其放置在项目的根目录。该文件将覆盖主题中的 `single.html`,而无需更改主题本身。这适用于任何主题文件 - HTML 模板、局部、短代码、配置文件、数据、资产等。
|
||||
|
||||
只要遵循这个简单的做法,您就始终能够更新主题(或测试不同的主题版本),而不必担心会丢失任何自定义更改。
|
||||
|
||||
## 颜色方案
|
||||
|
||||
Congo 默认提供了许多颜色方案。要更改基本的颜色方案,您可以设置 `colorScheme` 主题参数。请参阅 [入门指南]({{< ref "getting-started#colour-schemes" >}}) 部分,了解内置方案的更多信息。
|
||||
|
||||
除了默认方案之外,您还可以创建自己的方案,并根据自己的喜好重新设计整个网站。通过在 `assets/css/schemes/` 文件夹中放置 `<scheme-name>.css` 文件来创建方案。创建文件后,只需在主题配置中按名称引用即可。
|
||||
|
||||
Congo 定义了一个贯穿整个主题使用的三种颜色的调色板。这三种颜色分别被定义为 `neutral`、`primary` 和 `secondary` 变体,每种颜色包含十个色调。
|
||||
|
||||
由于 Tailwind CSS 3.0 使用不透明度计算颜色值的方式,方案中指定的颜色需要[符合特定格式](https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo),即提供红色、绿色和蓝色颜色值。
|
||||
|
||||
```css
|
||||
:root {
|
||||
--color-primary-500: 139, 92, 246;
|
||||
}
|
||||
```
|
||||
|
||||
此示例为 `primary-500` 颜色定义了一个 CSS 变量,其红色值为 `139`,绿色值为 `92`,蓝色值为 `246`。
|
||||
|
||||
使用现有的主题样式表作为模板。您可以自定义自己的颜色,但是为了一些灵感,请查看官方的 [Tailwind 颜色调色板参考](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)。
|
||||
|
||||
## 覆盖样式表
|
||||
|
||||
有时您需要添加自定义样式以为自己的 HTML 元素设置样式。Congo 提供了允许您在自己的 CSS 样式表中覆盖默认样式的场景。只需在项目的 `assets/css/` 文件夹中创建一个 `custom.css` 文件。
|
||||
|
||||
`custom.css` 文件将由 Hugo 进行最小化,并在所有其他主题样式之后自动加载,这意味着自定义文件中的任何内容都将覆盖默认值。
|
||||
|
||||
### 调整字体大小
|
||||
|
||||
更改网站的字体大小是覆盖默认样式表的一个示例。Congo 使此变得简单,因为它在整个主题中使用了从基本 HTML 字体大小派生的缩放字体大小。默认情况下,Tailwind 将默认大小设置为 `12pt`,但可以更改为您喜欢的任何值。
|
||||
|
||||
使用上述[说明]({{< ref "#overriding-the-stylesheet" >}})创建一个 `custom.css` 文件,并添加以下 CSS 声明:
|
||||
|
||||
```css
|
||||
/* Increase the default font size */
|
||||
html {
|
||||
font-size: 13pt;
|
||||
}
|
||||
```
|
||||
|
||||
只需更改此一个值,您网站上的所有字体大小就会调整为匹配这个新大小。因此,要增加使用的整体字体大小,请将值设置为大于 `12pt`。同样,要减小字体大小,请将值设置为小于 `12pt`。
|
||||
|
||||
## 从源代码构建主题 CSS
|
||||
|
||||
如果您想进行重大更改,可以利用 Tailwind CSS 的 JIT 编译器从头开始重新构建整个主题 CSS。如果您想要调整 Tailwind 配置或向主样式表添加额外的 Tailwind 类,这将非常有用。
|
||||
|
||||
{{< alert >}}
|
||||
**注意:** 手动构建主题仅适用于高级用户。
|
||||
{{< /alert >}}
|
||||
|
||||
让我们逐步了解构建 Tailwind CSS 的过程。
|
||||
|
||||
### Tailwind 配置
|
||||
|
||||
为了生成一个仅包含实际使用的 Tailwind 类的 CSS 文件,JIT 编译器需要扫描所有 HTML 模板和 Markdown 内容文件,以检查标记中存在哪些样式。编译器通过查看主题目录根目录中包含的 `tailwind.config.js` 文件来执行此操作:
|
||||
|
||||
```js
|
||||
// themes/congo/tailwind.config.js
|
||||
|
||||
module.exports = {
|
||||
content: [
|
||||
"./layouts/**/*.html",
|
||||
"./content/**/*.{html,md}",
|
||||
"./themes/congo/layouts/**/*.html",
|
||||
"./themes/congo/content/**/*.{html,md}",
|
||||
],
|
||||
|
||||
// and more...
|
||||
};
|
||||
```
|
||||
|
||||
这个默认配置已经包含了这些内容路径,以便您可以轻松生成自己的 CSS 文件,而无需修改它,只要您遵循特定的项目结构。换句话说,**您必须将 Congo 作为子目录包含在项目中,即 `themes/congo/`**。这意味着您不能轻松使用 Hugo 模块来安装主题,而必须选择 git 子模块(推荐)或手动安装路线。[安装文档]({{< ref "installation" >}})解释了如何使用这两种方法之一安装主题。
|
||||
|
||||
### 项目结构
|
||||
|
||||
为了充分利用默认配置,您的项目结构应该长得像下面这个样子...
|
||||
|
||||
```shell
|
||||
.
|
||||
├── assets
|
||||
│ └── css
|
||||
│ └── compiled
|
||||
│ └── main.css # this is the file we will generate
|
||||
├── config # site config
|
||||
│ └── _default
|
||||
├── content # site content
|
||||
│ ├── _index.md
|
||||
│ ├── projects
|
||||
│ │ └── _index.md
|
||||
│ └── blog
|
||||
│ └── _index.md
|
||||
├── layouts # custom layouts for your site
|
||||
│ ├── partials
|
||||
│ │ └── extend-article-link.html
|
||||
│ ├── projects
|
||||
│ │ └── list.html
|
||||
│ └── shortcodes
|
||||
│ └── disclaimer.html
|
||||
└── themes
|
||||
└── congo # git submodule or manual theme install
|
||||
```
|
||||
|
||||
这个例子的结构添加了一个新的 `projects` 内容类型,具有自己的自定义布局,以及一个自定义短代码和扩展部分。只要项目遵循这个结构,唯一需要做的就是重新编译 `main.css` 文件。
|
||||
|
||||
### 安装依赖项
|
||||
|
||||
为了使这个工作,你需要切换到 `themes/congo/` 目录并安装项目的依赖项。对于这一步骤,你的本地机器上需要 [npm](https://docs.npmjs.com/cli/v7/configuring-npm/install)。
|
||||
|
||||
```shell
|
||||
cd themes/congo
|
||||
npm install
|
||||
```
|
||||
|
||||
### 运行 Tailwind 编译器
|
||||
|
||||
在安装了依赖项之后,唯一需要做的就是使用 [Tailwind CLI](https://v2.tailwindcss.com/docs/installation#using-tailwind-cli) 调用 JIT 编译器。返回到你的 Hugo 项目的根目录,执行以下命令:
|
||||
|
||||
```shell
|
||||
cd ../..
|
||||
./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit
|
||||
```
|
||||
|
||||
由于涉及到路径,这是一个有点丑陋的命令,但基本上你是在调用 Tailwind CLI 并传递 Tailwind 配置文件的位置(我们上面看到的文件),主题的 `main.css` 文件的位置,以及你想要放置编译后的 CSS 文件的位置(它将放在你的 Hugo 项目的 `assets/css/compiled/` 文件夹中)。
|
||||
|
||||
配置文件将自动检查你的项目中的所有内容和布局,以及主题中的所有内容,并构建一个新的 CSS 文件,其中包含你的网站所需的所有 CSS。由于 Hugo 处理文件层次结构的方式,这个文件在你的项目中现在将自动覆盖主题自带的文件。
|
||||
|
||||
每当你更改布局并需要新的 Tailwind CSS 样式时,只需重新运行该命令并生成新的 CSS 文件。你也可以在命令的末尾添加 `-w` 以在监视模式下运行 JIT 编译器。
|
||||
|
||||
### 创建构建脚本
|
||||
|
||||
为了完全完成这个解决方案,你可以通过为这些命令添加别名,或者像我一样,在你的项目根目录添加一个包含必要脚本的 `package.json` 文件,来简化整个过程...
|
||||
|
||||
```js
|
||||
// package.json
|
||||
|
||||
{
|
||||
"name": "my-website",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"server": "hugo server -b http://localhost -p 8000",
|
||||
"dev": "NODE_ENV=development ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
|
||||
"build": "NODE_ENV=production ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit"
|
||||
},
|
||||
// and more...
|
||||
}
|
||||
```
|
||||
|
||||
现在,当你想要设计你的网站时,你可以调用 `npm run dev`,编译器将在监视模式下运行。当你准备部署时,运行 `npm run build`,你将得到一个干净的 Tailwind CSS 构建。
|
||||
|
||||
🙋♀️ 如果你需要帮助,请随时在 [GitHub Discussions](https://github.com/jpanther/congo/discussions) 上提问。
|
After Width: | Height: | Size: 10 KiB |
|
@ -0,0 +1,187 @@
|
|||
---
|
||||
title: "基本設定"
|
||||
date: 2020-08-14
|
||||
draft: false
|
||||
description: "Congoで利用可能なすべての設定"
|
||||
summary: "Congoで利用可能なすべてのサイト、言語、テーマ設定と、それらを使用してプロジェクトをカスタマイズする方法をご覧ください。"
|
||||
slug: "configuration"
|
||||
tags: ["config", "docs"]
|
||||
---
|
||||
|
||||
Congoは高度にカスタマイズ可能なテーマで、最新のHugoの機能のいくつかを使用して、設定方法を簡素化しています。
|
||||
|
||||
このテーマには、基本的なブログまたは静的ウェブサイトを立ち上げて実行できるようにするデフォルト設定が同梱されています。
|
||||
|
||||
> 同梱されている設定ファイルはTOMLフォーマットで提供されています。設定ファイルをYAMLやJSONに変換したい場合はご自由にどうぞ。
|
||||
|
||||
デフォルトのテーマ設定は各ファイルに文書化されているので、ニーズに合わせて自由に設定を調整することができます。
|
||||
|
||||
{{< alert >}}
|
||||
[インストール手順]({{< ref "/docs/installation#set-up-theme-configuration-files" >}})で説明されているように、Hugoプロジェクトの `config/_default/` にあるファイルを修正し、プロジェクトルートにある `config.toml` ファイルを削除することで、テーマの設定を調整します。
|
||||
{{< /alert >}}
|
||||
|
||||
## サイト設定
|
||||
|
||||
Hugoの標準的な設定変数はテーマ全体を通して尊重されますが、最良のエクスペリエンスのために設定すべき特別なものもあります。
|
||||
|
||||
サイトの設定は `config/_default/config.toml` ファイルで管理されます。下の表はCongoが利用するすべての設定の概要です。
|
||||
|
||||
この表で提供される変数名は、TOML構造を簡略化するためにドット記法を使用していることに注意してください(つまり、 `outputs.home` は `[outputs] home` を指します)。
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`theme`|`"congo"`|Hugo Modulesを使用する場合、この設定値は削除してください。他のすべてのインストールタイプでは、テーマを機能させるために `congo` に設定する必要があります。|
|
||||
|`baseURL`|_Not set_|ウェブサイトのルートへのURL。|
|
||||
|`defaultContentLanguage`|`"en"`|この値はテーマコンポーネントとコンテンツのデフォルト言語を決定します。サポートされる言語コードについては、下記の[言語と国際化](#言語と国際化)セクションを参照してください。|
|
||||
|`enableRobotsTXT`|`true`|有効にすると、サイトルートに `robots.txt` ファイルが作成され、検索エンジンがサイト全体をクロールできるようになります。あらかじめ用意されている `robots.txt` を利用したい場合は、`false` に設定して `static` ディレクトリにファイルを置いてください。完全にコントロールしたい場合は、[カスタムレイアウト]({{< ref "content-examples" >}})を指定してこのファイルを生成することができます。|
|
||||
|`paginate`|`10`|記事一覧の各ページに掲載される記事の数。|
|
||||
|`summaryLength`|`0`|記事の要約が[フロントマター]({{< ref "front-matter" >}})で提供されていない場合に、記事の要約を生成するために使われる単語の数。デフォルト値 `0` は最初の文章を使用します。この値は要約が非表示の場合には影響しません。|
|
||||
|`outputs.home`|`["HTML", "RSS", "JSON"]`|生成される出力フォーマット。Congoでは、すべてのテーマコンポーネントが正しく動作するために、HTML、RSS、JSONが必要です。|
|
||||
|`permalinks`|_Not set_|パーマリンクの設定は[Hugo docs](https://gohugo.io/content-management/urls/#permalinks)を参照してください。|
|
||||
|`taxonomies`|_Not set_|Taxonomiesについては、[コンテンツの整理]({{< ref "getting-started" >}})セクションを参照してください。|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## 言語と国際化
|
||||
|
||||
Congoは完全な多言語ウェブサイト用に最適化されており、テーマのアセットはすぐに複数の言語に翻訳されます。言語設定により、複数バージョンのコンテンツを生成し、訪問者の母国語でカスタマイズされたエクスペリエンスを提供することができます。
|
||||
|
||||
Congoは現在、以下の言語に対応しています:
|
||||
|
||||
| Language | Code |
|
||||
| --------------------------------------- | ------- |
|
||||
| :gb: **English (default)** | `en` |
|
||||
| :egypt: Arabic | `ar` |
|
||||
| :bangladesh: Bengali | `bn` |
|
||||
| :bulgaria: Bulgarian | `bg` |
|
||||
| :cn: Chinese - Simplified (China) | `zh-cn` |
|
||||
| :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` |
|
||||
| :flag-cz: Czech | `cs` |
|
||||
| :netherlands: Dutch | `nl` |
|
||||
| :finland: Finnish | `fi` |
|
||||
| :fr: French | `fr` |
|
||||
| :de: German | `de` |
|
||||
| :israel: Hebrew | `he` |
|
||||
| :hungary: Hungarian | `hu` |
|
||||
| :indonesia: Indonesian | `id` |
|
||||
| :it: Italian | `it` |
|
||||
| :jp: Japanese | `ja` |
|
||||
| :kr: Korean | `ko` |
|
||||
| :poland: Polish | `pl` |
|
||||
| :brazil: Portuguese (Brazil) | `pt-br` |
|
||||
| :portugal: Portuguese (Portugal) | `pt-pt` |
|
||||
| :romania: Romanian | `ro` |
|
||||
| :ru: Russian | `ru` |
|
||||
| :slovakia: Slovak | `sk` |
|
||||
| :es: Spanish (Spain) | `es` |
|
||||
| :sweden: Swedish | `sv` |
|
||||
| :flag-lk: Tamil | `ta` |
|
||||
| :tr: Turkish | `tr` |
|
||||
| :ukraine: Ukrainian | `uk` |
|
||||
| :vietnam: Vietnamese | `vi` |
|
||||
|
||||
翻訳文字列を含むカスタムファイルを `i18n/[code].yaml` に作成することでデフォルトの翻訳をオーバーライドできます。このメソッドを使って新しい言語を追加することもできます。新しい翻訳をコミュニティと共有したい場合、[Pull Request](https://github.com/jpanther/congo/pulls)を作ってください。
|
||||
|
||||
### 設定
|
||||
|
||||
可能な限り柔軟に対応するために、ウェブサイトの言語ごとに言語設定ファイルを作成する必要があります。デフォルトでは、Congoは `config/_default/languages.en.toml` に英語の言語設定を含んでいます。
|
||||
|
||||
英語以外の言語でウェブサイトを作成したい場合は、デフォルトのファイルをテンプレートとして使用したり、ファイル名を変更したりすることができます。ファイル名は `languages.[language-code].toml` という形式にしてください。
|
||||
|
||||
{{< alert >}}
|
||||
**注記:** [サイト設定](#サイト設定)の `defaultContentLanguage` パラメーターが、言語設定ファイル名の `[language-code]` と一致していることを確認してください。
|
||||
{{< /alert >}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`languageCode`|`"en"`|このファイルの言語コード。トップレベル言語 (例 `en`)またはサブ変数 (例 `en-AU`)で、ファイル名の `[language-code]` と一致する必要があります。|
|
||||
|`languageName`|`"English"`|言語名。|
|
||||
|`languageDirection`|`"ltr"`|RTL言語かどうか。 `"rtl"` に設定すると、コンテンツを右から左にリフローする。CongoはRTL言語とLTR言語の同時使用を完全にサポートしており、動的に両方の言語に調整します。|
|
||||
|`weight`|`1`|多言語サイトを構築する際の優先順序。|
|
||||
|`title`|`"Congo"`|ウェブサイトのタイトル。サイトのヘッダーとフッターに表示されます。|
|
||||
|`copyright`|_Not set_|サイトのフッターに表示する著作権メッセージを含むMarkdown文字列。何も指定されない場合、Congoは `title` を使って自動的にコピーライト文字列を生成します。|
|
||||
|`params.dateFormat`|`"2 January 2006"`|日付の書式。許容される書式については、[Hugo docs](https://gohugo.io/functions/format/#gos-layout-string)を参照してください。|
|
||||
|`params.mainSections`|_Not set_|最近の記事リストに表示するセクション。指定されていない場合は、記事の数が最も多いセクションが使われます。|
|
||||
|`params.description`|_Not set_|ウェブサイトの説明。これはサイトのメタデータに使用されます。|
|
||||
|`params.author.name`|_Not set_|著者の名前。これは記事のフッターと、プロフィールレイアウトが使用されている場合にホームページに表示されます。|
|
||||
|`params.author.image`|_Not set_|著者の画像ファイルへのパス。画像は縦横比1:1で、 `assets/` に置くこと。|
|
||||
|`params.author.headline`|_Not set_|著者の見出しを含むMarkdown文字列。プロフィールのトップページで著者の名前の下に表示されます。|
|
||||
|`params.author.bio`|_Not set_|著者の経歴を含むMarkdown文字列。記事のフッターに表示されます。|
|
||||
|`params.author.links`|_Not set_|著者の詳細とともに表示するリンク。設定ファイルにはリンクの例が含まれており、コメントを外すだけで有効にすることができます。リンクが表示される順番は、配列に表示される順番によって決まります。 `assets/icons/` に対応するSVGアイコンを用意することで、カスタムリンクを追加することもできます。|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
### メニュー
|
||||
|
||||
Congoは言語別メニュー設定もサポートしている。メニュー設定ファイルは、言語ファイルと同じ命名形式に従っています。ファイル名に言語コードを指定するだけで、そのファイルがどの言語に関連するかをHugoに伝えることができます。
|
||||
|
||||
メニュー設定ファイルは `menus.[language-code].toml` という形式で命名されます。 `[language-code]` が設定と一致していることを常に確認してください。
|
||||
|
||||
[はじめに]({{< ref "getting-started#メニュー" >}})セクションで、このファイルの構造について詳しく説明しています。また、[Hugo menu docs](https://gohugo.io/content-management/menus/)にも設定例があります。
|
||||
|
||||
## テーマパラメーター
|
||||
|
||||
Congoはテーマの機能を制御する多数の設定パラメーターを提供します。下の表は `config/_default/params.toml` ファイルで利用可能なパラメーターの概要です。
|
||||
|
||||
パラメーターの多くは、フロントマターで指定することで、記事ごとに上書きすることができます。詳しくは、[フロントマター]({{< ref "front-matter" >}})セクションを参照してください。
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`colorScheme`|`"congo"`|使用する配色。有効な値は `congo` (デフォルト), `avocado`, `cherry`, `fire`, `ocean`, `sapphire`, `slate` です。詳しくは [カラースキーム]({{< ref "getting-started#カラースキーム" >}})セクションを参照してください。|
|
||||
|`defaultThemeColor`|`"#FFFFFF"`|まだ翻訳されていません。|
|
||||
|`defaultAppearance`|`"light"`|デフォルトのテーマ外観、 `light` または `dark` のいずれか。|
|
||||
|`autoSwitchAppearance`|`true`|テーマの外観を訪問者のオペレーティングシステムの設定に基づいて自動的に切り替えるかどうか。常に `defaultAppearance` を使うようにするには `false` を設定します。|
|
||||
|`enableSearch`|`false`|サイト内検索を有効にするかどうか。検索機能を有効にするには `true` を設定します。検索機能は、[サイト設定](#サイト設定)の `outputs.home` が正しく設定されているかどうかに依存することに注意してください。|
|
||||
|`enableCodeCopy`|`false`|`<code>` ブロックに対してクリップボードへのコピーボタンを有効にするかどうか。 `highlight.noClasses` が `false` に設定されていなければ、コードコピーは正しく機能しません。[その他の設定ファイル](#その他の設定ファイル)については以下を参照してください。|
|
||||
|`enableImageLazyLoading`|`true`|ブラウザが遅延ロードするように画像をマークするかどうか。|
|
||||
|`robots`|_Not set_|ロボットがあなたのサイトをどのように扱うべきかを示す文字列。設定された場合、 `<head>` に出力されます。有効な値については[Googleのドキュメント](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)を参照してください。|
|
||||
|`fingerprintAlgorithm`|`"sha256"`|`assets` にフィンガープリントを行う際のハッシュアルゴリズム。有効なオプションは `md5`、`sha256`、`sha384` および `sha512` です。|
|
||||
|`header.layout`|`"basic"`|ヘッダーとメニューのレイアウト。有効な値は `basic`、`hamburger`、`hybrid`または`custom`です。 `custom` に設定した場合は、 `/layouts/partials/header/custom.html` ファイルを作成して独自のレイアウトを指定する必要があります。|
|
||||
|`header.logo`|_Not set_|`assets/` 内のロゴファイルへの相対パス。ロゴファイルは2倍の解像度で提供され、任意の画像サイズに対応している必要があります。|
|
||||
|`header.logoDark`|_Not set_|`dark` モード時に使用されるロゴファイルへの相対パス。|
|
||||
|`header.showTitle`|`true`|サイトのタイトルをヘッダーに表示するかどうか。|
|
||||
|`footer.showCopyright`|`true`|サイトフッターにコピーライト文字列を表示するかどうか。[言語と国際化](#言語と国際化)の `copyright` パラメーターを使って文字列自体をカスタマイズできます。|
|
||||
|`footer.showThemeAttribution`|`true`|"Powered by Hugo & Congo" といった帰属表示をフッターに表示するかどうか。この表示を無効にする場合は、サイト上の他の場所(例えば、アバウトページなど)でテーマの帰属を表示することを検討してください。|
|
||||
|`footer.showAppearanceSwitcher`|`false`|フッターに外観スイッチャーを表示するかどうか。訪問者の設定を保持するためにブラウザのローカルストレージが使用されます。|
|
||||
|`footer.showScrollToTop`|`true`|`true` に設定すると、最上部にスクロールする矢印が表示されます。|
|
||||
|`homepage.layout`|`"page"`|ホームページのレイアウト。有効な値は `page`, `profile` または `custom` です。 `custom` に設定した場合は、 `/layouts/partials/home/custom.html` ファイルを作成して、独自のレイアウトを指定する必要があります。詳しくは[ホームページレイアウト]({{< ref "homepage-layout" >}})セクションを参照してください。|
|
||||
|`homepage.showRecent`|`false`|ホームページに最近の記事リストを表示するかどうか。|
|
||||
|`homepage.recentLimit`|`5`|`homepage.showRecent` が `true` の場合に表示する最近の記事の最大数。|
|
||||
|`article.showDate`|`true`|記事が作成された日付を表示するかどうか。|
|
||||
|`article.showDateUpdated`|`false`|記事が更新された日付を表示するかどうか。|
|
||||
|`article.showAuthor`|`true`|記事フッターに著者欄を表示するかどうか。|
|
||||
|`article.showBreadcrumbs`|`false`|記事のヘッダーにパンくずリストを表示するかどうか。|
|
||||
|`article.showDraftLabel`|`true`|`--buildDrafts` でビルドしたときに、記事の横に下書きインジケータを表示するかどうか。|
|
||||
|`article.showEdit`|`false`|記事の内容を編集するためのリンクを表示するかどうか。|
|
||||
|`article.editURL`|_Not set_|`article.showEdit` がアクティブな場合の編集リンクのURL。|
|
||||
|`article.editAppendPath`|`true`|`article.editURL`で設定されたURLに現在の記事へのパスを追加するかどうか。|
|
||||
|`article.showHeadingAnchors`|`true`|見出しアンカーリンクを記事内の見出しと一緒に表示するかどうか。|
|
||||
|`article.showPagination`|`true`|記事のフッターに次/前の記事リンクを表示するかどうか。|
|
||||
|`article.invertPagination`|`false`|次の記事/前の記事リンクの向きを反転させるかどうか。|
|
||||
|`article.showReadingTime`|`true`|記事の予想読了時間を表示するかどうか。|
|
||||
|`article.showTableOfContents`|`false`|記事に目次を表示するかどうか。|
|
||||
|`article.showTaxonomies`|`false`|この記事に関連するTaxonomiesを表示するかどうか。|
|
||||
|`article.showWordCount`|`false`|記事の単語数を表示するかどうか。|
|
||||
|`article.showComments`|`false`|[コメント]({{< ref "partials#コメント" >}})を記事フッターの後に含めるかどうか。|
|
||||
|`article.sharingLinks`|_Not set_|各記事の最後に共有リンクを表示するかどうか。 `false` にすると共有リンクは表示されません。|
|
||||
|`list.showBreadcrumbs`|`false`|リストページのヘッダーにパンくずリストを表示するかどうか。|
|
||||
|`list.showTableOfContents`|`false`|リストページに目次を表示するかどうか。|
|
||||
|`list.showTaxonomies`|`false`|リストページに関連するTaxonomiesを表示するかどうか。|
|
||||
|`list.showSummary`|`false`|リストページに記事の要約を表示するかどうか。もし[フロントマター]({{< ref "front-matter" >}})で要約が提供されていない場合、[サイト設定](#サイト設定)の `summaryLength` パラメーターを使って要約が自動生成されます。|
|
||||
|`list.groupByYear`|`true`|リストページで記事を年ごとにグループ化するかどうか。|
|
||||
|`list.paginationWidth`|`1`|リストページを切り詰める際に、現在のページの両側にいくつのページネーションリンクを出力するか。 `1` の場合、現在のページの両側に1つのリンクを出力します。 _最初のページ_ と _最後のページ_ へのリンクは常に表示され、この値に追加されます。|
|
||||
|`sitemap.excludedKinds`|`["taxonomy", "term"]`|生成される `/sitemap.xml` から除外されるべきコンテンツの種類。許容される値については[Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds)を参照してください。|
|
||||
|`taxonomy.showTermCount`|`true`|TaxonomiesのリストにTermごとの記事数を表示するかどうか。|
|
||||
|`fathomAnalytics.site`|_Not set_|Fathom Analyticsによって生成されたウェブサイトのサイトコード。詳細は[アナリティクス]({{< ref "partials#アナリティクス" >}})を参照してください。|
|
||||
|`verification.google`|_Not set_|サイトのメタデータに含めるGoogleが提供するサイト検証文字列。|
|
||||
|`verification.bing`|_Not set_|サイトのメタデータに含めるBingが提供するサイト検証文字列。|
|
||||
|`verification.pinterest`|_Not set_|サイトのメタデータに含めるPinterestが提供するサイト検証文字列。|
|
||||
|`verification.yandex`|_Not set_|サイトのメタデータに含めるYandexが提供するサイト検証文字列。|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## その他の設定ファイル
|
||||
|
||||
このテーマには `markup.toml` 設定ファイルも含まれています。このファイルにはいくつかの重要なパラメータが含まれており、Congoで構築されたサイトを生成するためにHugoが正しく設定されるようにします。
|
||||
|
||||
このファイルがconfigディレクトリに存在し、必要な値が設定されていることを常に確認してください。これを行わないと、特定の機能が正しく動作しなかったり、意図しない動作になったりする可能性があります。
|
|
@ -3,6 +3,7 @@ title: "Configuration"
|
|||
date: 2020-08-14
|
||||
draft: false
|
||||
description: "All the configuration variables available in Congo."
|
||||
summary: "Discover all the site, language and theme configurations that are available in Congo and how they can be used to customise your project."
|
||||
slug: "configuration"
|
||||
tags: ["config", "docs"]
|
||||
---
|
||||
|
@ -50,22 +51,34 @@ The theme currently supports the following languages out of the box:
|
|||
| Language | Code |
|
||||
| --------------------------------------- | ------- |
|
||||
| :gb: **English (default)** | `en` |
|
||||
| :egypt: Arabic | `ar` |
|
||||
| :bangladesh: Bengali | `bn` |
|
||||
| :bulgaria: Bulgarian | `bg` |
|
||||
| :cn: Chinese - Simplified (China) | `zh-cn` |
|
||||
| :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` |
|
||||
| :flag-cz: Czech | `cs` |
|
||||
| :netherlands: Dutch | `nl` |
|
||||
| :finland: Finnish | `fi` |
|
||||
| :fr: French | `fr` |
|
||||
| :de: German | `de` |
|
||||
| :israel: Hebrew | `he` |
|
||||
| :hungary: Hungarian | `hu` |
|
||||
| :indonesia: Indonesian | `id` |
|
||||
| :it: Italian | `it` |
|
||||
| :jp: Japanese | `ja` |
|
||||
| :kr: Korean | `ko` |
|
||||
| :poland: Polish | `pl` |
|
||||
| :brazil: Portuguese (Brazil) | `pt-br` |
|
||||
| :portugal: Portuguese (Portugal) | `pt-pt` |
|
||||
| :romania: Romanian | `ro` |
|
||||
| :ru: Russian | `ru` |
|
||||
| :slovakia: Slovak | `sk` |
|
||||
| :es: Spanish (Spain) | `es` |
|
||||
| :sweden: Swedish | `sv` |
|
||||
| :flag-lk: Tamil | `ta` |
|
||||
| :tr: Turkish | `tr` |
|
||||
| :ukraine: Ukrainian | `uk` |
|
||||
| :vietnam: Vietnamese | `vi` |
|
||||
|
||||
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/jpanther/congo/pulls).
|
||||
|
||||
|
@ -82,21 +95,20 @@ The default file can be used as a template to create additional languages, or re
|
|||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`languageCode`|`"en"`|The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `isoCode` parameter which is case-sensitive.|
|
||||
|`languageCode`|`"en"`|The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`) and should match the language code in the filename.|
|
||||
|`languageName`|`"English"`|The name of the language.|
|
||||
|`displayName`|`"EN"`|The name used when the language appears on the website.|
|
||||
|`isoCode`|`"en"`|The ISO language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).|
|
||||
|`languageDirection`|`"ltr"`|Whether or not this is an RTL language. Set to `"rtl"` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.|
|
||||
|`weight`|`1`|The weight determines the order of languages when building multilingual sites.|
|
||||
|`rtl`|`false`|Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.|
|
||||
|`dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|
|
||||
|`title`|`"Congo"`|The title of the website. This will be displayed in the site header and footer.|
|
||||
|`description`|_Not set_|The website description. This will be used in the site metadata.|
|
||||
|`copyright`|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`.|
|
||||
|`author.name`|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.|
|
||||
|`author.image`|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder.|
|
||||
|`author.headline`|_Not set_|A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name.|
|
||||
|`author.bio`|_Not set_|A Markdown string containing the author's bio. It will be displayed in article footers.|
|
||||
|`author.links`|_Not set_|The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`.|
|
||||
|`params.dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|
|
||||
|`params.mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|
||||
|`params.description`|_Not set_|The website description. This will be used in the site metadata.|
|
||||
|`params.author.name`|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.|
|
||||
|`params.author.image`|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder.|
|
||||
|`params.author.headline`|_Not set_|A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name.|
|
||||
|`params.author.bio`|_Not set_|A Markdown string containing the author's bio. It will be displayed in article footers.|
|
||||
|`params.author.links`|_Not set_|The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`.|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
### Menus
|
||||
|
@ -116,15 +128,20 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`colorScheme`|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.|
|
||||
|`colorScheme`|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `cherry`, `fire`, `ocean`, `sapphire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.|
|
||||
|`defaultThemeColor`|`"#FFFFFF"`|The original value (before any scripts modify it) to use for the `theme-color` meta tag. The meta tag will be changed based on the theme (`light` or `dark`) but it is useful for services that source the original value this tag to display an accent color (e.g. Discord)|
|
||||
|`defaultAppearance`|`"light"`|The default theme appearance, either `light` or `dark`.|
|
||||
|`autoSwitchAppearance`|`true`|Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`.|
|
||||
|`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.|
|
||||
|`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below.|
|
||||
|`mainSections`|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|
||||
|`enableImageLazyLoading`|`true`|Whether images should be marked for lazy loading by the browser.|
|
||||
|`enableImageWebp`|`true`|Whether images should be output in the more performant WebP format.|
|
||||
|`enableQuicklink`|`true`|Whether the [Quicklink](https://getquick.link/) library should be included in the site. Quicklink prefetches links based upon the user's viewport and leads to faster page navigation.|
|
||||
|`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|
||||
|`fingerprintAlgorithm`|`"sha256"`|String that indicates which hashing algorithm is used when fingerprinting assets. Valid options include `md5`, `sha256`, `sha384` and `sha512`.|
|
||||
|`header.layout`|`"basic"`|The layout of the page header and menu. Valid values are `basic`, `hamburger`, `hybrid` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/header/custom.html` file.|
|
||||
|`header.logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|
||||
|`header.logoDark`|_Not set_|As per the `header.logo` parameter, however this image is used whenever dark mode is active.|
|
||||
|`header.showTitle`|`true`|Whether the site title is displayed in the header.|
|
||||
|`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).|
|
||||
|`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).|
|
||||
|
@ -132,6 +149,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|`footer.showScrollToTop`|`true`|When set to `true` the scroll to top arrow is displayed.|
|
||||
|`homepage.layout`|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details.|
|
||||
|`homepage.showRecent`|`false`|Whether or not to display the recent articles list on the homepage.|
|
||||
|`homepage.recentLimit`|`5`|The maximum number of recent articles to display when `homepage.showRecent` is `true`.|
|
||||
|`article.showDate`|`true`|Whether or not article dates are displayed.|
|
||||
|`article.showDateUpdated`|`false`|Whether or not the dates articles were updated are displayed.|
|
||||
|`article.showAuthor`|`true`|Whether or not the author box is displayed in the article footer.|
|
||||
|
@ -148,7 +166,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|`article.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed.|
|
||||
|`article.showWordCount`|`false`|Whether or not article word counts are displayed.|
|
||||
|`article.showComments`|`false`|Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer.|
|
||||
|`article.sharingLinks`|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.|
|
||||
|`article.sharingLinks`|_Not set_|An array of sharing links to display at the end of each article. Valid options include `facebook`, `x-twitter`, `mastodon`, `pinterest`, `reddit`, `linkedin`, `email`, `telegram` and `line`. When not provided, or set to `false`, no links will be displayed.|
|
||||
|`list.showBreadcrumbs`|`false`|Whether or not breadcrumbs are displayed in the header on list pages.|
|
||||
|`list.showTableOfContents`|`false`|Whether or not the table of contents is displayed on list pages.|
|
||||
|`list.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed on list pages.|
|
||||
|
@ -158,7 +176,11 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|`sitemap.excludedKinds`|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|
||||
|`taxonomy.showTermCount`|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|
||||
|`fathomAnalytics.site`|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|
||||
|`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.|
|
||||
|`plausibleAnalytics.domain`|_Not set_|Enter the domain of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|
||||
|`plausibleAnalytics.event`|_Not set_|Plausible api event proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|
||||
|`plausibleAnalytics.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|
||||
|`umamiAnalytics.site`|_Not set_|The tracking code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|
||||
|`umamiAnalytics.region`|`eu`|Select the Umami Analytics server region to connect to. The value is a string that can be either `eu` or `us`.|
|
||||
|`verification.google`|_Not set_|The site verification string provided by Google to be included in the site metadata.|
|
||||
|`verification.bing`|_Not set_|The site verification string provided by Bing to be included in the site metadata.|
|
||||
|`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.|
|
||||
|
@ -169,4 +191,4 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|
||||
The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Congo.
|
||||
|
||||
Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to fucntion incorrectly and could result in unintended behaviour.
|
||||
Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to function incorrectly and could result in unintended behaviour.
|
|
@ -0,0 +1,186 @@
|
|||
---
|
||||
title: "基本配置"
|
||||
date: 2020-08-14
|
||||
draft: false
|
||||
description: "Congo中所有可使用的设定变量"
|
||||
summary: "探索一下 Congo 中所有的站点、语言和主题配置变量,以及如何用于自定义你的项目。"
|
||||
slug: "configuration"
|
||||
tags: ["config", "docs"]
|
||||
---
|
||||
|
||||
Congo 是一个高度可定制的主题,利用一些最新的 Hugo 特性来简化配置过程。
|
||||
|
||||
该主题附带了一个默认配置,让你可以快速启动一个基本的博客或静态网站。
|
||||
|
||||
> 主题附带的配置文件采用 TOML 格式,因为这是 Hugo 的默认语法。如果你愿意,可以将配置转换为 YAML 或 JSON。
|
||||
|
||||
每个文件中都有默认主题配置的文档,因此你可以自由调整设置以满足你的需求。
|
||||
|
||||
{{< alert >}}
|
||||
正如在[安装说明]({{< ref "/docs/installation#set-up-theme-configuration-files" >}})中所述,你应该通过修改 Hugo 项目的 `config/_default/` 文件夹中的文件来调整主题配置,并删除项目根目录中的 `config.toml` 文件。
|
||||
{{< /alert >}}
|
||||
|
||||
## 网站配置
|
||||
|
||||
Congo主题全面遵循标准 Hugo 配置变量,但是有一些特定的配置项需要进行设置以获得最佳体验。
|
||||
|
||||
网站配置通过 `config/_default/config.toml` 文件管理。下表概述了 Congo 主题所使用的所有设置。
|
||||
|
||||
请注意,此表中提供的变量名使用点表示法来简化 TOML 数据结构(即 `outputs.home` 指的是 `[outputs] home`)。
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|名称|默认值|描述|
|
||||
|---|---|---|
|
||||
|`theme`|`"congo"`|使用 Hugo 模块方法安装时,应删除此配置值。对于所有其他安装类型,必须将其设置为 `congo`,以使主题正常运行。|
|
||||
|`baseURL`|_未设置_|网站根目录的 URL。|
|
||||
|`defaultContentLanguage`|`"en"`|此值确定主题组件和内容的默认语言。有关受支持的语言代码,请参阅下面的[语言和国际化](#language-and-i18n)部分。|
|
||||
|`enableRobotsTXT`|`true`|启用时,在站点根目录将创建一个 `robots.txt` 文件,允许搜索引擎爬取整个站点。如果你更喜欢提供自己制作的 `robots.txt`,请设置为 `false` 并将文件放置在 `static` 目录中。为了完全控制,你可以提供一个[自定义布局]({{< ref "content-examples#custom-layouts" >}})来生成此文件。|
|
||||
|`paginate`|`10`|在文章列表中每页列出的文章数。|
|
||||
|`summaryLength`|`0`|在[front matter]({{< ref "front-matter" >}})中未提供摘要时,用于生成文章摘要的字数。值为 `0` 将使用第一句。当摘要被隐藏时,此值无效。|
|
||||
|`outputs.home`|`["HTML", "RSS", "JSON"]`|生成站点的输出格式。Congo 需要 HTML、RSS 和 JSON 才能使所有主题组件正常工作。|
|
||||
|`permalinks`|_未设置_|有关固定链接配置,请参阅[Hugo文档](https://gohugo.io/content-management/urls/#permalinks)。|
|
||||
|`taxonomies`|_未设置_|有关分类法配置,请参阅[组织内容]({{< ref "getting-started#organising-content" >}})部分。|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## 语言和国际化
|
||||
|
||||
Congo 针对完整的多语言网站进行了优化,并且主题assets中已经默认翻译成多种语言。语言配置允许您生成多个版本的内容,以为访问者提供在其母语中的定制体验。
|
||||
|
||||
该主题目前支持以下语言:
|
||||
|
||||
| 语言 | 代码 |
|
||||
| --------------------------------------- | ------- |
|
||||
| :gb: **英语(默认)** | `en` |
|
||||
| :egypt: 阿拉伯语 | `ar` |
|
||||
| :bangladesh: 孟加拉语 | `bn` |
|
||||
| :bulgaria: 保加利亚语 | `bg` |
|
||||
| :cn: 中文 - 简体(中国) | `zh-cn` |
|
||||
| :taiwan: 中文 - 繁体(台湾) | `zh-tw` |
|
||||
| :flag-cz: 捷克语 | `cs` |
|
||||
| :netherlands: 荷兰语 | `nl` |
|
||||
| :finland: 芬兰语 | `fi` |
|
||||
| :fr: 法语 | `fr` |
|
||||
| :de: 德语 | `de` |
|
||||
| :israel: 希伯来语 | `he` |
|
||||
| :hungary: 匈牙利语 | `hu` |
|
||||
| :indonesia: 印尼语 | `id` |
|
||||
| :it: 意大利语 | `it` |
|
||||
| :jp: 日语 | `ja` |
|
||||
| :poland: 波兰语 | `pl` |
|
||||
| :brazil: 葡萄牙语(巴西) | `pt-br` |
|
||||
| :portugal: 葡萄牙语(葡萄牙) | `pt-pt` |
|
||||
| :romania: 罗马尼亚语 | `ro` |
|
||||
| :ru: 俄语 | `ru` |
|
||||
| :slovakia: 斯洛伐克语 | `sk` |
|
||||
| :es: 西班牙语(西班牙) | `es` |
|
||||
| :tr: 土耳其语 | `tr` |
|
||||
| :ukraine: 乌克兰语 | `uk` |
|
||||
|
||||
默认翻译可以通过在 `i18n/[code].yaml` 中创建自定义文件来覆盖,其中包含翻译字符串。您还可以使用此方法添加新语言。如果您希望与社区分享新的翻译,请[Pull Request](https://github.com/jpanther/congo/pulls)。
|
||||
|
||||
### 配置
|
||||
|
||||
为了尽可能灵活,需要为网站上的每种语言创建一个语言配置文件。默认情况下,Congo 在 `config/_default/languages.en.toml` 中包含英语语言配置。
|
||||
|
||||
默认文件可以用作创建其他语言的模板,或者如果希望使用英语以外的语言编写网站,则可以重命名。只需使用格式 `languages.[language-code].toml` 命名文件。
|
||||
|
||||
{{< alert >}}
|
||||
**注意:** 确保[网站配置](#site-configuration)中的 `defaultContentLanguage` 参数与语言配置文件名中的语言代码匹配。
|
||||
{{< /alert >}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|名称|默认值|描述|
|
||||
|---|---|---|
|
||||
|`languageCode`|`"en"`|此文件的 Hugo 语言代码。它可以是顶级语言(即 `en`)或子变体(即 `en-AU`),并应与文件名中的语言代码匹配。|
|
||||
|`languageName`|`"English"`|语言的名称。|
|
||||
|`languageDirection`|`"ltr"`|这是否是 RTL 语言。设置为 `"rtl"` 以从右到左重新排列内容。Congo 完全支持同时使用 RTL 和 LTR 语言,并会动态调整到两者。|
|
||||
|`weight`|`1`|构建多语言站点时语言的顺序的权重。|
|
||||
|`title`|`"Congo"`|网站的标题。这将显示在站点标题和页脚中。|
|
||||
|`copyright`|_未设置_|包含要显示在站点页脚中的版权消息的 Markdown 字符串。如果未提供,则 Congo 将使用站点 `title` 自动生成版权字符串。|
|
||||
|`params.dateFormat`|`"2 January 2006"`|此语言中日期的格式。有关可接受格式,请参阅[Hugo文档](https://gohugo.io/functions/format/#gos-layout-string)。|
|
||||
|`params.mainSections`|_未设置_|显示在最新文章列表中的部分。如果未提供,则使用文章数最多的部分。|
|
||||
|`params.description`|_未设置_|网站描述。这将用于站点元数据。|
|
||||
|`author.name`|_未设置_|作者的姓名。这将显示在文章页脚和使用配置文件布局时在主页上。|
|
||||
|`author.image`|_未设置_|作者的图像文件路径。图像应为1:1的宽高比,并放置在站点的 `assets/` 文件夹中。|
|
||||
|`author.headline`|_未设置_|包含作者头衔的 Markdown 字符串。它将显示在主页上作者姓名下方。|
|
||||
|`author.bio`|_未设置_|包含作者简介的 Markdown 字符串。它将显示在文章页脚中。|
|
||||
|`author.links`|_未设置_|要显示在作者详细信息旁边的链接。配置文件包含可以取消注释以启用的示例链接。显示链接的顺序由它们在数组中出现的顺序确定。可以通过在 `assets/icons/` 中提供相应的 SVG 图标资产来添加自定义链接。|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
### 菜单
|
||||
|
||||
Congo 还支持语言特定的菜单配置。菜单配置文件遵循与语言文件相同的命名格式。只需在文件名中提供语言代码,以告诉 Hugo 该文件与哪种语言相关。
|
||||
|
||||
菜单配置文件的命名格式为 `menus.[language-code].toml`。始终确保菜单配置中使用的语言代码与语言配置相匹配。
|
||||
|
||||
[快速开始]({{< ref "getting-started#menus" >}})部分更详细地解释了此文件的结构。您还可以参考[Hugo 菜单文档](https://gohugo.io/content-management/menus/)以获取更多配置示例。
|
||||
|
||||
## 主题参数
|
||||
|
||||
Congo 提供了大量的配置参数,用于控制主题的功能。下表概述了 `config/_default/params.toml` 文件中的每个可用参数。
|
||||
|
||||
这里的许多文章默认值可以通过在 front matter 中指定来覆盖每篇文章的默认值。有关详细信息,请参阅[Front Matter]({{< ref "front-matter" >}})部分。
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|名称|默认值|描述|
|
||||
|---|---|---|
|
||||
|`colorScheme`|`"congo"`|要使用的主题颜色方案。有效值为 `congo`(默认)、`avocado`、`cherry`、`fire`、`ocean`、`sapphire` 和 `slate`。有关详细信息,请参阅[颜色方案]({{< ref "getting-started#颜色方案" >}})部分。|
|
||||
|`defaultThemeColor`|`"#FFFFFF`|`theme-color` meta 标签的原值(在脚本修改它之前)。meta 标签会根据所选主题而变化(`light` 或 `dark`),但是一些软件(例如 Discord)会使用该标签的原值来显示主题色。|
|
||||
|`defaultAppearance`|`"light"`|默认的主题外观,可以是 `light` 或 `dark`。|
|
||||
|`autoSwitchAppearance`|`true`|主题外观是否根据访问者的操作系统首选项自动切换。设置为 `false` 以始终使用 `defaultAppearance`。|
|
||||
|`enableSearch`|`false`|是否启用站内搜索。设置为 `true` 以启用搜索功能。请注意,搜索功能取决于 [站点配置](#site-configuration) 中的 `outputs.home` 设置正确。|
|
||||
|`enableCodeCopy`|`false`|是否启用 `<code>` 块的复制到剪贴板按钮。`highlight.noClasses` 参数必须设置为 `false`,以使代码复制正常工作。有关[其他配置文件](#other-configuration-files)的详细信息,请阅读下文。|
|
||||
|`enableImageLazyLoading`|`true`|是否将图像标记为浏览器的延迟加载。|
|
||||
|`robots`|_未设置_|指示机器人如何处理您的站点的字符串。如果设置,将在页面头部输出。有关有效值,请参阅[Google 文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)。|
|
||||
|`fingerprintAlgorithm`|`"sha256"`|指示在对assets进行指纹识别时使用的哈希算法。有效选项包括 `md5`、`sha256`、`sha384` 和 `sha512`。|
|
||||
|`header.layout`|`"basic"`|页面头部和菜单的布局。有效值为 `basic`、`hamburger`、`hybrid` 或 `custom`。当设置为 `custom` 时,您必须通过创建 `/layouts/partials/header/custom.html` 文件提供自己的布局。|
|
||||
|`header.logo`|_未设置_|站点徽标文件在 `assets/` 文件夹内的相对路径。徽标文件应以 2x 分辨率提供,并支持任何图像尺寸。|
|
||||
|`header.logoDark`|_未设置_|与 `header.logo` 参数相同,但此图像在启用深色模式时使用。|
|
||||
|`header.showTitle`|`true`|是否在页眉中显示站点标题。|
|
||||
|`footer.showCopyright`|`true`|是否在站点页脚显示版权字符串。请注意,可以使用[语言配置](#language-and-i18n)中的 `copyright` 参数自定义字符串。|
|
||||
|`footer.showThemeAttribution`|`true`|是否在站点页脚显示 "由...强力驱动" 的主题归属。如果选择禁用此消息,请考虑在站点的其他地方(例如关于页面)写上主题归属。|
|
||||
|`footer.showAppearanceSwitcher`|`false`|是否在站点页脚显示外观切换器。使用浏览器的本地存储来保留访问者的首选项。|
|
||||
|`footer.showScrollToTop`|`true`|设置为 `true` 时,将显示返回顶部箭头。|
|
||||
|`homepage.layout`|`"page"`|主页的布局。有效值为 `page`、`profile` 或 `custom`。当设置为 `custom` 时,您必须通过创建 `/layouts/partials/home/custom.html` 文件提供自己的布局。有关详细信息,请参阅[主页布局]({{< ref "homepage-layout" >}})部分。|
|
||||
|`homepage.showRecent`|`false`|是否在主页上显示最近的文章列表。|
|
||||
|`homepage.recentLimit`|`5`|当 `homepage.showRecent` 为 `true` 时,显示的最大最近文章数。|
|
||||
|`article.showDate`|`true`|是否显示文章日期。|
|
||||
|`article.showDateUpdated`|`false`|是否显示文章更新日期。|
|
||||
|`article.showAuthor`|`true`|是否在文章页脚显示作者框。|
|
||||
|`article.showBreadcrumbs`|`false`|是否在文章头部显示面包屑。|
|
||||
|`article.showDraftLabel`|`true`|在使用 `--buildDrafts` 构建站点时,是否显示文章旁边的草稿标签。|
|
||||
|`article.showEdit`|`false`|是否显示编辑文章内容的链接。|
|
||||
|`article.editURL`|_未设置_|当 `article.showEdit` 激活时,编辑链接的 URL。|
|
||||
|`article.editAppendPath`|`true`|当 `article.showEdit` 激活时,是否将当前文章的路径附加到设置为 `article.editURL` 的 URL。|
|
||||
|`article.showHeadingAnchors`|`true`|是否在文章内的标题旁边显示锚链接。|
|
||||
|`article.showPagination`|`true`|是否在文章页脚显示下一篇/上一篇文章的链接。|
|
||||
|`article.invertPagination`|`false`|是否翻转下一篇/上一篇文章链接的方向。|
|
||||
|`article.showReadingTime`|`true`|是否显示文章阅读时间。|
|
||||
|`article.showTableOfContents`|`false`|是否在文章上显示目录。|
|
||||
|`article.showTaxonomies`|`false`|是否在与文章相关的分类法上显示。|
|
||||
|`article.showWordCount`|`false`|是否显示文章字数。|
|
||||
|`article.showComments`|`false`|是否在文章页脚之后包含[comments partial]({{< ref "partials#comments" >}})。|
|
||||
|`article.sharingLinks`|_未设置_|要在每篇文章末尾显示的分享链接。如果未提供或设置为 `false`,则不会显示任何链接。|
|
||||
|`list.showBreadcrumbs`|`false`|是否在列表页面的页眉中显示面包屑。|
|
||||
|`list.showTableOfContents`|`false`|是否在列表页面上显示目录。|
|
||||
|`list.showTaxonomies`|`false`|是否在列表页面上显示与此文章相关的分类法。|
|
||||
|`list.showSummary`|`false`|是否在列表页面上显示文章摘要。如果在[Front Matter]({{< ref "front-matter" >}})中未提供摘要,则将使用[站点配置](#site-configuration)中的 `summaryLength` 参数自动生成一个摘要。|
|
||||
|`list.groupByYear`|`true`|是否在列表页面上按年份对文章进行分组。|
|
||||
|`list.paginationWidth`|`1`|在需要截断页面列表时,输出当前页面两侧的分页链接数。宽度为 `1` 将在需要截断列表时输出当前页面两侧的一个链接。当前、第一个和最后一个页面的链接始终会显示,并且是在此值之外的链接。|
|
||||
|`sitemap.excludedKinds`|`["taxonomy", "term"]`|应从生成的 `/sitemap.xml` 文件中排除的内容类型。有关可接受的值,请参阅[Hugo 文档](https://gohugo.io/templates/section-templates/#page-kinds)。|
|
||||
|`taxonomy.showTermCount`|`true`|是否在分类法列表上显示分类术语内文章的数量。|
|
||||
|`fathomAnalytics.site`|_未设置_|由 Fathom Analytics 为网站生成的站点代码。有关详细信息,请参阅[分析文档]({{< ref "partials#analytics" >}})。|
|
||||
|`fathomAnalytics.domain`|_未设置_|如果在 Fathom Analytics 中使用自定义域,请在此提供以从自定义域提供 `script.js`。|
|
||||
|`plausibleAnalytics.domain`|_未设置_|输入要跟踪的网站的域。有关详细信息,请参阅[分析文档]({{< ref "partials#analytics" >}})。|
|
||||
|`plausibleAnalytics.event`|_未设置_|可寻址 Plausible api 事件的 URL。有关详细信息,请参阅[分析文档]({{< ref "partials#analytics" >}})。|
|
||||
|`plausibleAnalytics.script`|_未设置_|可寻址 Plausible 分析脚本的 URL。有关详细信息,请参阅[分析文档]({{< ref "partials#analytics" >}})。|
|
||||
|`verification.google`|_未设置_|由 Google 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
|`verification.bing`|_未设置_|由 Bing 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
|`verification.pinterest`|_未设置_|由 Pinterest 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
|`verification.yandex`|_未设置_|由 Yandex 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
|
||||
## 其他配置文件
|
||||
|
||||
主题还包括一个 `markup.toml` 配置文件。该文件包含一些重要的参数,确保 Hugo 正确配置以生成使用 Congo 构建的站点。
|
||||
|
||||
始终确保此文件存在于配置目录中,并设置所需的值。否则,可能导致某些功能不正确地运行,并可能导致意外的行为。
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,317 @@
|
|||
---
|
||||
title: "コンテンツの例"
|
||||
date: 2020-08-09
|
||||
draft: false
|
||||
description: "コンテンツがどのように作成され、構成されるべきかを示すいくつかの例"
|
||||
summary: "コンテンツがどのように構成されるべきかを示すいくつかの例です。"
|
||||
slug: "content-examples"
|
||||
tags: ["content", "example"]
|
||||
---
|
||||
|
||||
ドキュメントを順番に読んできたのなら、Congoで利用可能な機能と設定についてはすべて知っているはずです。このページでは、それらをまとめて、あなたがHugoプロジェクトで使いたくなるような例をいくつか紹介します。
|
||||
|
||||
{{< alert >}}
|
||||
**ヒント:** もしあなたがHugoに慣れていないのであれば、[Hugo docs](https://gohugo.io/content-management/page-bundles/)をチェックし、ページバンドルとリソースの概念について学んでください。
|
||||
{{< /alert >}}
|
||||
|
||||
このページで紹介する例はさまざまなシナリオに適用できますが、個々のプロジェクトで特定のコンテンツ項目をフォーマットする方法について、いくつかのアイデアが得られることを願っています。
|
||||
|
||||
## ブランチページ
|
||||
|
||||
Hugoのブランチページバンドルは、ホームページ、セクションリスト、Taxonomyページのような項目をカバーしています。ブランチバンドルについて覚えておくべき重要なことは、このコンテンツタイプのファイル名は **`_index.md`** であるということです。
|
||||
|
||||
Congoはブランチページで指定されたフロントマターを尊重し、デフォルト設定を上書きします。例えば、ブランチページで `title` パラメーターを設定すると、ページタイトルを上書きすることができます。
|
||||
|
||||
### ホームページ
|
||||
|
||||
| | |
|
||||
| ------------ | -------------------- |
|
||||
| **Layout:** | `layouts/index.html` |
|
||||
| **Content:** | `content/_index.md` |
|
||||
|
||||
Congoのホームページは、ホームページレイアウト設定パラメーターによって包括的なデザインが制御されるという点で特別です。これについては[ホームページレイアウト]({{< ref "homepage-layout" >}})セクションで詳しく説明しています。
|
||||
|
||||
このページにカスタムコンテンツを追加したい場合は、 `content/_index.md` ファイルを作成するだけです。このファイルにあるものはすべてホームページに含まれます。
|
||||
|
||||
**例:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Congoへようこそ!"
|
||||
description: "これはホームページにコンテンツを追加するデモです"
|
||||
---
|
||||
私のウェブサイトへようこそ!立ち寄ってくれて本当に嬉しいです。
|
||||
```
|
||||
|
||||
_この例では、カスタムタイトルを設定し、ページ本文にいくつかの追加テキストを追加します。ショートコード、画像、リンクを含め、どのようなMarkdownフォーマットのテキストでも構いません。_
|
||||
|
||||
### リストページ
|
||||
|
||||
| | |
|
||||
| ------------ | ---------------------------- |
|
||||
| **Layout:** | `layouts/_default/list.html` |
|
||||
| **Content:** | `content/../_index.md` |
|
||||
|
||||
リストページは、セクション内のすべてのページをグループ化し、訪問者が各ページに到達するための方法を提供します。ブログやポートフォリオは、記事やプロジェクトをグループ化したリストページの例です。
|
||||
|
||||
リストページの作成は、 `content` 内にサブディレクトリを作成するのと同じくらい簡単です。例えば、"Projects"セクションを作成するには、 `content/projects/` を作成します。そして、プロジェクトごとにMarkdownファイルを作成します。
|
||||
|
||||
デフォルトではリストページが生成されますが、コンテンツをカスタマイズするために、この新しいディレクトリに`_index.md`ページも作成してください。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── projects
|
||||
├── _index.md # /projects
|
||||
├── first-project.md # /projects/first-project
|
||||
└── another-project
|
||||
├── index.md # /projects/another-project
|
||||
└── project.jpg
|
||||
```
|
||||
|
||||
Hugoは、 `content/projects` 内のページのURLを適宜生成します。
|
||||
|
||||
ホームページと同じように、 `_index.md` ファイルのコンテンツは生成されたリストインデックスに出力されます。Congoはこのセクションのすべてのページをリストします。
|
||||
|
||||
**例:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Projects"
|
||||
description: "私のプロジェクトについて"
|
||||
cascade:
|
||||
showReadingTime: false
|
||||
---
|
||||
このセクションには、私が現在取り組んでいるすべてのプロジェクトが含まれています。
|
||||
```
|
||||
|
||||
_この例では、特別な `cascade` パラメーターを使って、このセクション内のサブページの読書時間を非表示にしています。こうすることで、どのプロジェクトページでも読書時間が表示されなくなります。これは、個々のページにデフォルトのテーマパラメーターを含めなくても、セクション全体のデフォルトのテーマパラメーターを上書きすることができる素晴らしい方法です。_
|
||||
|
||||
このサイトの[サンプル]({{< ref "samples" >}})はリストページの一例です。
|
||||
|
||||
### Taxonomyページ
|
||||
|
||||
| | |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **List layout:** | `layouts/_default/taxonomy.html` |
|
||||
| **Term layout:** | `layouts/_default/term.html` |
|
||||
| **Content:** | `content/../_index.md` |
|
||||
|
||||
Taxonomyページには、TaxonomyのリストとTaxonomyのTermという2つの形式があります。リストはTaxonomy内の各Termのリストを表示し、Termは指定されたTermに関連するページのリストを表示します。
|
||||
|
||||
Termは少し混乱しやすいので、`animals` というTaxonomyを使って例を探ってみましょう。
|
||||
|
||||
まず、HugoでTaxonomyを使うには設定が必要です。 `config/_default/taxonomies.toml` に設定ファイルを作成し、Taxonomyの名前を定義します。
|
||||
|
||||
```toml
|
||||
# config/_default/taxonomies.toml
|
||||
|
||||
animal = "animals"
|
||||
```
|
||||
|
||||
HugoはTaxonomyを単数形と複数形でリストすることを想定しているので、単数形の `animal` と複数形の `animals` を追加して、例のTaxonomyを作成します。
|
||||
|
||||
これで `animals` Taxonomyが存在することになったので、個々のコンテンツに追加する必要があります。フロントマターに挿入するだけです:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "ライオンの巣へ"
|
||||
description: "今週はライオンについて学びます"
|
||||
animals: ["lion", "cat"]
|
||||
---
|
||||
```
|
||||
|
||||
これで `animals` Taxonomyの中に `lion` と `cat` というTermができたことになります。
|
||||
|
||||
この時点では明らかではありませんが、Hugoはこの新しいTaxonomyリストとTermのページを生成します。デフォルトでは、リストは `/animals/` に、Termページは `/animals/lion/` と `/animals/cat/` になります。
|
||||
|
||||
リストページはTaxonomyに含まれるすべてのTermをリストアップします。この例では、 `/animals/` に移動すると、 `lion` と `cat` のリンクがあるページが表示され、訪問者はそれぞれのTermページに移動できます。
|
||||
|
||||
TermページはそのTermが含まれるすべてのページをリストアップします。これらのTermリストは基本的に通常の[リストページ](#リストページ)とほとんど同じように動作します。
|
||||
|
||||
Taxonomyページにカスタムコンテンツを追加するには、Taxonomy名をサブディレクトリとして、 `content` 内に `_index.md` ファイルを作成するだけです。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── animals
|
||||
├── _index.md # /animals
|
||||
└── lion
|
||||
└── _index.md # /animals/lion
|
||||
```
|
||||
|
||||
これらのコンテンツファイルにあるものは生成されたTaxonomyページに配置されます。他のコンテンツと同じように、フロントマターはデフォルトを上書きするために使うことができます。このように、 `lion` という名前のタグがあっても、 `title` を"Lion"に上書きすることができます。
|
||||
|
||||
これが実際にどのように見えるかは、このサイトの[Tags]({{< ref "tags" >}})をチェックしてください。
|
||||
|
||||
## リーフページ
|
||||
|
||||
| | |
|
||||
| ------------------------- | ------------------------------- |
|
||||
| **Layout:** | `layouts/_default/single.html` |
|
||||
| **Content (standalone):** | `content/../page-name.md` |
|
||||
| **Content (bundled):** | `content/../page-name/index.md` |
|
||||
|
||||
Hugoのリーフページは基本的に標準的なコンテンツページです。サブページを含まないページとして定義されます。例えば、アバウトページや、ウェブサイトのブログセクションにある個々のブログ記事などです。
|
||||
|
||||
リーフページについて覚えておくべき最も重要なことは、ブランチページとは異なり、リーフページはアンダースコアなしで `index.md` と名前をつけるべきということです。リーフページはまた、セクションのトップレベルにまとめて一意な名前をつけることができるという点で特別です。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── blog
|
||||
├── first-post.md # /blog/first-post
|
||||
├── second-post.md # /blog/second-post
|
||||
└── third-post
|
||||
├── index.md # /blog/third-post
|
||||
└── image.jpg
|
||||
```
|
||||
|
||||
画像などをページに含める場合、ページバンドルを使用する必要があります。ページバンドルは `index.md` ファイルを含むサブディレクトリを使って作成します。ショートコードやその他のテーマロジックの多くは、リソースがページと一緒にバンドルされていることを前提としているので、コンテンツと一緒に独自のディレクトリにグループ化することが重要です。
|
||||
|
||||
**例:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "初めてのブログ投稿"
|
||||
date: 2022-01-25
|
||||
description: "私のブログへようこそ!"
|
||||
summary: "私について、そして私がなぜこのブログを始めたのか、もっと知ってください。"
|
||||
tags: ["welcome", "new", "about", "first"]
|
||||
---
|
||||
_これ_ が私のブログ記事の内容です。
|
||||
```
|
||||
|
||||
リーフページには様々な[フロントマター]({{< ref "front-matter" >}})パラメーターがあり、それらを使って表示方法をカスタマイズすることができます。
|
||||
|
||||
### 外部リンク
|
||||
|
||||
Congoには、外部ページへのリンクを記事リストに表示できる特別な機能があります。これは、Mediumのようなサードパーティのウェブサイトや研究論文にコンテンツがあり、Hugoのサイトにコンテンツを複製することなくリンクを張りたい場合に便利です。
|
||||
|
||||
外部リンク記事を作成するには、特別なフロントマターを設定する必要があります:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "私のMediumの記事"
|
||||
date: 2022-01-25
|
||||
externalUrl: "https://medium.com/"
|
||||
summary: "私はMediumに記事を書きました。"
|
||||
showReadingTime: false
|
||||
_build:
|
||||
render: "false"
|
||||
list: "local"
|
||||
---
|
||||
```
|
||||
|
||||
`title` や `summary` のような通常のフロントマターパラメーターとともに、 `externalUrl` パラメーターはこの記事が普通の記事ではないことを伝えるために使われます。ここで指定されたURLは、訪問者がこの記事を選択したときに誘導される場所になります。
|
||||
|
||||
さらに、このコンテンツの通常のページが生成されないように(外部URLにリンクしているので、ページを生成する意味がありません!)、Hugoの特別なフロントマターパラメーターである `_build` を使用しています。
|
||||
|
||||
テーマには、このような外部リンク記事を簡単に生成するためのアーキタイプが含まれています。新しいコンテンツを作るときに `-k external` を指定するだけです。
|
||||
|
||||
```shell
|
||||
hugo new -k external posts/my-post.md
|
||||
```
|
||||
|
||||
### シンプルページ
|
||||
|
||||
| | |
|
||||
| ----------------- | ------------------------------ |
|
||||
| **Layout:** | `layouts/_default/simple.html` |
|
||||
| **Front Matter:** | `layout: "simple"` |
|
||||
|
||||
Congoにはシンプルなページのための特別なレイアウトも含まれています。シンプル・レイアウトは全幅のテンプレートで、特別なテーマ機能なしにMarkdownコンテンツをページに配置するだけです。
|
||||
|
||||
シンプルレイアウトで利用できる唯一の機能はパンくずリストと共有リンクです。これらの動作は通常のページと同様に[フロントマター]({{< ref "front-matter" >}})パラメーターを使って制御することができます。
|
||||
|
||||
特定のページでシンプルレイアウトを有効にするには、 `layout` フロントマター変数に `"simple"` という値を追加します:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "ランディングページ"
|
||||
date: 2022-03-08
|
||||
layout: "simple"
|
||||
---
|
||||
このページのコンテンツは全幅になりました。
|
||||
```
|
||||
|
||||
## カスタムレイアウト
|
||||
|
||||
Hugoの利点のひとつは、サイト全体や個々のセクション、ページのカスタムレイアウトを簡単に作成できることです。
|
||||
|
||||
レイアウトは通常のHugoのテンプレート規則に従います。詳細は[Hugo公式ドキュメント](https://gohugo.io/templates/introduction/)をご覧ください。
|
||||
|
||||
### デフォルトレイアウトのオーバーライド
|
||||
|
||||
上で説明した各コンテンツタイプには、各タイプのページを生成するために使用されるレイアウトファイルが記載されています。このファイルをローカルプロジェクトに作成すると、テーマテンプレートを上書きするので、ウェブサイトのデフォルトスタイルをカスタマイズするために使用することができます。
|
||||
|
||||
例えば、 `layouts/_default/single.html` ファイルを作成すれば、リーフページのレイアウトを完全にカスタマイズすることができます。
|
||||
|
||||
### カスタムセクションレイアウト
|
||||
|
||||
また、個々のコンテンツセクションのカスタムレイアウトを作成するのも簡単です。これは、特定のコンテンツを特定のスタイルで一覧表示するセクションを作りたい場合に便利です。
|
||||
|
||||
特殊なレイアウトでプロジェクトを一覧表示するカスタム「Projects」ページを作成する例を見てみましょう。
|
||||
|
||||
これを行うには、通常のHugoコンテンツルールを使用してコンテンツを構成し、プロジェクト用のセクションを作成します。さらに、コンテンツと同じディレクトリ名を使い、 `list.html` ファイルを追加して、プロジェクトセクション用の新しいレイアウトを作成します。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
│ └── projects
|
||||
│ ├── _index.md
|
||||
│ ├── first-project.md
|
||||
│ └── second-project.md
|
||||
└── layouts
|
||||
└── projects
|
||||
└── list.html
|
||||
```
|
||||
|
||||
この `list.html` ファイルはデフォルトのリストテンプレートをオーバーライドします。このファイルを見る前に、まず個々のプロジェクトファイルを見てみましょう。
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Congo"
|
||||
date: 2021-08-11
|
||||
icon: "github"
|
||||
description: "Tailwind CSSで作られたHugoのテーマ"
|
||||
topics: ["Hugo", "Web", "Tailwind"]
|
||||
externalUrl: "https://github.com/jpanther/congo/"
|
||||
---
|
||||
```
|
||||
|
||||
_この例では、各プロジェクトにメタデータを割り当て、リストテンプレートで使用できるようにしています。ページのコンテンツはありませんが、それを含めることを妨げるものも何もありません。あなたのカスタムテンプレートなのですから!_
|
||||
|
||||
プロジェクトが定義されたので、各プロジェクトの詳細を出力するリストテンプレートを作成することができます。
|
||||
|
||||
```go
|
||||
{{ define "main" }}
|
||||
<section class="mt-8">
|
||||
{{ range .Pages }}
|
||||
<article class="pb-6">
|
||||
<a class="flex" href="{{ .Params.externalUrl }}">
|
||||
<div class="mr-3 text-3xl text-neutral-300">
|
||||
<span class="relative inline-block align-text-bottom">
|
||||
{{ partial "icon.html" .Params.icon }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="flex text-xl font-semibold">
|
||||
{{ .Title }}
|
||||
</h3>
|
||||
<p class="text-sm text-neutral-400">
|
||||
{{ .Description }}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
これは非常にわかりやすい例ですが、このセクションの各ページ(つまり各プロジェクト)を順に見ていき、各プロジェクトへのHTMLリンクをアイコンと一緒に出力していることがわかります。各プロジェクトのフロントマターのメタデータは、どの情報を表示するかを決定するために使われます。
|
||||
|
||||
関連するスタイルとクラスが利用可能であることを確認する必要があり、Tailwind CSSを再コンパイルする必要があるかもしれないことを覚えておいてください。これについては、[高度なカスタマイズ]({{< ref "advanced-customisation" >}})セクションで詳しく説明します。
|
||||
|
||||
このようなカスタムテンプレートを作成する場合、デフォルトのCongoテンプレートがどのように動作するかを見て、それをガイドとして使用するのが最も簡単です。[Hugo docs](https://gohugo.io/templates/introduction/)はテンプレートの作成についてもっと学ぶための素晴らしいリソースです。
|
|
@ -2,7 +2,8 @@
|
|||
title: "Content Examples"
|
||||
date: 2020-08-09
|
||||
draft: false
|
||||
description: "All the partials available in Congo."
|
||||
description: "Some examples that demonstrate how content should be created and structured."
|
||||
summary: "It's time to bring everything together with some examples that demonstrate how content should be created and structured."
|
||||
slug: "content-examples"
|
||||
tags: ["content", "example"]
|
||||
---
|
|
@ -0,0 +1,316 @@
|
|||
---
|
||||
title: "内容示例"
|
||||
date: 2020-08-09
|
||||
draft: false
|
||||
description: "一些演示如何创建和组织内容的示例。"
|
||||
summary: "是时候通过一些演示示例将所有内容整合起来,展示如何创建和组织内容了。"
|
||||
slug: "content-examples"
|
||||
tags: ["content", "example"]
|
||||
---
|
||||
|
||||
如果你按顺序阅读文档,现在应该对 Congo 中提供的所有功能和配置有所了解。本页面旨在将所有内容整合在一起,并提供一些你可能想在 Hugo 项目中使用的实际示例。
|
||||
|
||||
{{< alert >}}
|
||||
**提示:** 如果你是 Hugo 新手,请务必查阅[官方文档](https://gohugo.io/content-management/page-bundles/),了解有关page bundles和资源概念的更多信息。
|
||||
{{< /alert >}}
|
||||
|
||||
本页面的示例可以根据不同的情境进行调整,但希望能为你提供一些关于如何处理特定内容项格式的思路,以适应你个人项目的需要。
|
||||
|
||||
## 分支页面
|
||||
|
||||
在 Hugo 中,分支页面包括主页、部分列表和分类页面等。需要记住的一点是,此类内容的文件名是 **`_index.md`**。
|
||||
|
||||
Congo 将遵循分支页面中指定的 front matter 参数,这些参数将覆盖该特定页面的默认设置。例如,在分支页面中设置 `title` 参数将允许覆盖页面标题。
|
||||
|
||||
### 主页
|
||||
|
||||
| | |
|
||||
| ------------ | -------------------- |
|
||||
| **布局:** | `layouts/index.html` |
|
||||
| **内容:** | `content/_index.md` |
|
||||
|
||||
在 Congo 中,主页是特殊的,因为其总体设计由主页布局配置参数控制。你可以在 [主页布局]({{< ref "homepage-layout" >}}) 部分了解更多信息。
|
||||
|
||||
如果你想在这个页面上添加自定义内容,只需创建一个 `content/_index.md` 文件。然后,此文件中的任何内容都将包含在你的主页中。
|
||||
|
||||
**示例:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "欢迎来到 Congo!"
|
||||
description: "这是向主页添加内容的演示。"
|
||||
---
|
||||
欢迎来到我的网站!我真的很高兴你停留在这里。
|
||||
```
|
||||
|
||||
_此示例设置了自定义标题,并在页面正文中添加了一些额外的文本。任何 Markdown 格式的文本都是可以接受的,包括短代码、图片和链接。_
|
||||
|
||||
### 列表页面
|
||||
|
||||
| | |
|
||||
| ------------ | ---------------------------- |
|
||||
| **布局:** | `layouts/_default/list.html` |
|
||||
| **内容:** | `content/../_index.md` |
|
||||
|
||||
列表页面将其内部的所有页面分组到一个部分,并提供一种让访问者访问每个页面的方式。博客或投影集是列表页面的示例,因为它们将帖子或项目分组在一起。
|
||||
|
||||
创建列表页面就像在 content 文件夹中创建一个子目录一样简单。例如,要创建一个 "Projects" 部分,你将创建 `content/projects/`。然后为你的每个项目创建一个 Markdown 文件。
|
||||
|
||||
列表页面将默认生成,但为了自定义内容,你还应该在这个新目录中创建一个 `_index.md` 页面。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── projects
|
||||
├── _index.md # /projects
|
||||
├── first-project.md # /projects/first-project
|
||||
└── another-project
|
||||
├── index.md # /projects/another-project
|
||||
└── project.jpg
|
||||
```
|
||||
|
||||
Hugo 将相应地为项目文件夹中的页面生成 URL。
|
||||
|
||||
就像主页一样,`_index.md` 文件中的内容将输出到生成的列表索引中。Congo 然后会在内容下方列出此部分中的任何页面。
|
||||
|
||||
**示例:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "项目"
|
||||
description: "了解我的一些项目。"
|
||||
cascade:
|
||||
showReadingTime: false
|
||||
---
|
||||
这个部分包含所有我的当前项目。
|
||||
```
|
||||
|
||||
_在此示例中,使用了特殊的 `cascade` 参数来隐藏此部分中任何子页面上的阅读时间。通过这样做,任何项目页面将不显示其阅读时间。这是在整个部分中覆盖默认主题参数的好方法,而无需在每个单独页面中包含它们。_
|
||||
|
||||
此站点的 [样本部分]({{< ref "samples" >}}) 是列表页面的示例。
|
||||
|
||||
### 分类页面
|
||||
|
||||
| | |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **列表布局:** | `layouts/_default/taxonomy.html` |
|
||||
| **术语布局:** | `layouts/_default/term.html` |
|
||||
| **内容:** | `content/../_index.md` |
|
||||
|
||||
分类页面有两种形式 - 分类列表和分类术语。列表显示给定分类中每个术语的列表,而术语显示与给定术语相关的页面列表。
|
||||
|
||||
术语可能会有点混淆,所以让我们通过一个使用名为 `animals` 的分类的示例来探讨一下。
|
||||
|
||||
首先,在 Hugo 中使用分类,必须进行配置。这是通过在 `config/_default/taxonomies.toml` 创建配置文件并定义分类名称来完成的。
|
||||
|
||||
```toml
|
||||
# config/_default/taxonomies.toml
|
||||
|
||||
animal = "animals"
|
||||
```
|
||||
|
||||
Hugo 期望以它们的单数和复数形式列出分类,因此我们添加了单数 `animal` 等于复数 `animals` 来创建我们的示例分类。
|
||||
|
||||
现在我们的 `animals` 分类存在了,它需要被添加到各个内容项中。只需将其插入到前置元数据中:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Into the Lion's Den"
|
||||
description: "This week we're learning about lions."
|
||||
animals: ["lion", "cat"]
|
||||
---
|
||||
```
|
||||
|
||||
这样就在我们的 `animals` 分类中创建了两个 _术语_ - `lion` 和 `cat`。
|
||||
|
||||
虽然此时并不明显,但 Hugo 现在将为这个新的分类生成列表和术语页面。默认情况下,可以通过 `/animals/` 访问列表,而术语页面可以在 `/animals/lion/` 和 `/animals/cat/` 找到。
|
||||
|
||||
列表页面将列出分类中包含的所有术语。在这个例子中,导航到 `/animals/` 将显示一个页面,其中包含指向各个术语页面的链接,如 "lion" 和 "cat"。
|
||||
|
||||
术语页面将列出该术语中包含的所有页面。这些术语列表本质上与普通的 [列表页面](#list-pages) 相同,并以相似的方式运作。
|
||||
|
||||
要向分类页面添加自定义内容,只需在使用分类名称作为子目录名的内容文件夹中创建 `_index.md` 文件。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── animals
|
||||
├── _index.md # /animals
|
||||
└── lion
|
||||
└── _index.md # /animals/lion
|
||||
```
|
||||
|
||||
这些内容文件中的任何内容都将放置到生成的分类页面上。与其他内容一样,前置元数据变量可用于覆盖默认设置。通过这种方式,您可以拥有一个名为 `lion` 的标签,但可以覆盖 `title` 为 "Lion"。
|
||||
|
||||
要了解实际效果,请查看此站点上的 [标签分类列表]({{< ref "tags" >}})。
|
||||
|
||||
## 单页
|
||||
|
||||
| | |
|
||||
| ------------------------- | ------------------------------- |
|
||||
| **布局:** | `layouts/_default/single.html` |
|
||||
| **内容(独立):** | `content/../page-name.md` |
|
||||
| **内容(打包):** | `content/../page-name/index.md` |
|
||||
|
||||
Hugo 中的单页基本上是标准内容页面。它们被定义为不包含任何子页面的页面。这可能是关于页面,或者是博客部分中的单个博客文章。
|
||||
|
||||
关于单页的最重要的事情是,与分支页面不同,单页应该命名为 `index.md`,**没有**下划线。单页还很特殊,因为它们可以在部分的顶层进行分组,并以独特的名称命名。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── blog
|
||||
├── first-post.md # /blog/first-post
|
||||
├── second-post.md # /blog/second-post
|
||||
└── third-post
|
||||
├── index.md # /blog/third-post
|
||||
└── image.jpg
|
||||
```
|
||||
|
||||
在页面中包含资产,比如图片,应该使用页面包。页面包使用带有 `index.md` 文件的子目录创建。将资产与内容一起分组到自己的目录中是重要的,因为许多 shortcodes 和其他主题逻辑假定资源与页面一起打包。
|
||||
|
||||
**示例:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "我的第一篇博客文章"
|
||||
date: 2022-01-25
|
||||
description: "欢迎来到我的博客!"
|
||||
summary: "了解更多关于我以及我为什么开始写这个博客的信息。"
|
||||
tags: ["欢迎", "新", "关于", "第一篇"]
|
||||
---
|
||||
_这_ 是我的博客文章的内容。
|
||||
```
|
||||
|
||||
单页有各种可以用于自定义显示方式的 [前置元数据]({{< ref "front-matter" >}}) 参数。
|
||||
|
||||
### 外部链接
|
||||
|
||||
Congo 具有一个特殊功能,允许外部页面的链接出现在文章列表中。如果您在第三方网站(如 Medium)上有内容,或者有研究论文希望链接,而不想在 Hugo 站点中复制内容,这将非常有用。
|
||||
|
||||
要创建外部链接文章,需要设置一些特殊的前置元数据:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "我的 Medium 文章"
|
||||
date: 2022-01-25
|
||||
externalUrl: "https://medium.com/"
|
||||
summary: "我在 Medium 上写了一篇文章。"
|
||||
showReadingTime: false
|
||||
_build:
|
||||
render: "false"
|
||||
list: "local"
|
||||
---
|
||||
```
|
||||
|
||||
除了正常的前置元数据参数如 `title` 和 `summary` 外,`externalUrl` 参数用于告诉 Congo 这不是一篇普通文章。此处提供的 URL 将是访问者选择该文章时的目标链接。
|
||||
|
||||
此外,我们使用了一个特殊的 Hugo 前置元数据参数 `_build` 来阻止生成此内容的正常页面 - 因为我们正在链接到外部 URL,生成正常页面没有意义!
|
||||
|
||||
主题包含一个原型,使生成这些外部链接文章变得简单。只需在创建新内容时指定 `-k external`。
|
||||
|
||||
```shell
|
||||
hugo new -k external posts/my-post.md
|
||||
```
|
||||
|
||||
### 简单页面
|
||||
|
||||
| | |
|
||||
| ----------------- | ------------------------------ |
|
||||
| **Layout:** | `layouts/_default/simple.html` |
|
||||
| **Front Matter:** | `layout: "simple"` |
|
||||
|
||||
Congo 还包括一个专门用于简单页面的特殊布局。简单布局是一个全宽度的模板,只需将 Markdown 内容放入页面,而不包含任何特殊的主题功能。
|
||||
|
||||
简单布局中唯一可用的功能是面包屑和分享链接。但是,这些的行为仍然可以通过使用正常页面 [前置元数据]({{< ref "front-matter" >}}) 变量进行控制。
|
||||
|
||||
要在特定页面上启用简单布局,请添加 `layout` 前置元数据变量,其值为 `"simple"`:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "我的落地页"
|
||||
date: 2022-03-08
|
||||
layout: "simple"
|
||||
---
|
||||
此页面内容现在是全宽度的。
|
||||
|
||||
## 自定义布局
|
||||
|
||||
Hugo 的一个好处是它使得为整个站点、单独的部分或页面创建自定义布局变得很容易。
|
||||
|
||||
布局遵循所有常规的 Hugo 模板规则,更多信息请参阅[官方 Hugo 文档](https://gohugo.io/templates/introduction/)。
|
||||
|
||||
### 覆盖默认布局
|
||||
|
||||
上面讨论的每种内容类型都列出了用于生成每种页面类型的布局文件。如果在本地项目中创建了此文件,它将覆盖主题模板,因此可用于自定义网站的默认样式。
|
||||
|
||||
例如,创建一个 `layouts/_default/single.html` 文件将允许完全自定义叶页面的布局。
|
||||
|
||||
### 自定义部分布局
|
||||
|
||||
为个别内容部分创建自定义布局也很简单。当您想要使用特定样式列出某种类型内容的部分时,这将非常有用。
|
||||
|
||||
让我们通过一个示例来创建一个自定义的“项目”页面,该页面使用特殊布局列出项目。
|
||||
|
||||
为了做到这一点,使用常规的 Hugo 内容规则构建您的内容,并为您的项目创建一个新部分。此外,通过使用与内容相同的目录名称并添加一个 `list.html` 文件来为项目部分创建一个新布局。
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
│ └── projects
|
||||
│ ├── _index.md
|
||||
│ ├── first-project.md
|
||||
│ └── second-project.md
|
||||
└── layouts
|
||||
└── projects
|
||||
└── list.html
|
||||
```
|
||||
|
||||
这个 `list.html` 文件现在将覆盖默认的列表模板,但仅适用于 `projects` 部分。在我们查看这个文件之前,让我们首先查看个别项目文件。
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Congo"
|
||||
date: 2021-08-11
|
||||
icon: "github"
|
||||
description: "A theme for Hugo built with Tailwind CSS."
|
||||
topics: ["Hugo", "Web", "Tailwind"]
|
||||
externalUrl: "https://github.com/jpanther/congo/"
|
||||
---
|
||||
```
|
||||
|
||||
_在这个示例中,我们为每个项目分配了一些元数据,然后我们可以在我们的列表模板中使用这些元数据。这里没有页面内容,但没有阻止您包含它。毕竟这是您自己的自定义模板!_
|
||||
|
||||
有了定义的项目,现在我们可以创建一个列表模板,输出每个项目的详细信息。
|
||||
|
||||
```go
|
||||
{{ define "main" }}
|
||||
<section class="mt-8">
|
||||
{{ range .Pages }}
|
||||
<article class="pb-6">
|
||||
<a class="flex" href="{{ .Params.externalUrl }}">
|
||||
<div class="mr-3 text-3xl text-neutral-300">
|
||||
<span class="relative inline-block align-text-bottom">
|
||||
{{ partial "icon.html" .Params.icon }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="flex text-xl font-semibold">
|
||||
{{ .Title }}
|
||||
</h3>
|
||||
<p class="text-sm text-neutral-400">
|
||||
{{ .Description }}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
虽然这是一个相当简单的示例,但您可以看到它逐步处理此部分中的每个页面(即每个项目),然后输出到每个项目旁边的 HTML 链接和图标。每个项目的前置元数据用于确定显示哪些信息。
|
||||
|
||||
请记住,您需要确保相关的样式和类可用,这可能需要重新编译 Tailwind CSS。这在 [高级自定义]({{< ref "advanced-customisation" >}}) 部分中有更详细的讨论。
|
||||
|
||||
在创建此类自定义模板时,最简单的方法始终是查看默认 Congo 模板的工作方式,然后将其用作指南。记住,[Hugo 文档](https://gohugo.io/templates/introduction/)也是学习有关创建模板的更多信息的绝佳资源。
|
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
title: "フロントマター"
|
||||
date: 2020-08-12
|
||||
draft: false
|
||||
description: "Congoにおけるフロントマターの設定について"
|
||||
summary: "CongoはほとんどのHugoのデフォルト設定をサポートしつつ、個々の記事の表示をカスタマイズするための多くのフロントマターを追加しています。"
|
||||
slug: "front-matter"
|
||||
tags: ["front matter", "config", "docs"]
|
||||
---
|
||||
|
||||
[Hugoのフロントマターパラメーター](https://gohugo.io/content-management/front-matter/#front-matter-variables)に加えて、Congoは個々の記事の表示をカスタマイズするためのオプションを追加しています。利用可能なフロントマターのパラメーターを以下に示します。
|
||||
|
||||
フロントマターパラメーターのデフォルト値はテーマの[基本設定]({{< ref "configuration" >}})から継承されるので、デフォルトを上書きしたい場合にのみフロントマターでこれらのパラメーターを指定する必要があります。
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`title`|_Not set_|記事の名前。|
|
||||
|`description`|_Not set_|記事の説明文。HTMLメタデータで使用されます。|
|
||||
|`feature`|`"*feature*"`|この記事の `feature` 画像のファイル名にマッチするテキストパターン。|
|
||||
|`featureAlt`|`""`|`feature` 画像の代替テキスト説明。|
|
||||
|`cover`|`"*cover*"`|この記事の `cover` 画像のファイル名にマッチするテキストパターン。|
|
||||
|`coverAlt`|`featureAlt`|`cover` 画像の代替テキスト説明。|
|
||||
|`coverCaption`|_Not set_|`cover` 画像の下に表示されるキャプションテキスト。|
|
||||
|`thumbnail`|`"*thumb*"`_|この記事の `thumb` 画像のファイル名にマッチするテキストパターン。|
|
||||
|`thumbnailAlt`|`featureAlt`|`thumb` 画像の代替テキスト説明。|
|
||||
|`externalUrl`|_Not set_|この記事が第三者のウェブサイトで公開されている場合のURL。URLを提供することで、コンテンツページが生成されるのを防ぎ、この記事への参照はすべて第三者のウェブサイトに直接リンクされます。|
|
||||
|`editURL`|`article.editURL`|`showEdit` がアクティブな場合の編集リンクのURL。|
|
||||
|`editAppendPath`|`article.editAppendPath`|`editURL`で設定されたURLに現在の記事へのパスを追加するかどうか。|
|
||||
|`groupByYear`|`list.groupByYear`|一覧ページで記事を年ごとにグループ化するかどうか。|
|
||||
|`keywords`|_Not set_|記事のメタデータに含めるべきキーワード。|
|
||||
|`menu`|_Not set_|値が指定されると、指定されたメニューにこの記事へのリンクが表示されます。有効な値は `main` または `footer` です。|
|
||||
|`robots`|_Not set_|ロボットがこの記事をどのように扱うべきかを示す文字列。設定された場合、 `<head>` に出力されます。有効な値については[Googleのドキュメント](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)を参照してください。|
|
||||
|`sharingLinks`|`article.sharingLinks`|この記事の最後にどの共有リンクを表示するか。 `false` に設定すると共有リンクは表示されません。|
|
||||
|`showAuthor`|`article.showAuthor`|記事フッターに著者欄を表示するかどうか。|
|
||||
|`showBreadcrumbs`|`article.showBreadcrumbs` or `list.showBreadcrumbs`|パンくずリストを記事のヘッダーに表示するか、リストのヘッダーに表示するか。|
|
||||
|`showDate`|`article.showDate`|記事が作成された日付を表示するかどうか。日付は `date` パラメーターで設定します。|
|
||||
|`showDateUpdated`|`article.showDateUpdated`|記事が更新された日付を表示するかどうか。日付は `lastmod` パラメーターで設定します。|
|
||||
|`showEdit`|`article.showEdit`|記事の内容を編集するためのリンクを表示するかどうか。|
|
||||
|`showHeadingAnchors`|`article.showHeadingAnchors`|見出しアンカーリンクを記事内の見出しと一緒に表示するかどうか。|
|
||||
|`showPagination`|`article.showPagination`|記事のフッターに次/前の記事リンクを表示するかどうか。|
|
||||
|`invertPagination`|`article.invertPagination`|次の記事/前の記事リンクの向きを反転させるかどうか。|
|
||||
|`showReadingTime`|`article.showReadingTime`|記事の予想読了時間を表示するかどうか。|
|
||||
|`showTaxonomies`|`article.showTaxonomies`|この記事に関連するTaxonomiesを表示するかどうか。|
|
||||
|`showTableOfContents`|`article.showTableOfContents`|この記事に目次を表示するかどうか。|
|
||||
|`showWordCount`|`article.showWordCount`|記事の単語数を表示するかどうか。|
|
||||
|`showComments`|`article.showComments`|[コメント]({{< ref "partials#コメント" >}})を記事フッターの後に含めるかどうか。|
|
||||
|`showSummary`|`list.showSummary`|リストページに記事の要約を表示するかどうか。|
|
||||
|`summary`|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|`showSummary` が有効な場合、この記事の要約として使用されるMarkdown文字列。|
|
||||
|`xml`|`true` unless excluded by `sitemap.excludedKinds`|この記事が `/sitemap.xml` ファイルに含まれるかどうか。|
|
||||
<!-- prettier-ignore-end -->
|
|
@ -3,6 +3,7 @@ title: "Front Matter"
|
|||
date: 2020-08-12
|
||||
draft: false
|
||||
description: "All the front matter variables available in Congo."
|
||||
summary: "While supporting most Hugo defaults, Congo adds a number of front matter parameters to customise the presentation of individual articles."
|
||||
slug: "front-matter"
|
||||
tags: ["front matter", "config", "docs"]
|
||||
---
|
||||
|
@ -16,10 +17,18 @@ Front matter parameter default values are inherited from the theme's [base confi
|
|||
|---|---|---|
|
||||
|`title`|_Not set_|The name of the article.|
|
||||
|`description`|_Not set_|The text description for the article. It is used in the HTML metadata.|
|
||||
|`feature`|`"*feature*"`|The text pattern to match the feature image filename for this article.|
|
||||
|`featureAlt`|`""`|The alternative text description for the feature image.|
|
||||
|`cover`|`"*cover*"`|The text pattern to match the cover image filename for this article.|
|
||||
|`coverAlt`|`featureAlt`|The alternative text description for the cover image.|
|
||||
|`coverCaption`|_Not set_|The figure caption text to be displayed beneath the cover image.|
|
||||
|`thumbnail`|`"*thumb*"`_|The text pattern to match the thumbnail image filename for this article.|
|
||||
|`thumbnailAlt`|`featureAlt`|The alternative text description for the thumbnail image.|
|
||||
|`externalUrl`|_Not set_|If this article is published on a third-party website, the URL to this article. Providing a URL will prevent a content page being generated and any references to this article will link directly to the third-party website.|
|
||||
|`editURL`|`article.editURL`|When `showEdit` is active, the URL for the edit link.|
|
||||
|`editAppendPath`|`article.editAppendPath`|When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`.|
|
||||
|`groupByYear`|`list.groupByYear`|Whether or not articles are grouped by year on list pages.|
|
||||
|`keywords`|_Not set_|Any keywords that should be included in the article metadata.|
|
||||
|`menu`|_Not set_|When a value is provided, a link to this article will appear in the named menus. Valid values are `main` or `footer`.|
|
||||
|`robots`|_Not set_|String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|
||||
|`sharingLinks`|`article.sharingLinks`|Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed.|
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
title: "Front Matter"
|
||||
date: 2020-08-12
|
||||
draft: false
|
||||
description: "Congo中可用的所有Front Matter 变量。"
|
||||
summary: "虽然支持大多数 Hugo 默认值,但 Congo 添加了许多前置参数,以定制单个文章的呈现方式。"
|
||||
slug: "front-matter"
|
||||
tags: ["front matter", "config", "docs"]
|
||||
---
|
||||
|
||||
除了[默认 Hugo 的Front Matter变量](https://gohugo.io/content-management/front-matter/#front-matter-variables)之外,Congo 添加了许多额外的选项,以定制单个文章的呈现方式。以下是所有可用的主题前置变量参数。
|
||||
|
||||
Front Matter参数的默认值是从主题的[基础配置]({{< ref "configuration" >}})中继承的,因此只有在要覆盖默认值时才需要在Front Matter变量中指定这些参数。
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|Name|Default|Description|
|
||||
|---|---|---|
|
||||
|`title`|_未设置_|文章的标题。|
|
||||
|`description`|_未设置_|文章的文本描述。用于 HTML 元数据。|
|
||||
|`feature`|`"*feature*"`|用于匹配此文章的feature图片文件名的文本模式。|
|
||||
|`featureAlt`|`""`|feature图片的替代文本描述。|
|
||||
|`cover`|`"*cover*"`|用于匹配此文章的封面图片文件名的文本模式。|
|
||||
|`coverAlt`|`featureAlt`|封面图片的替代文本描述。|
|
||||
|`coverCaption`|_未设置_|在封面图片下方显示的图注文本。|
|
||||
|`thumbnail`|`"*thumb*"`_|用于匹配此文章的缩略图图片文件名的文本模式。|
|
||||
|`thumbnailAlt`|`featureAlt`|缩略图图片的替代文本描述。|
|
||||
|`externalUrl`|_未设置_|如果此文章发表在第三方网站上,则为此文章的 URL。提供 URL 将阻止生成内容页面,并且对此文章的任何引用将直接链接到第三方网站。|
|
||||
|`editURL`|`article.editURL`|当 `showEdit` 激活时,编辑链接的 URL。|
|
||||
|`editAppendPath`|`article.editAppendPath`|当 `showEdit` 激活时,是否将当前文章的路径附加到 `editURL` 设置的 URL。|
|
||||
|`groupByYear`|`list.groupByYear`|文章在列表页面上是否按年份分组。|
|
||||
|`keywords`|_未设置_|应包含在文章元数据中的任何关键字。|
|
||||
|`menu`|_未设置_|提供数值时,此文章的链接将出现在指定的菜单中。有效值为 `main` 或 `footer`。|
|
||||
|`robots`|_未设置_|指示爬虫机器人如何处理此文章的字符串。如果设置,它将输出到页面头部。参考[Google文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)获取有效值。|
|
||||
|`sharingLinks`|`article.sharingLinks`|在文章末尾显示哪些分享链接。如果未提供或设置为 `false`,则不显示任何链接。|
|
||||
|`showAuthor`|`article.showAuthor`|是否在文章页脚显示作者框。|
|
||||
|`showBreadcrumbs`|`article.showBreadcrumbs` 或 `list.showBreadcrumbs`|是否在文章或列表页眉中显示面包屑。|
|
||||
|`showDate`|`article.showDate`|是否显示文章日期。日期使用 `date` 参数设置。|
|
||||
|`showDateUpdated`|`article.showDateUpdated`|是否显示文章的更新日期。日期使用 `lastmod` 参数设置。|
|
||||
|`showEdit`|`article.showEdit`|是否显示编辑文章内容的链接。|
|
||||
|`showHeadingAnchors`|`article.showHeadingAnchors`|是否在文章中的标题旁边显示标题锚链接。|
|
||||
|`showPagination`|`article.showPagination`|是否在文章页脚显示下一篇/上一篇文章的链接。|
|
||||
|`invertPagination`|`article.invertPagination`|是否翻转下一篇/上一篇文章链接的方向。|
|
||||
|`showReadingTime`|`article.showReadingTime`|是否显示文章的阅读时间。|
|
||||
|`showTaxonomies`|`article.showTaxonomies`|是否显示与此文章相关的分类法。|
|
||||
|`showTableOfContents`|`article.showTableOfContents`|是否在文章中显示目录。|
|
||||
|`showWordCount`|`article.showWordCount`|是否显示文章的字数统计。|
|
||||
|`showComments`|`article.showComments`|是否在文章页脚后包含[评论部分]({{< ref "partials#comments" >}})。|
|
||||
|`showSummary`|`list.showSummary`|是否在列表页上显示文章摘要。|
|
||||
|`summary`|使用 `summaryLength` 自动生成(参见[站点配置]({{< ref "configuration#site-configuration" >}}))|当启用 `showSummary` 时,用作此文章摘要的 Markdown 字符串。|
|
||||
|`xml`|`true`,除非被 `sitemap.excludedKinds` 排除|此文章是否包含在生成的 `/sitemap.xml` 文件中。|
|
||||
<!-- prettier-ignore-end -->
|
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,246 @@
|
|||
---
|
||||
title: "はじめに"
|
||||
date: 2020-08-15
|
||||
draft: false
|
||||
description: "Congoを使い始める方法"
|
||||
summary: "このセクションでは、すでにCongoをインストールし、カラースキーム、メニュー、コンテンツ構造の選択など基本的な設定作業を行う準備ができていることを前提としています。"
|
||||
slug: "getting-started"
|
||||
tags: ["installation", "docs"]
|
||||
---
|
||||
|
||||
{{< alert >}}
|
||||
このセクションはあなたが既に[インストール]({{< ref "docs/installation" >}})を終えていることを前提としています。
|
||||
{{< /alert >}}
|
||||
|
||||
Congoに同梱されている設定ファイルには、テーマが認識できるすべての設定が含まれおり、デフォルトでは多くはコメントアウトされていますが、特定の機能を有効にしたり変更したりするには、コメントアウトを解除するだけです。
|
||||
|
||||
## 基本設定
|
||||
|
||||
コンテンツを作成する前に、新規インストール用に設定すべきことがいくつかあります。まず `config.toml` ファイルで、`baseURL` と `languageCode` パラメーターを設定し、 `languageCode` には、コンテンツの作成に使用するメインの言語を設定しましょう。
|
||||
|
||||
```toml
|
||||
# config/_default/config.toml
|
||||
|
||||
baseURL = "https://your_domain.com/"
|
||||
languageCode = "en"
|
||||
```
|
||||
|
||||
次のステップは言語設定です。Congoは多言語をサポートしていますが、今はメインの言語だけを設定してください。
|
||||
|
||||
`config/_default` の中にある `languages.en.toml` ファイルを探してください。メイン言語が英語の場合は、このファイルをそのまま使うことができます。そうでない場合は、ファイル名に正しい言語コードが含まれるようにファイル名を変更してください。例えばフランス語の場合は、 `languages.fr.toml` にファイル名を変更します。
|
||||
|
||||
{{< alert >}}
|
||||
言語設定ファイル名の言語コードは、 `config.toml` の `languageCode` 設定と一致している必要があります。
|
||||
{{< /alert >}}
|
||||
|
||||
```toml
|
||||
# config/_default/languages.en.toml
|
||||
|
||||
title = "My awesome website"
|
||||
|
||||
[params.author]
|
||||
name = "My name"
|
||||
image = "img/author.jpg"
|
||||
headline = "A generally awesome human"
|
||||
bio = "A little bit about me"
|
||||
links = [
|
||||
{ twitter = "https://twitter.com/username" }
|
||||
]
|
||||
```
|
||||
|
||||
`[params.author]` はウェブサイト上でどのように著者情報を表示するかを決定します。画像はサイトの `assets/` に置きましょう。リンクはリストの記述順に沿って表示されます。
|
||||
|
||||
各設定に関する詳細情報は、[設定]({{< ref "configuration" >}})セクションで説明されています。
|
||||
|
||||
## カラースキーム
|
||||
|
||||
Congoにはいくつかのカラースキームが同梱されています。配色を変更するには、`colorScheme` パラメーターを設定するだけです。有効なオプションは `congo` (デフォルト)、 `avocado` 、 `cherry` 、 `fire` 、 `ocean` 、 `sapphire` 、 `slate` です。
|
||||
|
||||
{{< alert >}}
|
||||
`colourScheme` の値は小文字で指定します。
|
||||
{{< /alert >}}
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
|
||||
colorScheme = "congo"
|
||||
```
|
||||
|
||||
Congoは、テーマ全体で使用される3色のパレットを定義しています。それぞれのメインカラーには、[Tailwind](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)に含まれる10色の濃淡が含まれています。
|
||||
|
||||
#### Congo (default)
|
||||
|
||||
{{< swatches "#71717a" "#8b5cf6" "#d946ef" >}}
|
||||
|
||||
#### Avocado
|
||||
|
||||
{{< swatches "#78716c" "#84cc16" "#10b981" >}}
|
||||
|
||||
#### Cherry
|
||||
|
||||
{{< swatches "#737373" "#f43f5e" "#22c55e" >}}
|
||||
|
||||
#### Fire
|
||||
|
||||
{{< swatches "#78716c" "#f97316" "#f43f5e" >}}
|
||||
|
||||
#### Ocean
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Sapphire
|
||||
|
||||
{{< swatches "#64748b" "#6366f1" "#ec4899" >}}
|
||||
|
||||
#### Slate
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
||||
独自の配色を作成することもできます。詳しくは [高度な設定]({{< ref "advanced-customisation#colour-schemes" >}})セクションを参照してください。
|
||||
|
||||
## コンテンツの整理
|
||||
|
||||
Congoは特定のコンテンツタイプを強制しません。そのため、自由にコンテンツを定義することができます。静的なサイトには*pages*、ブログには*posts*、ポートフォリオには*projects*がいいかもしれません。
|
||||
|
||||
### ディレクトリ構造
|
||||
|
||||
基本的なCongoプロジェクトの概要を説明します。すべてのコンテンツは `content` に置かれます:
|
||||
|
||||
```shell
|
||||
.
|
||||
├── assets
|
||||
│ └── img
|
||||
│ └── author.jpg
|
||||
├── config
|
||||
│ └── _default
|
||||
├── content
|
||||
│ ├── _index.md
|
||||
│ ├── about.md
|
||||
│ └── posts
|
||||
│ ├── _index.md
|
||||
│ ├── first-post.md
|
||||
│ └── another-post
|
||||
│ ├── aardvark.jpg
|
||||
│ └── index.md
|
||||
└── themes
|
||||
└── congo
|
||||
```
|
||||
|
||||
{{< alert >}}
|
||||
ここで注意しなければならないのは、コンテンツディレクトリの中で、通常の記事ページは `index.md` という名前になり、リストページは `_index.md` という名前になるということです。記事に付随するアセットはインデックスファイルと一緒にサブディレクトリに置く必要があります。
|
||||
{{< /alert >}}
|
||||
|
||||
このテーマはHugoのページバンドルを最大限に活用するように設計されているため、Hugoがどのようにコンテンツを整理することを想定しているかをしっかりと把握することが重要です。詳しくは[Hugo公式ドキュメント](https://gohugo.io/content-management/organization/)を読んでください。
|
||||
|
||||
### feature、cover、そしてthumb(nail)
|
||||
|
||||
Congoは、記事リストと個々の記事ページの上部に画像を表示できます。サポートされている画像には3つのタイプがあり、それぞれに使用例があります: `feature` 、 `cover` 、 `thumb` です。
|
||||
|
||||
以下の例では、 `first-post` の記事に `cover` と `thumb` を用意しています:
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── posts
|
||||
├── _index.md
|
||||
└── first-post
|
||||
├── cover.jpg
|
||||
├── index.md
|
||||
└── thumb.jpg
|
||||
```
|
||||
|
||||
`thumb` 画像は記事のサムネイルとして記事リストで表示され、 `cover` 画像は個々の記事ページで記事内容の上部に表示されます。
|
||||
|
||||

|
||||
|
||||
{{< alert >}}
|
||||
パフォーマンスの観点から、 `thumb` 画像は自動的に4:3の比率にトリミング・リサイズされます。 `cover` 画像は内容に合わせて自動的にリサイズされますが、比率は問いません。
|
||||
{{< /alert >}}
|
||||
|
||||
The `feature` image is a special type, and when present, it will be used in place of _both_ the `thumb` and `cover` images. Feature images are also present in the article metadata, which is included when content is shared to third-party networks like Facebook and Twitter.
|
||||
`feature` 画像は特別で、存在する場合には `thumb` 画像と `cover` 画像の両方の代わりに使用されます。 `feature` 画像は記事のメタデータとして、FacebookやTwitterのようなサードパーティのネットワークにコンテンツが共有される場合にも含まれます。
|
||||
|
||||
Congoは記事画像をインテリジェントに検出し、自動的にあなたのサイトに追加します。フロントマターでそれらを指定する必要はなく、ページリソース内に適切な名前のファイルを配置するだけです。画像ファイル名のどこかに `feature` 、 `cover` 、 `thumb` という単語があれば、それがその目的で使用されます。
|
||||
|
||||
[例]({{< ref "samples" >}})には、これらの画像の例が多数掲載されています(また、[ソースコード](https://github.com/jpanther/congo/tree/dev/exampleSite/content/samples)を参照してファイル構造を確認することもできます)。
|
||||
|
||||
### Taxonomies
|
||||
|
||||
CongoはTaxonomiesに関しても柔軟です。 `tags` や `categories` を使ってコンテンツをグループ化したい人もいれば、 `topics` を使いたい人もいるでしょう。
|
||||
|
||||
Hugoはデフォルトで `posts` 、 `tags` 、 `categories` を使用するようになっています。しかし、これをカスタマイズしたい場合は、 `taxonomies.toml` 設定ファイルを作成することでカスタマイズできます:
|
||||
|
||||
```toml
|
||||
# config/_default/taxonomies.toml
|
||||
|
||||
topic = "topics"
|
||||
```
|
||||
|
||||
上記の例はデフォルトの _tags_ と _categories_ を _topics_ に置き換えます。詳細は、[Hugo Taxonomy docs](https://gohugo.io/content-management/taxonomies/)を参照してください。
|
||||
|
||||
When you create a new taxonomy, you will need to adjust the navigation links on the website to point to the correct sections, which is covered below.
|
||||
|
||||
## メニュー
|
||||
|
||||
Congoには2つのメニューがあり、サイトの内容やレイアウトに合わせてカスタマイズすることができます。 `main` メニューはサイトのヘッダーに表示され、 `footer` メニューはページの一番下、著作権表示のすぐ上に表示されます。
|
||||
|
||||
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use. Menu links will be sorted from lowest to highest `weight`, and then alphabetically by `name`.
|
||||
どちらのメニューも `menus.en.toml` ファイルで設定すします。 `menus.en.toml` ファイルは言語設定ファイルと同様に、他の言語を使いたい場合はファイル名を変更して使いたい言語コードに置き換えてください。メニューのリンクは `weight` の低いものから高いものへとソートされ、次にアルファベット順に `name` でソートされます。
|
||||
|
||||
```toml
|
||||
# config/_default/menus.en.toml
|
||||
|
||||
[[main]]
|
||||
name = "Blog"
|
||||
pageRef = "posts"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "Topics"
|
||||
pageRef = "topics"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 30
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
icon = "search"
|
||||
|
||||
[[footer]]
|
||||
name = "Privacy"
|
||||
pageRef = "privacy"
|
||||
```
|
||||
|
||||
### 基本のリンク
|
||||
|
||||
`name` パラメーターはメニューリンクで使用するテキストを指定します。また、オプションでリンクのHTMLタイトル属性となる `title` を指定することもできます。
|
||||
|
||||
`pageRef` パラメーターを使うと、HugoのコンテンツページやTaxonomyを簡単に参照することができます。Hugoのコンテンツアイテムを参照するだけで、自動的に正しいリンクが作成されるので、メニューを設定する最も簡単な方法です。外部URLへのリンクには `url` パラメーターを使用します。
|
||||
|
||||
リンク内に `params` を指定することで、さらなるカスタマイズが可能です。 `icon` を追加したり、 `showName` でリンクテキストを切り替えたり、URLに `target` を設定したりすることができます。上記の例では、GitHubリンクはアイコンのみで表示され、リンクは新しいウィンドウで開きます。
|
||||
|
||||
### アクションリンク
|
||||
|
||||
There is a special case for creating menu items for links that take theme actions. These are denoted using the `action` parameter, and a value of the action the link should perform. Action links allow for all the same custom parameters as other links and can be styled with an icon or text name.
|
||||
特別なケースとして、アクションを実行するリンク項目を作成する場合があります。これらは `action` パラメーターと実行するアクションの値を使って指定します。アクションリンクでは基本のリンクと同じカスタムパラメーターを使用することができ、アイコンやテキスト名でスタイルを設定することもできます。
|
||||
|
||||
有効なテーマ・アクションは2つあります:
|
||||
|
||||
- `appearance` は外観を切り替えるリンクを作成します
|
||||
- `search` はサイト内検索を行うリンクを作成します
|
||||
|
||||
どちらのメニューも完全にオプションであり、必要なければコメントアウトすることができます。デフォルトとして提供されているテンプレートも参考にしてください。
|
||||
|
||||
## 詳細な設定
|
||||
|
||||
上記の手順は最低限の設定です。これで `hugo server` を実行すると、空白のCongoウェブサイトが表示されます。詳細な設定については、[設定]({{< ref "configuration" >}})セクションを参照してください。
|
|
@ -2,7 +2,8 @@
|
|||
title: "Getting Started"
|
||||
date: 2020-08-15
|
||||
draft: false
|
||||
description: "All the front matter variables available in Congo."
|
||||
description: "Learn how to get started using the Congo theme."
|
||||
summary: "This section assumes you have already installed the Congo theme and are ready to start with basic configuration tasks like selecting a colour scheme, menu and content structure."
|
||||
slug: "getting-started"
|
||||
tags: ["installation", "docs"]
|
||||
---
|
||||
|
@ -29,7 +30,7 @@ The next step is to configure the language settings. Although Congo supports mul
|
|||
Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`.
|
||||
|
||||
{{< alert >}}
|
||||
Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`.
|
||||
The language code in the language config filename should match the `languageCode` setting in `config.toml`.
|
||||
{{< /alert >}}
|
||||
|
||||
```toml
|
||||
|
@ -37,7 +38,7 @@ Note that the language code in the language config filename should match the `la
|
|||
|
||||
title = "My awesome website"
|
||||
|
||||
[author]
|
||||
[params.author]
|
||||
name = "My name"
|
||||
image = "img/author.jpg"
|
||||
headline = "A generally awesome human"
|
||||
|
@ -47,13 +48,17 @@ links = [
|
|||
]
|
||||
```
|
||||
|
||||
The `[author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `assets/` folder. Links will be displayed in the order they are listed.
|
||||
The `[params.author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `assets/` folder. Links will be displayed in the order they are listed.
|
||||
|
||||
If you need extra detail, further information about each of these configuration options, is covered in the [Configuration]({{< ref "configuration" >}}) section.
|
||||
|
||||
## Colour schemes
|
||||
|
||||
Congo ships with a number of colour schemes out of the box. To change the scheme, simply set the `colorScheme` theme parameter. Valid options are `congo` (default), `avocado`, `fire`, `ocean` and `slate`.
|
||||
Congo ships with a number of colour schemes out of the box. To change the scheme, simply set the `colorScheme` theme parameter. Valid options are `congo` (default), `avocado`, `cherry`, `fire`, `ocean`, `sapphire` and `slate`.
|
||||
|
||||
{{< alert >}}
|
||||
The `colourScheme` value should be provided in lowercase.
|
||||
{{< /alert >}}
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
|
@ -71,6 +76,10 @@ Congo defines a three-colour palette that is used throughout the theme. Each mai
|
|||
|
||||
{{< swatches "#78716c" "#84cc16" "#10b981" >}}
|
||||
|
||||
#### Cherry
|
||||
|
||||
{{< swatches "#737373" "#f43f5e" "#22c55e" >}}
|
||||
|
||||
#### Fire
|
||||
|
||||
{{< swatches "#78716c" "#f97316" "#f43f5e" >}}
|
||||
|
@ -79,6 +88,10 @@ Congo defines a three-colour palette that is used throughout the theme. Each mai
|
|||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Sapphire
|
||||
|
||||
{{< swatches "#64748b" "#6366f1" "#ec4899" >}}
|
||||
|
||||
#### Slate
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
@ -170,10 +183,10 @@ When you create a new taxonomy, you will need to adjust the navigation links on
|
|||
|
||||
Congo has two menus that can be customised to suit the content and layout of your site. The `main` menu appears in the site header and the `footer` menu appears at the bottom of the page just above the copyright notice.
|
||||
|
||||
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use.
|
||||
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use. Menu links will be sorted from lowest to highest `weight`, and then alphabetically by `name`.
|
||||
|
||||
```toml
|
||||
# config/_default/menus.toml
|
||||
# config/_default/menus.en.toml
|
||||
|
||||
[[main]]
|
||||
name = "Blog"
|
||||
|
@ -185,18 +198,46 @@ Both menus are configured in the `menus.en.toml` file. Similarly to the language
|
|||
pageRef = "topics"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 30
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
icon = "search"
|
||||
|
||||
[[footer]]
|
||||
name = "Privacy"
|
||||
url = "https://external-link"
|
||||
pageRef = "privacy"
|
||||
```
|
||||
|
||||
### Basic links
|
||||
|
||||
The `name` parameter specifies the text that is used in the menu link. You can also optionally provide a `title` which fills the HTML title attribute for the link.
|
||||
|
||||
The `pageRef` parameter allows you to easily reference Hugo content pages and taxonomies. It is the quickest way to configure the menu as you can simply refer to any Hugo content item and it will automatically build the correct link. To link to external URLs, the `url` parameter can be used.
|
||||
|
||||
Menu links will be sorted from lowest to highest `weight`, and then alphabetically by `name`.
|
||||
Further customisation can be achieved through the use of special theme parameters. Providing `params` within a link allows the addition of an `icon`, the ability to toggle the link text with `showName` and to optionally set a `target` for the URL. In the example above, the GitHub link will only display as an icon and will open the link in a new window.
|
||||
|
||||
Both menus are completely optional and can be commented out if not required. Use the template provided in the file as a guide.
|
||||
### Action links
|
||||
|
||||
There is a special case for creating menu items for links that take theme actions. These are denoted using the `action` parameter, and a value of the action the link should perform. Action links allow for all the same custom parameters as other links and can be styled with an icon or text name.
|
||||
|
||||
There are three valid theme actions:
|
||||
|
||||
- `appearance` will create a link to the appearance switcher
|
||||
- `locale` will create a drop down picker to access translated content
|
||||
- `search` will create a link to the site search
|
||||
|
||||
Both menus are completely optional and can be commented out if not required. Use the template provided in the default file as a guide.
|
||||
|
||||
## Detailed configuration
|
||||
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
---
|
||||
title: "快速开始"
|
||||
date: 2020-08-15
|
||||
draft: false
|
||||
description: "Congo的启动方法"
|
||||
summary: "这一部分假设你已经安装了Congo主题,并准备开始进行基本配置任务,如选择颜色方案、菜单和内容结构。"
|
||||
slug: "getting-started"
|
||||
tags: ["installation", "docs"]
|
||||
---
|
||||
|
||||
{{< alert >}}
|
||||
本节假定您已经[安装了Congo主题]({{< ref "docs/installation" >}})。
|
||||
{{< /alert >}}
|
||||
|
||||
Congo提供的配置文件包含主题定制的所有可能设置。默认情况下,其中许多设置项都被注释掉,但您可以简单地取消注释以激活或更改特定功能。
|
||||
|
||||
## 基本配置
|
||||
|
||||
在创建任何内容之前,有一些新安装需要设置的事项。首先在`config.toml`文件中,设置`baseURL`和`languageCode`参数。`languageCode`应设置为您将用于撰写内容的主要语言。
|
||||
|
||||
```toml
|
||||
# config/_default/config.toml
|
||||
|
||||
baseURL = "https://your_domain.com/"
|
||||
languageCode = "en"
|
||||
```
|
||||
|
||||
下一步是配置语言设置。虽然Congo支持多语言设置,但目前,只需配置主要语言即可。
|
||||
|
||||
找到config文件夹中的`languages.en.toml`文件。如果您的主要语言是英语,可以直接使用此文件。否则,将其重命名,以便文件名中包含正确的语言代码。例如,对于法语,将文件重命名为`languages.fr.toml`。
|
||||
|
||||
{{< alert >}}
|
||||
语言配置文件名中的语言代码应与`config.toml`中的`languageCode`设置相匹配。
|
||||
{{< /alert >}}
|
||||
|
||||
```toml
|
||||
# config/_default/languages.en.toml
|
||||
|
||||
title = "My awesome website"
|
||||
|
||||
[author]
|
||||
name = "My name"
|
||||
image = "img/author.jpg"
|
||||
headline = "A generally awesome human"
|
||||
bio = "A little bit about me"
|
||||
links = [
|
||||
{ twitter = "https://twitter.com/username" }
|
||||
]
|
||||
```
|
||||
|
||||
`[author]`配置确定在网站上显示作者信息的方式。图像应放置在站点的`assets/`文件夹中。链接将按照它们列出的顺序显示。
|
||||
|
||||
如果需要更多细节,每个配置选项的详细信息都在[配置]({{< ref "configuration" >}})部分中有介绍。
|
||||
|
||||
## 颜色方案
|
||||
|
||||
Congo默认情况下提供了一些颜色方案。要更改方案,只需设置`colorScheme`主题参数。有效选项为`congo`(默认)、`avocado`、`cherry`、`fire`、`ocean`、`sapphire`和`slate`。
|
||||
|
||||
{{< alert >}}
|
||||
`colorScheme`值应以小写形式提供。
|
||||
{{< /alert >}}
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
|
||||
colorScheme = "congo"
|
||||
```
|
||||
|
||||
Congo定义了一个在整个主题中使用的三色调色板。每个主色包含十种基于包含在[Tailwind](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)中的颜色的阴影。
|
||||
|
||||
#### Congo(默认)
|
||||
|
||||
{{< swatches "#71717a" "#8b5cf6" "#d946ef" >}}
|
||||
|
||||
#### Avocado
|
||||
|
||||
{{< swatches "#78716c" "#84cc16" "#10b981" >}}
|
||||
|
||||
#### Cherry
|
||||
|
||||
{{< swatches "#737373" "#f43f5e" "#22c55e" >}}
|
||||
|
||||
#### Fire
|
||||
|
||||
{{< swatches "#78716c" "#f97316" "#f43f5e" >}}
|
||||
|
||||
#### Ocean
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Sapphire
|
||||
|
||||
{{< swatches "#64748b" "#6366f1" "#ec4899" >}}
|
||||
|
||||
#### Slate
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
||||
尽管这些是默认的方案,但您还可以创建自己的方案。有关详细信息,请参阅[高级自定义]({{< ref "advanced-customisation#colour-schemes" >}})部分。
|
||||
|
||||
### 组织内容
|
||||
|
||||
Congo不会强制您使用特定的内容类型,默认情况下,您可以自由定义您的内容。您可以选择使用 _pages_ 来创建静态站点,使用 _posts_ 来撰写博客,或使用 _projects_ 来展示项目。这种自由度使您能够根据您的需求和偏好来组织和呈现内容。
|
||||
|
||||
### 目录结构
|
||||
|
||||
以下是基本Congo项目的快速概览。所有内容都放置在`content`文件夹中:
|
||||
|
||||
```shell
|
||||
.
|
||||
├── assets
|
||||
│ └── img
|
||||
│ └── author.jpg
|
||||
├── config
|
||||
│ └── _default
|
||||
├── content
|
||||
│ ├── _index.md
|
||||
│ ├── about.md
|
||||
│ └── posts
|
||||
│ ├── _index.md
|
||||
│ ├── first-post.md
|
||||
│ └── another-post
|
||||
│ ├── aardvark.jpg
|
||||
│ └── index.md
|
||||
└── themes
|
||||
└── congo
|
||||
```
|
||||
|
||||
{{< alert >}}
|
||||
这里需要注意的关键一点是,在content目录中,普通文章页面的命名为`index.md`,而列表页面的命名为`_index.md`。任何与文章相关的静态文件都应放置在与索引文件相邻的子目录中。
|
||||
{{< /alert >}}
|
||||
|
||||
对于Congo主题的设计,充分利用了Hugo页面束的优势,了解Hugo希望内容如何被组织是很重要的。务必阅读[Hugo官方文档](https://gohugo.io/content-management/organization/)以获取更多信息。
|
||||
|
||||
### 特色、封面和缩略图图片
|
||||
|
||||
Congo主题支持在文章列表和单独的文章页面顶部显示图像。有三种类型的图像,每种都有其特定的用途:`feature`(特色,这个不知道怎么翻译,可能是“主图” ?)、`cover`(封面)和`thumb`(缩略图)。
|
||||
|
||||
在下面的示例中,为`first-post`文章提供了封面和缩略图图像:
|
||||
|
||||
```shell
|
||||
.
|
||||
└── content
|
||||
└── posts
|
||||
├── _index.md
|
||||
└── first-post
|
||||
├── cover.jpg
|
||||
├── index.md
|
||||
└── thumb.jpg
|
||||
```
|
||||
|
||||
`thumb`图像用作文章缩略图,将显示在文章列表中,而`cover`图像将显示在单个文章页面的内容顶部。
|
||||
|
||||

|
||||
|
||||
{{< alert >}}
|
||||
为了提供最大性能,缩略图图像将自动裁剪并调整大小为4:3的比例。封面图像将自动调整大小以适应其内容,但允许任何比例。
|
||||
{{< /alert >}}
|
||||
|
||||
`feature`图像是一种特殊类型,当存在时,它将用于替代`thumb`和`cover`图像。特色图像也出现在文章元数据中,在将内容共享到Facebook和Twitter等第三方网络时包含在其中。
|
||||
|
||||
主题将智能检测文章图像并自动将其添加到您的站点。您不必在正文中引用它们,只需将以适当命名的文件放在页面资源中即可。如果图像文件名中的任何地方都包含术语`feature`、`cover`或`thumb`,那么它将用于该用途。
|
||||
|
||||
[示例部分]({{< ref "samples" >}})提供了这些图像的许多示例(您可以查看[源代码](https://github.com/jpanther/congo/tree/dev/exampleSite/content/samples)以查看文件结构)。
|
||||
|
||||
### 分类法
|
||||
|
||||
Congo 在分类方面也非常灵活。有些人喜欢使用标签(tags)和分类(categories)来对内容进行分组,而其他人可能更倾向于使用主题(topics)。
|
||||
|
||||
Hugo默认使用文章、标签和分类,如果这符合您的需求,那么这将运行良好。但是,如果您希望自定义此设置,可以通过创建`taxonomies.toml`配置文件来实现:
|
||||
|
||||
```toml
|
||||
# config/_default/taxonomies.toml
|
||||
|
||||
topic = "topics"
|
||||
```
|
||||
|
||||
这将使用主题替换默认的标签和分类。有关在命名分类法时的更多信息,请参阅[Hugo分类法文档](https://gohugo.io/content-management/taxonomies/)。
|
||||
|
||||
创建新分类法时,您将需要调整网站上的导航链接,以指向正确的部分,下面有相关说明。
|
||||
|
||||
## 菜单
|
||||
|
||||
Congo有两个菜单,可以根据您站点的内容和布局进行自定义。`main`菜单显示在站点页眉中,而`footer`菜单显示在页面底部,正好在版权声明上方。
|
||||
|
||||
这两个菜单都在`menus.en.toml`文件中配置。与语言配置文件类似,如果您希望使用其他语言,请将此文件重命名并用所需的语言代码替换`en`。菜单链接将按`weight`从低到高排序,然后按`name`字母顺序排序。
|
||||
|
||||
```toml
|
||||
# config/_default/menus.en.toml
|
||||
|
||||
[[main]]
|
||||
name = "博客"
|
||||
pageRef = "posts"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "主题"
|
||||
pageRef = "topics"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "GitHub"
|
||||
url = "https://github.com/jpanther/congo"
|
||||
weight = 30
|
||||
[main.params]
|
||||
icon = "github"
|
||||
showName = false
|
||||
target = "_blank"
|
||||
|
||||
[[main]]
|
||||
identifier = "search"
|
||||
weight = 99
|
||||
[main.params]
|
||||
action = "search"
|
||||
icon = "search"
|
||||
|
||||
[[footer]]
|
||||
name = "隐私"
|
||||
pageRef = "privacy"
|
||||
```
|
||||
|
||||
### 基本链接
|
||||
|
||||
`name` 参数指定了菜单链接中使用的文本。您还可以选择提供 `title`,用于填充链接的 HTML title 属性。
|
||||
|
||||
`pageRef` 参数允许您轻松引用 Hugo 内容页面和分类法。这是配置菜单的最快方法,因为您只需引用任何 Hugo 内容项,它将自动构建正确的链接。要链接到外部 URL,可以使用 `url` 参数。
|
||||
|
||||
通过使用特殊的主题参数,可以进一步自定义。在链接中提供 `params` 允许添加 `icon`,通过 `showName` 切换链接文本的能力,并可选择设置 URL 的 `target`。在上面的示例中,GitHub 链接将只显示为图标,并在新窗口中打开链接。
|
||||
|
||||
### 操作链接
|
||||
|
||||
有一个特殊情况,用于创建执行主题操作的菜单项。这些链接项通过 `action` 参数进行标识,该参数指定链接应执行的操作。操作链接允许使用与其他链接(基本链接)相同的自定义参数,并且可以用图标或文本名称进行样式设置。
|
||||
|
||||
Congo内置有三个有效的主题操作:
|
||||
|
||||
- `appearance` 将创建一个指向外观切换器(深色主题还是浅色主题)的链接
|
||||
- `locale` 将创建一个下拉选择器,以切换语言访问已翻译的内容
|
||||
- `search` 将创建指向站内搜索的链接
|
||||
|
||||
这两个菜单都是完全可选的,如果不需要,可以注释掉。使用默认文件中提供的模板作为配置指南。
|
||||
|
||||
## 更详细配置
|
||||
|
||||
上述步骤是最基本的配置。如果现在运行 `hugo server`,您将看到一个空白的 Congo 网站。更详细配置在 [基本配置]({{< ref "configuration" >}}) 部分进行介绍。
|
After Width: | Height: | Size: 21 KiB |
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: "ホームページレイアウト"
|
||||
date: 2020-08-13
|
||||
draft: false
|
||||
description: "Congoにおけるホームページレイアウトの設定について"
|
||||
summary: "Congoは、組み込みテンプレートと独自のテンプレートを提供する機能によって、柔軟なホームページレイアウトを提供します。"
|
||||
slug: "homepage-layout"
|
||||
tags: ["homepage", "layouts", "docs"]
|
||||
---
|
||||
|
||||
Congoは柔軟なホームページレイアウトを提供します。2つのメインテンプレートから選択でき、追加設定でデザインを調整できます。また、独自のテンプレートを用意して、ホームページの内容を完全にコントロールすることもできます。
|
||||
|
||||
ホームページのレイアウトは `params.toml` 設定ファイルの `homepage.layout` 設定によって制御されます。さらに、すべてのレイアウトには[最近の記事](#最近の記事)を表示するオプションがあります。
|
||||
|
||||
## ページレイアウト
|
||||
|
||||
デフォルトのレイアウトはページレイアウトです。これはシンプルにMarkdownコンテンツを表示します。静的なウェブサイトには最適で、多くの柔軟性を提供します。
|
||||
|
||||

|
||||
|
||||
ページレイアウトを有効にするには、 `params.toml` 設定ファイルで `homepage.layout = "page"` を設定します。
|
||||
|
||||
## プロフィールレイアウト
|
||||
|
||||
プロフィールレイアウトは、個人のウェブサイトやブログに最適です。画像とソーシャル・プロフィールへのリンクを提供することで、著者の詳細を前面に押し出します。
|
||||
|
||||

|
||||
|
||||
著者情報は `languages` 設定ファイルで提供されます。パラメーターの詳細については、[はじめに]({{< ref "getting-started" >}})と[言語と国際化]({{< ref "configuration#言語と国際化" >}})セクションを参照してください。
|
||||
|
||||
さらに、ホームページのコンテンツで提供されるすべてのMarkdownコンテンツは、著者プロフィールの下に配置されます。これにより、ショートコードを使用した著者の略歴やその他のカスタムコンテンツを表示するための柔軟性が増します。
|
||||
|
||||
プロフィールレイアウトを有効にするには、 `params.toml` 設定ファイルで `homepage.layout = "profile"` を設定します。
|
||||
|
||||
## カスタムレイアウト
|
||||
|
||||
組み込みのホームページレイアウトがあなたのニーズに十分でない場合は、独自のカスタムレイアウトを提供するオプションがあります。これにより、ページの内容を完全にコントロールすることができ、白紙の状態から作成することができます。
|
||||
|
||||
カスタムレイアウトを有効にするには、 `params.toml` 設定ファイルで `homepage.layout = "custom"` を設定します。
|
||||
|
||||
設定値が設定された状態で、新しい `custom.html` ファイルを作成し、 `layouts/partials/home/custom.html` に配置してください。これで、 `custom.html` ファイルにあるものは何でも、サイトのホームページのコンテンツエリアに配置されるようになります。レイアウトの定義には、HTML、Tailwind、Hugoのテンプレート関数など、お好きなものをお使いください。
|
||||
|
||||
カスタムレイアウトに[最近の記事](#最近の記事)を含めるには、 `recent-articles.html` パーシャルを使います。
|
||||
|
||||
例として、このサイトの[ホームページ]({{< ref "/" >}})では、カスタムレイアウトを使ってページとプロフィールのレイアウトを切り替えられるようにしています。[GitHub repo](https://github.com/jpanther/congo/blob/dev/exampleSite/layouts/partials/home/custom.html)を訪問して、どのように動作するか見てみましょう。
|
||||
|
||||
## 最近の記事
|
||||
|
||||
すべてのホームページレイアウトには、メインページコンテンツの下に最近の記事を表示するオプションがあります。これを有効にするには、 `params.toml` 設定ファイルの `homepage.showRecent` 設定を `true` にするだけです。
|
||||
|
||||

|
||||
|
||||
このセクションにリストされる記事は、 `mainSections` 設定から派生したもので、あなたのウェブサイトで使用しているコンテンツタイプに対応します。例えば、 _posts_ と _projects_ のコンテンツセクションがある場合、この設定を `["posts", "projects"]` に設定することで、これら2つのセクションにあるすべての記事が最近の記事リストに出力されます。Congoはこの設定が配列であることを想定しているので、すべてのコンテンツに1つのセクションしか使用しない場合は、この設定を適宜変更してください: `["blog"]`
|
|
@ -3,6 +3,7 @@ title: "Homepage Layout"
|
|||
date: 2020-08-13
|
||||
draft: false
|
||||
description: "Configuring the homepage layout in the Congo theme."
|
||||
summary: "Congo provides a fully flexible homepage layout with built-in templates and the ability to provide your own."
|
||||
slug: "homepage-layout"
|
||||
tags: ["homepage", "layouts", "docs"]
|
||||
---
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: "主页布局"
|
||||
date: 2020-08-13
|
||||
draft: false
|
||||
description: "在 Congo 主题中配置首页布局。"
|
||||
summary: "Congo 提供了一个完全灵活的首页布局,内置了模板并支持自定义。"
|
||||
slug: "homepage-layout"
|
||||
tags: ["homepage", "layouts", "docs"]
|
||||
---
|
||||
|
||||
Congo 提供了完全灵活的首页布局。有两个主要的模板可供选择,并提供额外的设置以调整设计。此外,您还可以提供自己的模板,完全掌控首页内容。
|
||||
|
||||
首页的布局由`params.toml`配置文件中的 `homepage.layout` 设置控制。另外,所有布局都可以选择包含[最近的文章](#recent-articles)列表。
|
||||
|
||||
## Page布局
|
||||
|
||||
默认布局是page布局。它只是一个显示您的 Markdown 内容的普通内容页面。非常适用于静态网站,并提供了很大的灵活性。
|
||||
|
||||

|
||||
|
||||
要启用页面布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "page"`。
|
||||
|
||||
## Profile布局
|
||||
|
||||
profile布局非常适用于个人网站和博客。它通过提供图像和社交媒体链接,将作者的详细信息置于中心位置。
|
||||
|
||||

|
||||
|
||||
作者信息存储在语言配置文件中。有关参数详细信息,请参阅 [入门指南]({{< ref "getting-started" >}}) 和 [语言配置]({{< ref "configuration##language-and-i18n" >}}) 部分。
|
||||
|
||||
此外,提供在主页内容中的任何 Markdown 内容将显示在作者资料下方。这允许额外的灵活性,以使用 Shortcodes 显示生物或其他自定义内容。
|
||||
|
||||
要启用profile布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "profile"`。
|
||||
|
||||
## custom布局
|
||||
|
||||
如果内置的首页布局不满足您的需求,您可以选择提供自己的自定义布局。这允许您完全掌控页面内容,基本上为您提供了一个空白的画布。
|
||||
|
||||
要启用自定义布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "custom"`。
|
||||
|
||||
配置值设置后,创建一个新的 `custom.html` 文件并将其放置在 `layouts/partials/home/custom.html`。现在,`custom.html` 文件中的任何内容都将放置在站点首页的内容区域。您可以使用任何 HTML、Tailwind 或 Hugo 模板函数来定义布局。
|
||||
|
||||
要在自定义布局中包含[最近的文章](#recent-articles),请使用 `recent-articles.html` 部分。
|
||||
|
||||
例如,这个站点的[首页]({{< ref "/" >}})使用自定义布局,允许在profile和page布局之间切换。访问 [GitHub 仓库](https://github.com/jpanther/congo/blob/dev/exampleSite/layouts/partials/home/custom.html) 查看它是如何工作的。
|
||||
|
||||
## 最近的文章
|
||||
|
||||
所有首页布局都可以选择在主页面内容下方显示最近的文章。要启用此功能,只需在 `params.toml` 配置文件中将 `homepage.showRecent` 设置为 `true`。
|
||||
|
||||

|
||||
|
||||
此部分中列出的文章来自 `mainSections` 设置,该设置允许使用您网站上使用的所有内容类型。例如,如果您有用于 _posts_ 和 _projects_ 的内容部分,可以将此设置设置为 `["posts", "projects"]`,所有这两个部分中的文章都将用于填充最近的列表。主题期望此设置为数组,因此如果您只使用一个部分来存储所有内容,您应相应地设置为 `["blog"]`。
|
After Width: | Height: | Size: 7.7 KiB |