Skip to content

Commit 8ec09b3

Browse files
committed
Configuration & Styilng updates
1 parent d086260 commit 8ec09b3

File tree

2 files changed

+74
-12
lines changed

2 files changed

+74
-12
lines changed

astro.config.mjs

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,23 @@ export default defineConfig({
1111
site: "https://aptos.dev",
1212
integrations: [
1313
starlight({
14-
title: "Aptos Docs",
14+
title: "Aptos Developer Docs",
15+
logo: {
16+
light: "~/assets/aptos-logomark-light.svg",
17+
dark: "~/assets/aptos-logomark-dark.svg",
18+
replacesTitle: true,
19+
},
20+
expressiveCode: {
21+
shiki: {
22+
// Define langs for shiki syntax highlighting
23+
langAlias: {
24+
Move: "move",
25+
move: "move",
26+
PowerShell: "powershell",
27+
terraform: "terraform",
28+
},
29+
},
30+
},
1531
defaultLocale: "root", // optional
1632
locales: {
1733
root: {
@@ -36,8 +52,8 @@ export default defineConfig({
3652
starlightOpenAPI(
3753
[
3854
{
39-
base: "api",
40-
label: "API",
55+
base: "api-reference",
56+
label: "API Reference",
4157
schema: "./aptos-spec.json",
4258
sidebarMethodBadges: true,
4359
},
@@ -48,17 +64,28 @@ export default defineConfig({
4864
),
4965
],
5066
sidebar: [
67+
// {
68+
// label: "Guides",
69+
// items: [
70+
// // Each item here is one entry in the navigation menu.
71+
// { label: "Example Guide", slug: "guides/example" },
72+
// ],
73+
// },
74+
// {
75+
// label: "Reference",
76+
// autogenerate: { directory: "reference" },
77+
// },
5178
{
52-
label: "Guides",
53-
items: [
54-
// Each item here is one entry in the navigation menu.
55-
{ label: "Example Guide", slug: "guides/example" },
56-
],
79+
label: "Build",
80+
collapsed: true,
81+
autogenerate: { directory: "build" },
5782
},
5883
{
59-
label: "Reference",
60-
autogenerate: { directory: "reference" },
84+
label: "Network",
85+
collapsed: true,
86+
autogenerate: { directory: "network" },
6187
},
88+
6289
...openAPISidebarGroups,
6390
],
6491
customCss: ["./src/globals.css"],

src/globals.css

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Add additional Tailwind styles to this file, for example with @layer:
66
https://tailwindcss.com/docs/adding-custom-styles#using-css-and-layer
77
*/
88
:root {
9-
--sl-content-width: 75rem;
9+
--sl-content-width: 65rem;
1010
--sl-text-5xl: 3.5rem;
1111
--sl-color-bg-sidebar: transparent;
1212

@@ -18,7 +18,22 @@ https://tailwindcss.com/docs/adding-custom-styles#using-css-and-layer
1818
}
1919

2020
.sidebar-content ul li {
21-
border-inline-start: 0;
21+
border-inline-start: 1;
22+
}
23+
24+
.sidebar-content ul li a {
25+
padding: 0.5em calc(var(--sl-sidebar-item-padding-inline) + 0.25em);
26+
}
27+
28+
.sidebar-content ul li a[aria-current="page"] {
29+
background-color: var(--sl-color-text-invert);
30+
color: var(--sl-color-text-accent);
31+
}
32+
33+
.sidebar-content .large {
34+
font-size: var(--sl-text-base);
35+
font-weight:500;
36+
color: var(--sl-color-gray-1);
2237
}
2338

2439
header {
@@ -46,3 +61,23 @@ header {
4661
header site-search button {
4762
border-radius: 0 !important;
4863
}
64+
65+
/* Temporarily hide the first h1 in the markdown content as these are defined in frontmatter */
66+
.sl-markdown-content h1:first-of-type {
67+
display:none;
68+
}
69+
70+
.sl-link-card {
71+
border-radius: 0;
72+
}
73+
74+
.group-label {
75+
text-transform:capitalize;
76+
}
77+
78+
79+
.sl-link-button.primary {
80+
border-radius: 0;
81+
background:white;
82+
border:none;
83+
}

0 commit comments

Comments
 (0)