-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
theme.config.tsx
151 lines (148 loc) · 4.75 KB
/
theme.config.tsx
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
143
144
145
146
147
148
149
150
151
import Link from "next/link";
import { useRouter } from "next/router";
import urlcat from "urlcat";
import { VercelLogo } from "./components/Icons";
const config = {
readMore: "Read More →",
darkMode: true,
postFooter: null,
footer: (
<>
<hr />
<div
style={{
display: "flex",
flexDirection: "row",
gap: "10px",
justifyContent: "space-between",
alignItems: "baseline",
}}
>
<div style={{ display: "flex", flexDirection: "column" }}>
<p>
Copyright - 2019 - {new Date().getFullYear()} @ The dahliaOS Authors
</p>
<Link
href="https://vercel.com?utm_source=dahliaOS&utm_campaign=oss"
target="_blank"
style={{
display: "flex",
flexDirection: "row",
gap: "10px",
textDecoration: "none",
}}
>
Powered By
<VercelLogo />
</Link>
</div>
<Link href={"/feed.xml"}>RSS</Link>
</div>
</>
),
head: ({ title, meta }: { title: any; meta: any }) => {
const { asPath, route } = useRouter();
return (
<>
<meta property="description" content={meta.description} />
<meta property="og:description" content={meta.description} />
{<meta name="author" content={meta.author} />}
{route === "/" ? (
<title>dahliaOS Blog</title>
) : (
<title>{`${title} - dahliaOS Blog`}</title>
)}
{route === "/" ? (
<meta property="og:title" content="dahliaOS Blog" />
) : (
<meta property="og:title" content={`${title} - dahliaOS Blog`} />
)}
<meta charSet="UTF-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<link rel="canonical" href="https://blog.dahliaos.io" />
<meta property="og:url" content={`https://blog.dahliaos.io${asPath}`} />
<meta name="theme-color" content="#ff3d00" />
<meta property="og:site_name" content="dahliaOS" />
<meta name="viewport" content="width=device-width" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link
rel="icon"
type="image/png"
href="/images/favicon/favicon-32x32.png"
/>
<meta name="apple-mobile-web-app-status-bar-style" content="#ff3d00" />
<meta name="apple-mobile-web-app-title" content="dahliaOS" />
<meta
name="msapplication-TileImage"
content="/images/favicon/favicon.png"
/>
<meta name="msapplication-TileColor" content="#ff3d00" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/images/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/images/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/images/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="/site.webmanifest" />
<meta
name="keywords"
content={`${meta.tag}, dahlia, blog, software, flutter, fuchsia, linux, dahliaOS, computer, operating system, os, system, kernel, dart, open source, material, design, zircon, go, rust`}
/>
<meta httpEquiv="Content-Language" content="en" />
<meta
property="og:image"
content={
meta.image ||
urlcat("https://blog.dahliaos.io/api/og/", {
title,
desc: meta.description ?? undefined,
date: meta.date ?? undefined,
})
}
/>
<meta
property="twitter:card"
content={meta.image ? "summary_large_image" : "summary"}
/>
<meta property="twitter:site" content="@dahliaos_io" />
{route === "/" ? (
<meta property="twitter:title" content="dahliaOS Blog" />
) : (
<meta property="twitter:title" content={`${title} - dahliaOS Blog`} />
)}
<meta property="twitter:description" content={meta.description} />
<meta
property="twitter:url"
content={`https://blog.dahliaos.io${asPath}`}
/>
<meta
property="twitter:image"
content={
meta.image ||
urlcat("https://blog.dahliaos.io/api/og/", {
title,
desc: meta.description ?? undefined,
date: meta.date ?? undefined,
})
}
/>
</>
);
},
navs: [
{ url: "https://dahliaos.io", name: "Website ↗" },
{ url: "https://dahliaos.io/github", name: "GitHub ↗" },
],
};
export default config;