@theholocron/astro-config 8.9.0-alpha.4 → 8.9.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -87,7 +87,7 @@ export default defineConfig({
87
87
  });
88
88
  ```
89
89
 
90
- `entryPoints` (default `["src/index.ts"]`, relative to the package) and `label` (default "API reference") are optional. `starlight-typedoc` ships TypeScript source, so, like `starlight` and `docsTheme`, you import it in your own config and pass it in; install `starlight-typedoc`, `typedoc` and `typedoc-plugin-markdown` in the site.
90
+ `entryPoints` (default `["src/index.ts"]`, relative to the package), `label` (default "API reference") and `skipErrorChecking` (default `false`) are optional. Set `skipErrorChecking` for a package whose types come from sources TypeDoc cannot type-check on its own, such as this one's from Starlight; TypeDoc then does not stop the build on type errors. `starlight-typedoc` ships TypeScript source, so, like `starlight` and `docsTheme`, you import it in your own config and pass it in; install `starlight-typedoc`, `typedoc` and `typedoc-plugin-markdown` in the site.
91
91
 
92
92
  ## What it generates
93
93
 
package/dist/index.d.ts CHANGED
@@ -4,25 +4,39 @@ import { docsTheme } from "@theholocron/docs-theme";
4
4
  import { createStarlightTypeDocPlugin } from "starlight-typedoc";
5
5
  type StarlightSidebar = NonNullable<Parameters<typeof starlight>[0]["sidebar"]>;
6
6
  type StarlightPlugins = NonNullable<Parameters<typeof starlight>[0]["plugins"]>;
7
+ /** The docs site's identity: its title, its GitHub repo name and its sidebar. */
7
8
  export interface DocsConfig {
9
+ /** The site title Starlight shows (passed as Starlight's `title`). */
8
10
  name: string;
11
+ /** The repo name under the `theholocron` GitHub org; builds the social link and the default `base` (`/<github>`). */
9
12
  github: string;
13
+ /** The Starlight sidebar definition, passed to Starlight unchanged. */
10
14
  sidebar: StarlightSidebar;
11
15
  }
16
+ /** Everything `defineConfig` needs to build the Astro config for a Starlight docs site. */
12
17
  export interface DocsConfigInput {
18
+ /** The docs site's name, repo and sidebar. */
13
19
  docs: DocsConfig;
20
+ /** The `starlight` integration, imported by the site's own config so Astro's loader handles it. */
14
21
  starlight: typeof starlight;
22
+ /** The `docsTheme` Starlight plugin from `@theholocron/docs-theme`, imported by the site's own config. */
15
23
  docsTheme: typeof docsTheme;
16
24
  /** Further Starlight plugins, added after the docs theme (for example the ones `apiReference()` returns). */
17
25
  plugins?: StarlightPlugins;
26
+ /** Astro's `srcDir`. Omitted from the config when unset, so Astro's default (`./src`) applies. */
18
27
  srcDir?: string;
28
+ /** Astro's `outDir`, the build output folder. Omitted from the config when unset, so Astro's default applies. */
19
29
  outDir?: string;
30
+ /** Astro's `publicDir`, the folder of static assets. Omitted from the config when unset, so Astro's default applies. */
20
31
  publicDir?: string;
32
+ /** Astro's `base`, the path the site is served under. Defaults to `/<docs.github>`. */
21
33
  base?: string;
22
34
  /** The site's absolute origin (for example `https://docs.theholocron.dev`). Starlight needs it to generate a sitemap. */
23
35
  site?: string;
24
36
  }
37
+ /** Builds the Astro config for a Starlight docs site: the docs theme, a GitHub social link, the React integration and an `@` alias to the docs source folder. */
25
38
  export declare function defineConfig({ docs, starlight, docsTheme, plugins, srcDir, outDir, publicDir, base, site }: DocsConfigInput): ReturnType<typeof defineConfig$1>;
39
+ /** Options for `apiReference`. */
26
40
  export interface ApiReferenceInput {
27
41
  /** `createStarlightTypeDocPlugin` from your own `starlight-typedoc` import, as with `starlight` and `docsTheme`. */
28
42
  createPlugin: typeof createStarlightTypeDocPlugin;
@@ -35,6 +49,7 @@ export interface ApiReferenceInput {
35
49
  /** The sidebar group's label. Defaults to "API reference". */
36
50
  label?: string;
37
51
  }
52
+ /** What `apiReference` returns: the Starlight plugin and the sidebar group that belong together. */
38
53
  export interface ApiReference {
39
54
  /** Add to `defineConfig({ plugins })`. */
40
55
  plugin: StarlightPlugins[number];
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import { fileURLToPath } from "node:url";
2
2
  import react from "@astrojs/react";
3
3
  import { defineConfig as defineConfig$1 } from "astro/config";
4
4
  // index.ts
5
+ /** Builds the Astro config for a Starlight docs site: the docs theme, a GitHub social link, the React integration and an `@` alias to the docs source folder. */
5
6
  function defineConfig({ docs, starlight, docsTheme, plugins, srcDir, outDir, publicDir, base, site }) {
6
7
  return defineConfig$1({
7
8
  ...site && { site },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astro-config",
3
- "version": "8.9.0-alpha.4",
3
+ "version": "8.9.0-alpha.5",
4
4
  "description": "Astro configuration factory for theholocron docs sites.",
5
5
  "keywords": [
6
6
  "astro",
@@ -45,7 +45,7 @@
45
45
  "typescript": "^5.9.3",
46
46
  "vitest": "^5.0.5",
47
47
  "@theholocron/docs-theme": "^1.10.5-alpha.1",
48
- "@theholocron/tsconfig": "8.9.0-alpha.4"
48
+ "@theholocron/tsconfig": "8.9.0-alpha.5"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@astrojs/react": ">=6.0.0",