diff --git a/docs/content/02-arrays-and-strings/01-introduction.mdx b/docs/02-arrays-and-strings/01-introduction.mdx similarity index 100% rename from docs/content/02-arrays-and-strings/01-introduction.mdx rename to docs/02-arrays-and-strings/01-introduction.mdx diff --git a/docs/content/02-arrays-and-strings/02-two-pointers.mdx b/docs/02-arrays-and-strings/02-two-pointers.mdx similarity index 100% rename from docs/content/02-arrays-and-strings/02-two-pointers.mdx rename to docs/02-arrays-and-strings/02-two-pointers.mdx diff --git a/docs/content/02-arrays-and-strings/03-sliding-window.mdx b/docs/02-arrays-and-strings/03-sliding-window.mdx similarity index 100% rename from docs/content/02-arrays-and-strings/03-sliding-window.mdx rename to docs/02-arrays-and-strings/03-sliding-window.mdx diff --git a/docs/content/02-arrays-and-strings/04-prefix-sum.mdx b/docs/02-arrays-and-strings/04-prefix-sum.mdx similarity index 100% rename from docs/content/02-arrays-and-strings/04-prefix-sum.mdx rename to docs/02-arrays-and-strings/04-prefix-sum.mdx diff --git a/docs/content/02-arrays-and-strings/meta.ts b/docs/02-arrays-and-strings/meta.ts similarity index 100% rename from docs/content/02-arrays-and-strings/meta.ts rename to docs/02-arrays-and-strings/meta.ts diff --git a/docs/content/index.mdx b/docs/content/index.mdx deleted file mode 100644 index 06bdc26..0000000 --- a/docs/content/index.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Getting Started -description: Welcome to your new Blume docs. -sidebar: - icon: home ---- - -## Coding Patterns - -Welcome to **Blume** — markdown-first docs powered by Astro and Vite. - -## System Design - -Edit `content/index.mdx` to get started, then run `blume dev`. - -## Behavioral diff --git a/docs/index.mdx b/docs/index.mdx new file mode 100644 index 0000000..0c5e3c2 --- /dev/null +++ b/docs/index.mdx @@ -0,0 +1,10 @@ +--- +title: Introduction +description: Welcome to your new Blume docs. +--- + +# Introduction + +Welcome to **Blume** — markdown-first docs powered by Astro and Vite. + +Edit `docs/index.mdx` to get started, then run `blume dev`. diff --git a/docs/content/problems/(two-pointers)/01-reverse-string.mdx b/docs/problems/(two-pointers)/01-reverse-string.mdx similarity index 100% rename from docs/content/problems/(two-pointers)/01-reverse-string.mdx rename to docs/problems/(two-pointers)/01-reverse-string.mdx diff --git a/docs/content/problems/(two-pointers)/02-squares-of-a-sorted-array.mdx b/docs/problems/(two-pointers)/02-squares-of-a-sorted-array.mdx similarity index 100% rename from docs/content/problems/(two-pointers)/02-squares-of-a-sorted-array.mdx rename to docs/problems/(two-pointers)/02-squares-of-a-sorted-array.mdx diff --git a/docs/content/schedule/meta.ts b/docs/schedule/meta.ts similarity index 100% rename from docs/content/schedule/meta.ts rename to docs/schedule/meta.ts diff --git a/docs/content/schedule/week-1.mdx b/docs/schedule/week-1.mdx similarity index 100% rename from docs/content/schedule/week-1.mdx rename to docs/schedule/week-1.mdx diff --git a/docs/content/schedule/week-2.mdx b/docs/schedule/week-2.mdx similarity index 100% rename from docs/content/schedule/week-2.mdx rename to docs/schedule/week-2.mdx diff --git a/docs/content/schedule/week-3.mdx b/docs/schedule/week-3.mdx similarity index 100% rename from docs/content/schedule/week-3.mdx rename to docs/schedule/week-3.mdx diff --git a/docs/content/schedule/week-4.mdx b/docs/schedule/week-4.mdx similarity index 100% rename from docs/content/schedule/week-4.mdx rename to docs/schedule/week-4.mdx diff --git a/docs/content/schedule/week-5.mdx b/docs/schedule/week-5.mdx similarity index 100% rename from docs/content/schedule/week-5.mdx rename to docs/schedule/week-5.mdx diff --git a/docs/content/schedule/week-6.mdx b/docs/schedule/week-6.mdx similarity index 100% rename from docs/content/schedule/week-6.mdx rename to docs/schedule/week-6.mdx diff --git a/docs/content/schedule/week-7.mdx b/docs/schedule/week-7.mdx similarity index 100% rename from docs/content/schedule/week-7.mdx rename to docs/schedule/week-7.mdx diff --git a/docs/content/schedule/week-8.mdx b/docs/schedule/week-8.mdx similarity index 100% rename from docs/content/schedule/week-8.mdx rename to docs/schedule/week-8.mdx diff --git a/docs/worker.js b/docs/worker.js deleted file mode 100644 index 4a4e87c..0000000 --- a/docs/worker.js +++ /dev/null @@ -1,28 +0,0 @@ -export default { - async fetch(request, env) { - const auth = request.headers.get("Authorization") ?? ""; - if (auth.startsWith("Basic ")) { - let ok = false; - try { - const decoded = atob(auth.slice(6)); - const password = decoded.slice(decoded.indexOf(":") + 1); // password may contain ':' - ok = await passwordMatches(password, env.SITE_PASSWORD); - } catch {} - if (ok) return env.ASSETS.fetch(request); - } - return new Response("Authentication required", { - status: 401, - headers: { "WWW-Authenticate": 'Basic realm="leetcode-docs", charset="UTF-8"' }, - }); - }, -}; - -// timingSafeEqual needs equal-length buffers → hash both sides first -async function passwordMatches(candidate, expected) { - const enc = new TextEncoder(); - const [a, b] = await Promise.all([ - crypto.subtle.digest("SHA-256", enc.encode(candidate)), - crypto.subtle.digest("SHA-256", enc.encode(expected)), - ]); - return crypto.subtle.timingSafeEqual(a, b); -}