This repository was archived by the owner on May 2, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy paththeme.config.tsx
More file actions
133 lines (128 loc) · 3.87 KB
/
Copy paththeme.config.tsx
File metadata and controls
133 lines (128 loc) · 3.87 KB
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
import React from "react";
import { DocsThemeConfig, useTheme } from "nextra-theme-docs";
import { XIcon, GithubNavIcon } from "./assets/icons";
import {
BlueDarkAdastackLogoFull,
BlueLightAdastackLogoFull,
} from "./assets/logos";
import { useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
const default_seo_description =
"Explore the Cardano ecosystem: Apps, Games, NFTs, Staking, Community, DAOs, Layer 2s, Sidechains, Metrics & ADA price. Your guide to Cardano.";
const default_seo_title = "Cardano Explorer | Adastack.io";
const config: DocsThemeConfig = {
head: () => {
const { asPath, defaultLocale, locale } = useRouter();
const { frontMatter } = useConfig();
const url =
"https://adastack.io" +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
let title = frontMatter.seo_title
? `${frontMatter.seo_title} | Adastack.io`
: default_seo_title;
let description = frontMatter.seo_description
? frontMatter.seo_description
: default_seo_description;
return (
<>
<meta property="og:url" content={url} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="canonical" href={url} />
<link
rel="icon"
type="image/png"
href="/favicon-96x96.png"
sizes="96x96"
/>
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png"
/>
<meta name="apple-mobile-web-app-title" content="adastack" />
<link rel="manifest" href="/site.webmanifest" />
</>
);
},
useNextSeoProps() {
const { frontMatter } = useConfig();
return {
titleTemplate: frontMatter.seo_title
? `${frontMatter.seo_title} | Adastack.io`
: default_seo_title,
description: frontMatter.seo_description
? frontMatter.seo_description
: default_seo_description,
// Note: This sets pages to index only if there is an seo-description on the page. Remove the below line once all pages have content and seo-descriptions.
noindex: frontMatter.seo_description ? false : true,
};
},
search: { placeholder: "Search Cardano" },
chat: {
link: "https://x.com/adastackio",
icon: <XIcon />,
},
themeSwitch: {
useOptions() {
return {
light: "Light",
dark: "Dark",
system: "Auto",
};
},
},
nextThemes: {
defaultTheme: "system",
},
logo: () => {
const { resolvedTheme } = useTheme();
return (
<>
<span className="adastack-logo-container">
{resolvedTheme === "dark" ? (
<BlueLightAdastackLogoFull className="adastack-logo" />
) : (
<BlueDarkAdastackLogoFull className="adastack-logo" />
)}
</span>
</>
);
},
gitTimestamp: null,
sidebar: {
defaultMenuCollapseLevel: 1,
toggleButton: true,
titleComponent({ title }) {
// Note: Remove this variable, conditional class logic, and related CSS once content has been added to all pages. Keep the 'sidebar-menu-item' part below.
const isInDevelopment = title.endsWith(" ");
return (
<div
className={`sidebar-menu-item ${
isInDevelopment ? "page-in-development" : ""
}`}
>
{title}
</div>
);
},
},
toc: {
float: true,
title: "Table of Contents",
},
feedback: {
content: "",
useLink() {
return "https://github.com/adastackio/adastack.io/issues";
},
},
docsRepositoryBase: null,
footer: {
text: null,
},
};
export default config;