Skip to content

Commit e6a320b

Browse files
authored
chore(docs): fix homepage logo, build, and lighthouse improvements (#6238)
* chore(docs): fix homepage logo size * chore(docs): fix sidebars.js solid-start doc path name * chore(docs): image file and size optimizations * chore(docs): fix semantic misordered headings * chore(docs): make banner link more descriptive * chore(docs): add solid-start redirect
1 parent 7d4d436 commit e6a320b

File tree

12 files changed

+43
-17
lines changed

12 files changed

+43
-17
lines changed

docs/docusaurus.config.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const docusaurusConfig = {
4646
title: "Auth.js",
4747
logo: {
4848
alt: "Auth.js Logo",
49-
src: "img/logo/logo-xs.png",
49+
src: "img/logo/logo-xs.webp",
5050
},
5151
items: [
5252
{
@@ -101,7 +101,7 @@ const docusaurusConfig = {
101101
announcementBar: {
102102
id: "new-major-announcement",
103103
content:
104-
"<a target='_blank' rel='noopener noreferrer' href='https://next-auth.js.org'>NextAuth.js</a> is becoming Auth.js! 🎉 We're creating Authentication for the Web. Everyone included. Starting with SvelteKit, check out the docs <a href='/reference/sveltekit'>here</a>.",
104+
"<a target='_blank' rel='noopener noreferrer' href='https://next-auth.js.org'>NextAuth.js</a> is becoming Auth.js! 🎉 We're creating Authentication for the Web. Everyone included. Starting with SvelteKit, check out <a href='/reference/sveltekit'>the docs</a>.",
105105
backgroundColor: "#000",
106106
textColor: "#fff",
107107
},
@@ -121,6 +121,7 @@ const docusaurusConfig = {
121121
alt="Powered by Vercel"
122122
style="margin-top: 8px"
123123
height="32"
124+
width="167"
124125
src="https://raw.githubusercontent.com/nextauthjs/next-auth/main/docs/static/img/powered-by-vercel.svg"
125126
/>
126127
</a>`,
@@ -181,7 +182,10 @@ const docusaurusConfig = {
181182
lastVersion: "current",
182183
showLastUpdateAuthor: true,
183184
showLastUpdateTime: true,
184-
remarkPlugins: [require("@sapphire/docusaurus-plugin-npm2yarn2pnpm").npm2yarn2pnpm, require("remark-github")],
185+
remarkPlugins: [
186+
require("@sapphire/docusaurus-plugin-npm2yarn2pnpm").npm2yarn2pnpm,
187+
require("remark-github"),
188+
],
185189
versions: {
186190
current: {
187191
label: "experimental",
@@ -201,7 +205,15 @@ const docusaurusConfig = {
201205
...typedocConfig,
202206
id: "core",
203207
plugin: ["./tyepdoc"],
204-
entryPoints: ["index.ts", "adapters.ts", "errors.ts", "jwt.ts", "types.ts"].map((e) => `${coreSrc}/${e}`).concat(providers),
208+
entryPoints: [
209+
"index.ts",
210+
"adapters.ts",
211+
"errors.ts",
212+
"jwt.ts",
213+
"types.ts",
214+
]
215+
.map((e) => `${coreSrc}/${e}`)
216+
.concat(providers),
205217
tsconfig: "../packages/core/tsconfig.json",
206218
out: "reference/03-core",
207219
watch: process.env.TYPEDOC_WATCH,
@@ -214,7 +226,9 @@ const docusaurusConfig = {
214226
...typedocConfig,
215227
id: "sveltekit",
216228
plugin: ["./tyepdoc"],
217-
entryPoints: ["index.ts", "client.ts"].map((e) => `../packages/frameworks-sveltekit/src/lib/${e}`),
229+
entryPoints: ["index.ts", "client.ts"].map(
230+
(e) => `../packages/frameworks-sveltekit/src/lib/${e}`
231+
),
218232
tsconfig: "../packages/frameworks-sveltekit/tsconfig.json",
219233
out: "reference/04-sveltekit",
220234
watch: process.env.TYPEDOC_WATCH,

docs/sidebars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ module.exports = {
5858
label: "@auth/solid-start",
5959
link: {
6060
type: "doc",
61-
id: "reference/solid-start/index",
61+
id: "reference/solidstart/index",
6262
},
63-
items: ["reference/solid-start/client", "reference/solid-start/protected"],
63+
items: ["reference/solidstart/client", "reference/solidstart/protected"],
6464
},
6565
{
6666
type: "category",

docs/src/css/index.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,19 @@ html[data-theme="dark"] hr {
140140
border-radius: 10rem;
141141
overflow: visible;
142142
box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1);
143-
background-image: url("/img/mesh-1.jpg");
143+
background-image: url("/img/mesh-1.webp");
144144
background-size: cover;
145145
background-origin: center;
146146
}
147147

148148
.home-main .section-features .row .col:nth-child(2) .feature-image-wrapper {
149-
background-image: url("/img/mesh-2.jpg");
149+
background-image: url("/img/mesh-2.webp");
150150
background-size: cover;
151151
background-origin: center;
152152
}
153153

154154
.home-main .section-features .row .col:nth-child(3) .feature-image-wrapper {
155-
background-image: url("/img/mesh-3.jpg");
155+
background-image: url("/img/mesh-3.webp");
156156
background-size: cover;
157157
background-origin: center;
158158
}

docs/src/css/navbar.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
margin-right: 1rem !important;
77
}
88

9+
.navbar__logo {
10+
width: 29px;
11+
height: 32px;
12+
}
13+
914
.navbar__title {
1015
font-size: 1.2rem;
1116
margin-left: 0.2rem;

docs/src/pages/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ export default function Home() {
117117
<div className="container">
118118
<div className="hero-inner">
119119
<img
120-
src="/img/logo/logo-sm.png"
120+
src="/img/logo/logo-sm.webp"
121121
alt="Shield with key icon"
122122
className={styles.heroLogo}
123+
height="142"
124+
width="128"
123125
/>
124126
<div className={styles.heroText}>
125127
<h1 className="hero__title">{siteConfig.title}</h1>
@@ -214,29 +216,29 @@ export default function Home() {
214216
<div className="row">
215217
<div className="col col--6">
216218
<div className="code">
217-
<h4 className="code-heading">
219+
<div className="code-heading">
218220
Next.js <span>/pages/api/auth/[...nextauth].ts</span>
219-
</h4>
221+
</div>
220222
<CodeBlock className="prism-code language-js">
221223
{nextJsCode}
222224
</CodeBlock>
223225
</div>
224226
</div>
225227
<div className="col col--6">
226228
<div className="code">
227-
<h4 className="code-heading">
229+
<div className="code-heading">
228230
SvelteKit <span>/hooks.server.ts</span>
229-
</h4>
231+
</div>
230232
<CodeBlock className="prism-code language-js">
231233
{svelteKitCode}
232234
</CodeBlock>
233235
</div>
234236
</div>
235237
<div className="col col--6">
236238
<div className="code">
237-
<h4 className="code-heading">
239+
<div className="code-heading">
238240
SolidStart <span>/routes/api/auth/[...solidauth].ts</span>
239-
</h4>
241+
</div>
240242
<CodeBlock className="prism-code language-js">
241243
{solidStartCode}
242244
</CodeBlock>

docs/static/img/logo/logo-sm.webp

18.8 KB
Loading

docs/static/img/logo/logo-xs.webp

2.27 KB
Loading

docs/static/img/logo/logo.webp

47 KB
Loading

docs/static/img/mesh-1.webp

32.6 KB
Loading

docs/static/img/mesh-2.webp

32.1 KB
Loading

0 commit comments

Comments
 (0)