{"_id":"@dagilleland/layout-minimal","_rev":"2-67ba1d865c3d8c01ffe5a0a679e34fb5","name":"@dagilleland/layout-minimal","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@dagilleland/layout-minimal","version":"0.1.0","keywords":["astro","astro-component","starlight","starlight-layouts","layout"],"author":{"name":"Dan Gilleland"},"license":"MIT","_id":"@dagilleland/layout-minimal@0.1.0","maintainers":[{"name":"dagilleland","email":"dagilleland@shaw.ca"}],"homepage":"https://gilleland.ca/starlight-layouts/tutorial/minimal-layout/","bugs":{"url":"https://github.com/dagilleland/starlight-layouts/issues"},"dist":{"shasum":"8cc36f3365fdda32011e2cc0145662b012559b97","tarball":"https://registry.npmjs.org/@dagilleland/layout-minimal/-/layout-minimal-0.1.0.tgz","fileCount":7,"integrity":"sha512-PM5IwuAZfntUhdLx7kDPqUY8qHuvDFrVP2e9fzqin/fX5yuJR1yodd6y+GmmMiA6i3X1QuBQhvZEg02xzxO/hg==","signatures":[{"sig":"MEUCIQDoSeTJxL1ZVg/lTEanguPQAjlJ8E7wyS65hs5S14cEzQIgH/BTurNdMIKJTthTWEIHvmAtlhXOPP37JDPtgkjYgfw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8592},"type":"module","exports":{".":"./index.ts","./*":"./*","./meta":"./layout.meta.ts"},"gitHead":"a44500c1ed7df886c888cfc0ca50878f53aeed71","_npmUser":{"name":"dagilleland","email":"dagilleland@shaw.ca"},"repository":{"url":"git+https://github.com/dagilleland/starlight-layouts.git","type":"git","directory":"packages/layout-minimal"},"_npmVersion":"11.18.0","description":"Starlight layout that strips a page down to just header and content — no navigation sidebar, no table of contents. One of four layout packages from Starlight Layouts.","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"peerDependencies":{"astro":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/layout-minimal_0.1.0_1784178786708_0.5488054653474286","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dagilleland/layout-minimal","version":"0.1.1","description":"Starlight layout that strips a page down to just header and content — no navigation sidebar, no table of contents. One of four layout packages from Starlight Layouts.","type":"module","license":"MIT","author":{"name":"Dan Gilleland"},"homepage":"https://gilleland.ca/starlight-layouts/tutorial/minimal-layout/","repository":{"type":"git","url":"git+https://github.com/dagilleland/starlight-layouts.git","directory":"packages/layout-minimal"},"bugs":{"url":"https://github.com/dagilleland/starlight-layouts/issues"},"keywords":["astro","astro-component","starlight","starlight-layouts","layout"],"exports":{".":"./index.ts","./meta":"./layout.meta.ts","./*":"./*"},"peerDependencies":{"astro":"^6.4.5 || ^7.0.2","@astrojs/starlight":">=0.40.0 <0.42.0"},"gitHead":"8fcdb26b5e2357a72b030f031104f0341fe8de66","_id":"@dagilleland/layout-minimal@0.1.1","_nodeVersion":"24.13.1","_npmVersion":"11.18.0","dist":{"integrity":"sha512-aSc19YwJ3tkKFbuAMfDo4vOBIOkg+/LxxO3NovQmE4P5FvxrUTrn6b+0gx77qlgWMlK/HKaFILwYY4qc2m9pUw==","shasum":"ccb39caba4c6deb844a9b9c7a70ddaab9b0dc8e1","tarball":"https://registry.npmjs.org/@dagilleland/layout-minimal/-/layout-minimal-0.1.1.tgz","fileCount":7,"unpackedSize":9000,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGhET6i713Wpmv1Zb2taF45FgyJK7OoPxveejgkKpd0qAiEAvGg+nUX7UC2mXZonW78rDL9K+aV3d7HpJSa0rI4KSYI="}]},"_npmUser":{"name":"dagilleland","email":"dagilleland@shaw.ca"},"directories":{},"maintainers":[{"name":"dagilleland","email":"dagilleland@shaw.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/layout-minimal_0.1.1_1784203102003_0.05062166478366947"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T05:13:06.540Z","modified":"2026-07-16T11:58:22.295Z","0.1.0":"2026-07-16T05:13:06.839Z","0.1.1":"2026-07-16T11:58:22.140Z"},"bugs":{"url":"https://github.com/dagilleland/starlight-layouts/issues"},"author":{"name":"Dan Gilleland"},"license":"MIT","homepage":"https://gilleland.ca/starlight-layouts/tutorial/minimal-layout/","keywords":["astro","astro-component","starlight","starlight-layouts","layout"],"repository":{"type":"git","url":"git+https://github.com/dagilleland/starlight-layouts.git","directory":"packages/layout-minimal"},"description":"Starlight layout that strips a page down to just header and content — no navigation sidebar, no table of contents. One of four layout packages from Starlight Layouts.","maintainers":[{"name":"dagilleland","email":"dagilleland@shaw.ca"}],"readme":"# `@dagilleland/layout-minimal`\n\nPart of [Starlight Layouts](https://gilleland.ca/starlight-layouts/) — a tutorial site for overriding Starlight components to build custom page layouts. This layout strips a page down to just the header and content: no left navigation sidebar, no right-hand table of contents. Useful for standalone pages — a print view, an embed, a one-off landing section — that shouldn't feel like part of the docs tree.\n\n## Compatibility\n\nWorks with **Astro 6.4.5+ or 7.x**, and **Starlight 0.40.0–0.41.x** — enforced by this package's own `peerDependencies`, and confirmed by actually building and rendering a test project against both ends of that range (Astro 6.4.8/Starlight 0.40.0, and Astro 7.0.9/Starlight 0.41.3), not just inferred from the declared versions.\n\n## What's here\n\n- `layout.meta.ts` — `{ id: 'minimal', wide: true }`.\n- `PageFrame.astro` — the replacement for Starlight's own `PageFrame`: renders the header slot as usual, but never renders a `sidebar` slot at all. Starlight still computes the sidebar navigation for the page; nothing here asks for it.\n- `index.ts` — combines the two as `minimalLayout`.\n\n`PageFrame.astro` does nothing by itself — it has to be rendered *in place of* Starlight's default `PageFrame` by an override that decides when to use it. See \"Using this standalone\" below for that override, or [Composing layout packages](https://gilleland.ca/starlight-layouts/tutorial/composing-layout-packages/) for how a registry of several such packages picks between them.\n\n## Using this in a pnpm workspace monorepo\n\nSee [Building: minimal layout](https://gilleland.ca/starlight-layouts/tutorial/minimal-layout/) for the full walkthrough, including a CSS-variable gotcha this package's `<style>` block works around (Starlight sets `data-has-sidebar` on `<html>` based on whether the sidebar *config* has entries, regardless of whether a `PageFrame` override actually renders one — left alone, that would leave a sidebar-sized gap on the left with nothing in it).\n\n## Using this standalone, in your own project\n\n**Prerequisites:** an Astro project using [Starlight](https://starlight.astro.build). This package has no Tailwind classes of its own, so Tailwind isn't required just for this layout.\n\n`minimal` needs two things wired up: a `PageFrame` override to render (or not render) the component above, and the same `wide` treatment as `layout-full-width` (the sibling package in this family) to also drop the right-hand table of contents.\n\n### 1. Install the package\n\n```sh\nnpm install @dagilleland/layout-minimal\n```\n\nWorks the same with `pnpm add`, `yarn add`, or `bun add`.\n\n### 2. Add a frontmatter field\n\n```ts title=\"src/content.config.ts\"\nimport { defineCollection, z } from 'astro:content';\nimport { docsLoader } from '@astrojs/starlight/loaders';\nimport { docsSchema } from '@astrojs/starlight/schema';\n\nexport const collections = {\n  docs: defineCollection({\n    loader: docsLoader(),\n    schema: docsSchema({\n      extend: () =>\n        z.object({\n          // Not `layout` — see the note in layout-full-width's README.\n          pageLayout: z.enum(['minimal']).optional(),\n        }),\n    }),\n  }),\n};\n```\n\n### 3. Override `PageFrame`\n\nImport `PageFrame.astro` straight from the installed package (its `package.json` exports every file, not just `index.ts`) and dispatch to it:\n\n```astro title=\"src/components/overrides/PageFrame.astro\"\n---\nimport Default from '@astrojs/starlight/components/PageFrame.astro';\nimport MinimalPageFrame from '@dagilleland/layout-minimal/PageFrame.astro';\n\nconst { entry } = Astro.locals.starlightRoute;\nconst minimal = entry.data.pageLayout === 'minimal';\n---\n\n{minimal ? (\n  <MinimalPageFrame>\n    <slot name=\"header\" slot=\"header\" />\n    <slot />\n  </MinimalPageFrame>\n) : (\n  <Default>\n    <slot name=\"header\" slot=\"header\" />\n    <slot name=\"sidebar\" slot=\"sidebar\" />\n    <slot />\n  </Default>\n)}\n```\n\n### 4. Override `TwoColumnContent` and `ContentPanel`\n\nSame two overrides as [`layout-full-width`](../layout-full-width/README.md), checking `pageLayout === 'minimal'` (or `'full-width'`, if you're using both — see that package's README for the full code). Both are necessary for the same reason: without them, the space freed up by removing the sidebars just sits empty.\n\n### 5. Register the overrides\n\n```js title=\"astro.config.mjs\"\nstarlight({\n  components: {\n    PageFrame: './src/components/overrides/PageFrame.astro',\n    TwoColumnContent: './src/components/overrides/TwoColumnContent.astro',\n    ContentPanel: './src/components/overrides/ContentPanel.astro',\n  },\n});\n```\n\n### 6. Use it on a page\n\n```md\n---\ntitle: A standalone page\npageLayout: minimal\n---\n```\n","readmeFilename":"README.md"}