diff --git a/apps/docs/blume.config.ts b/apps/docs/blume.config.ts index 3ec2774..6f3c0a1 100644 --- a/apps/docs/blume.config.ts +++ b/apps/docs/blume.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from "blume"; -import type { StandardSchema } from "blume/core/standard-schema.ts"; import { hashText } from "blume/core/sources/cache.ts"; import type { ContentSource } from "blume/core/sources/types.ts"; +import type { StandardSchema } from "blume/core/standard-schema.ts"; import { custom, filesystem } from "blume/sources"; import { githubReleasesSource } from "blume/sources/github-releases.ts"; import redirects from "./redirects"; @@ -59,9 +59,18 @@ const releasesByKind = (source: ContentSource): ContentSource => ({ load: async () => { const result = await source.load(); for (const entry of result.entries) { - const kind = typeof entry.data.title === "string" ? entry.data.title.match(RELEASE_KIND)?.[1] : undefined; + const kind = + typeof entry.data.title === "string" + ? entry.data.title.match(RELEASE_KIND)?.[1] + : undefined; const changelog = entry.data.changelog; - if (!kind || !changelog || typeof changelog !== "object" || !("category" in changelog)) continue; + if ( + !kind || + !changelog || + typeof changelog !== "object" || + !("category" in changelog) + ) + continue; changelog.category = kind; if (entry.raw) { entry.raw = entry.raw.replace(/^( {2}category: ).*$/m, `$1${kind}`); @@ -70,7 +79,8 @@ const releasesByKind = (source: ContentSource): ContentSource => ({ } return result; }, - withContext: source.withContext && ((ctx) => releasesByKind(source.withContext!(ctx))), + withContext: + source.withContext && ((ctx) => releasesByKind(source.withContext!(ctx))), }); // Blume's defaults (`inter`, `ibm-plex-mono`) are fetched from fonts.gstatic.com @@ -211,12 +221,11 @@ export default defineConfig({ fonts: { display: inter, body: inter, mono: plexMono }, }, navigation: { + repo: "https://github.com/prdlk/leetcode", + actions: [{ href: "/changelog", label: "Changelog" }], sidebar: { display: "flat", // "flat" | "group" | "page" }, - tabs: [ - { label: "Guides", path: "/guides" }, - { label: "Changelog", path: "/changelog" }, - ], + tabs: [{ label: "Guides", path: "/guides" }], }, });