This repository has been archived by the owner on Sep 22, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
theme.config.js
142 lines (127 loc) · 8.03 KB
/
theme.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// import type { DocsThemeConfig } from 'nextra-theme-docs'
import { useConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
const logo = (
<svg
className="logo"
width="104"
height="32"
viewBox="0 0 104 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_12_2)">
<path
d="M31.9976 8.86334C31.9957 8.54151 31.9922 8.21984 31.9833 7.89764C31.9645 7.19677 31.9231 6.48954 31.7985 5.79615C31.6721 5.092 31.4655 4.43724 31.1398 3.79758C30.8202 3.16939 30.4023 2.59454 29.9038 2.09604C29.4054 1.59755 28.8305 1.17971 28.2021 0.859873C27.563 0.534599 26.9081 0.328022 26.2046 0.201619C25.5108 0.0766714 24.8036 0.035507 24.1022 0.0165412C23.7801 0.00781262 23.4584 0.00414877 23.1365 0.00215521C22.7544 0 22.372 0 21.99 0H13.5192H10.0099C9.62751 0 9.24555 0 8.86354 0.00220909C8.5415 0.00420265 8.2194 0.0078665 7.89785 0.0165951C7.72252 0.0213365 7.54682 0.0274789 7.37101 0.035938C6.84363 0.0613695 6.31544 0.107976 5.79539 0.201673C5.26774 0.296502 4.76741 0.436375 4.28066 0.637617C4.11843 0.704644 3.95765 0.778568 3.79784 0.859873C3.32649 1.09975 2.88522 1.39474 2.48386 1.73753C2.35008 1.85181 2.22071 1.97137 2.09614 2.09599C1.59754 2.59449 1.17964 3.16934 0.859971 3.79753C0.534319 4.43719 0.327958 5.09194 0.201448 5.7961C0.0769847 6.48948 0.0356048 7.19672 0.0167467 7.89759C0.00791039 8.21979 0.00419267 8.54146 0.00209134 8.86328C-0.000333264 9.24551 -9.98325e-06 9.62779 -9.98325e-06 10.0099V15.2265V21.9898C-9.98325e-06 22.3723 -0.000387144 22.7542 0.00209134 23.1367C0.00419267 23.4585 0.00791039 23.7802 0.0167467 24.1019C0.0356048 24.8031 0.0769308 25.5105 0.201448 26.2036C0.327958 26.9075 0.534319 27.5629 0.859971 28.2024C1.17964 28.8307 1.59754 29.4054 2.09614 29.9037C2.59437 30.4024 3.16938 30.8202 3.79789 31.1402C4.43707 31.4656 5.09188 31.6719 5.79555 31.7983C6.48888 31.9231 7.19665 31.9645 7.8979 31.9833C8.21946 31.9919 8.54155 31.9957 8.86359 31.9975C9.2456 32.0003 9.62756 31.9999 10.0099 31.9999H21.99C22.372 31.9999 22.7544 32.0003 23.1364 31.9975C23.4584 31.9957 23.7801 31.9919 24.1021 31.9833C24.8035 31.9645 25.5108 31.923 26.2045 31.7983C26.908 31.6719 27.5629 31.4655 28.202 31.1402C28.8305 30.8202 29.4053 30.4024 29.9037 29.9037C30.4022 29.4054 30.8202 28.8307 31.1398 28.2024C31.4654 27.5629 31.6721 26.9076 31.7985 26.2036C31.923 25.5105 31.9645 24.8031 31.9832 24.1019C31.9921 23.7802 31.9956 23.4586 31.9976 23.1367C32 22.7542 31.9998 22.3723 31.9998 21.9898V10.0099C31.9999 9.62779 32 9.24551 31.9976 8.86334Z"
fill="#F05138"
/>
<path
d="M25.3563 19.7528C25.3556 19.7519 25.3549 19.7512 25.354 19.7502C25.3894 19.6298 25.426 19.51 25.457 19.3866C26.7851 14.095 23.5436 7.83902 18.0584 4.54506C20.4621 7.80368 21.525 11.7506 20.5806 15.2023C20.4964 15.5101 20.3952 15.8056 20.2833 16.0928C20.1618 16.013 20.0088 15.9224 19.8033 15.8091C19.8033 15.8091 14.3469 12.4402 8.4331 6.4813C8.27793 6.32488 11.5866 11.2104 15.3416 15.1775C13.5725 14.1846 8.64221 10.5975 5.52104 7.7408C5.90451 8.3803 6.36061 8.9961 6.86196 9.58894C9.46841 12.8944 12.8675 16.9729 16.9399 20.1047C14.0786 21.8557 10.0356 21.9918 6.01017 20.1065C5.01452 19.6399 4.07851 19.0769 3.21207 18.4372C4.91603 21.1628 7.54036 23.5143 10.7344 24.8871C14.5435 26.5241 18.3313 26.4131 21.1525 24.914L21.1503 24.9172C21.1631 24.9091 21.1795 24.9002 21.1929 24.8919C21.3087 24.8296 21.4237 24.7662 21.5362 24.6992C22.8916 23.9957 25.5689 23.2819 27.006 26.0779C27.3579 26.7622 28.1058 23.1359 25.3563 19.7528Z"
fill="white"
/>
<path
d="M44.1443 20.7666C44.3943 22.9867 46.5117 24.4422 49.4522 24.4422C52.2461 24.4422 54.2605 22.9867 54.2605 20.9727C54.2605 19.2376 53.0402 18.1785 50.2315 17.473L47.5114 16.782C43.6003 15.8114 41.8357 14.0468 41.8357 11.1358C41.8357 7.54818 44.9676 5.06301 49.423 5.06301C53.7456 5.06301 56.8188 7.56262 56.9218 11.1653H54.0547C53.8339 8.95973 52.0401 7.60658 49.3496 7.60658C46.6879 7.60658 44.8353 8.97417 44.8353 10.9737C44.8353 12.5323 45.9824 13.4589 48.8055 14.1794L51.0698 14.7674C55.4515 15.841 57.2453 17.5466 57.2453 20.6197C57.2453 24.5309 54.1426 26.9865 49.2022 26.9865C44.6148 26.9865 41.4829 24.5453 41.2477 20.7668H44.1443V20.7666Z"
fill="currentColor"
/>
<path
d="M75.4585 26.6334H72.5763L69.2092 14.8999H69.1504L65.7981 26.6334H62.9162L58.6521 11.2677H61.4456L64.4157 23.6042H64.4748L67.8272 11.2677H70.5325L73.9144 23.6042H73.9734L76.9436 11.2677H79.7076L75.4585 26.6334Z"
fill="currentColor"
/>
<path
d="M81.5686 7.13599C81.5686 6.21006 82.3335 5.46 83.2598 5.46C84.2008 5.46 84.9653 6.21006 84.9653 7.13599C84.9653 8.06257 84.2008 8.82713 83.2598 8.82713C82.3335 8.82713 81.5686 8.06262 81.5686 7.13599ZM81.8629 11.2677H84.6713V26.6334H81.8629V11.2677Z"
fill="currentColor"
/>
<path
d="M103.011 13.5323V11.2676H100.041V7.59209H97.247V11.2676H94.9679H91.8787V9.91513C91.8931 8.54754 92.4227 7.97399 93.6873 7.97399C94.0987 7.97399 94.5105 8.0186 94.8488 8.07701V5.87143C94.3488 5.79793 93.893 5.75397 93.3638 5.75397C90.3641 5.75397 89.0996 7.00409 89.0996 9.87116V11.2676H86.9531V13.5323H89.0996V26.6333H91.8932V13.5323H94.968H97.247V22.6047C97.247 25.5748 98.3794 26.7213 101.32 26.7213C101.952 26.7213 102.673 26.6773 102.996 26.6038V24.3103C102.805 24.3398 102.246 24.3838 101.938 24.3838C100.629 24.3838 100.041 23.7663 100.041 22.3842V13.5323H103.011Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0_12_2">
<rect width="103.011" height="32" fill="white" />
</clipPath>
</defs>
</svg>
)
// const config: DocsThemeConfig = {
const config = {
docsRepositoryBase: 'https://github.com/mprcodes/swift-book-es/blob/main',
project: {
link: 'https://github.com/mprcodes/swift-book-es'
},
editLink: {
text: 'Editar esta página en GitHub →'
},
feedback: {
content: '¿Ves algo por mejorar en este artículo? ¡Házmelo saber!',
labels: 'feedback'
},
logo,
footer: {
text: `Copyright © ${new Date().getFullYear()} Apple Inc.`
},
useNextSeoProps() {
const { asPath } = useRouter()
if (asPath !== '/') {
return {
titleTemplate: '%s — The Swift Programming Language en Español'
}
}
},
head: function useHead() {
const { title } = useConfig()
const { route } = useRouter()
const socialCard =
route === '/' || !title
? 'https://swiftbook.es/og.jpeg'
: `https://swift-book.es/api/og?title=${title}`
return (
<>
<meta name="msapplication-TileColor" content="#fff" />
<meta name="theme-color" content="#fff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta httpEquiv="Content-Language" content="es" />
<meta
name="description"
content="The Swift Programming Language en Español"
/>
<meta
name="og:description"
content="The Swift Programming Language en Español"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={socialCard} />
<meta name="twitter:site:domain" content="swiftbook.es" />
<meta name="twitter:url" content="https://swiftbook.es" />
<meta
name="og:title"
content={
title
? title + ' — The Swift Programming Language'
: 'The Swift Programming Language'
}
/>
<meta name="og:image" content={socialCard} />
<meta
name="apple-mobile-web-app-title"
content="The Swift Programming Language en Español"
/>
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link
rel="icon"
href="/favicon-dark.svg"
type="image/svg+xml"
media="(prefers-color-scheme: dark)"
/>
<link
rel="icon"
href="/favicon-dark.png"
type="image/png"
media="(prefers-color-scheme: dark)"
/>
</>
)
}
}
export default config