devsandbox 0.7.1

Manage devcontainer-style sandboxes on docker, podman, or Apple container — many throwaway instances per repo from one TOML config.
---
import type { MarkdownHeading } from 'astro';
import { ArrowUpRight, ChevronRight } from '@lucide/astro';
import Pager from '../components/Pager.astro';
import Sidebar from '../components/Sidebar.astro';
import Toc from '../components/Toc.astro';
import { sourceUrl } from '../lib/nav';
import { searchSection } from '../lib/search';
import '../styles/docs.css';
import Base from './Base.astro';

export interface Props {
  title: string;
  description: string;
  eyebrow: string;
  headings: MarkdownHeading[];
  /**
   * Repo-relative file the page comes from. `edit` for hand-written pages;
   * `view` for generated ones, where the file isn't the page's text.
   */
  source: { path: string; action: 'edit' | 'view' };
  /** Breadcrumb section; defaults to Docs. */
  section?: { label: string; href: string };
}

const { title, description, eyebrow, headings, source, section = { label: 'Docs', href: '/docs/quick-start' } } = Astro.props;
// Search indexes the main column minus the breadcrumb, the eyebrow/tags line
// (excerpt noise) and the bottom cards (other pages' titles would match there).
---

<Base title={title} description={description}>
  <div class="docs-shell">
    <aside class="docs-sidebar">
      <Sidebar />
    </aside>
    <main id="main-content" class="docs-main" tabindex="-1" data-pagefind-body data-pagefind-meta={`section:${searchSection(Astro.url.pathname)}`}>
      <nav class="breadcrumb" aria-label="Breadcrumb" data-pagefind-ignore>
        <ol>
          <li><a href="/">Home</a><ChevronRight size={13} aria-hidden="true" /></li>
          <li><a href={section.href}>{section.label}</a><ChevronRight size={13} aria-hidden="true" /></li>
          <li><span aria-current="page">{title}</span></li>
        </ol>
      </nav>
      <div class="article-topline" data-pagefind-ignore>
        <span class="eyebrow"><span class="eyebrow-line" aria-hidden="true"></span>{eyebrow}</span>
        <slot name="topline" />
      </div>
      <h1 data-pagefind-meta={`title:${title}`}>{title}<span class="title-period" aria-hidden="true">.</span></h1>
      <p class="article-lead">{description}</p>
      <hr class="article-divider" />
      <article class="prose">
        <slot />
        <p class="article-source" data-pagefind-ignore>
          <span>Source: <code>{source.path}</code></span>
          <a href={sourceUrl(source.path, source.action)} target="_blank" rel="noopener noreferrer">
            {source.action === 'edit' ? 'Edit this page on GitHub' : 'View source on GitHub'}
            <ArrowUpRight size={13} aria-hidden="true" /><span class="visually-hidden">(opens in a new tab)</span>
          </a>
        </p>
      </article>
      {/* Examples put related cards above the pager through the `bottom` slot. */}
      <div class="article-bottom" data-pagefind-ignore>
        <slot name="bottom" />
        <Pager />
      </div>
    </main>
    <Toc headings={headings} />
  </div>
</Base>