--- import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; import BackToTop from "../../components/BackToTop.astro"; import hooksData from "../../../public/data/hooks.json"; import RawMarkdown from "../../components/pages/RawMarkdown.astro"; import type { HeaderItem } from "../../components/pages/Header.astro"; import DetailHeader from "../../components/pages/Header.astro"; import Breadcrumb from "../../components/pages/Breadcrumb.astro"; import Sidebar from "../../components/pages/Sidebar.astro"; import FileBrowser from "../../components/pages/FileBrowser.astro"; import { readResourceMarkdown, formatLastUpdated } from "../../lib/detail-page"; const GITHUB_BASE = "https://github.com/github/awesome-copilot/blob/main"; const GITHUB_TREE_BASE = "https://github.com/github/awesome-copilot/tree/main"; interface HookFile { name: string; path: string; size?: number; } interface HookItem extends HeaderItem { id: string; title: string; description?: string; path: string; readmeFile: string; readmeFileName?: string; files: HookFile[]; hooks: string[]; tags: string[]; assets: string[]; lastUpdated?: string | null; } export function getStaticPaths() { return (hooksData.items as HookItem[]).map((item) => ({ params: { id: item.id }, props: { item }, })); } const { item } = Astro.props as { item: HookItem }; const { markdownHtml, frontmatterText, rawMarkdown } = readResourceMarkdown( item.readmeFile ); const lastUpdated = formatLastUpdated(item.lastUpdated); const githubUrl = `${GITHUB_TREE_BASE}/${item.path}`; const readmeFileName = item.readmeFileName ?? "README.md"; const fileCount = item.files.length; const chips: { title: string; items: string[]; filterBase?: string; filterParam?: string; }[] = []; if (item.hooks.length > 0) { chips.push({ title: "Hook events", items: item.hooks }); } chips.push({ title: "Files", items: [`${fileCount} file${fileCount === 1 ? "" : "s"}`], }); if (item.tags.length > 0) { chips.push({ title: "Tags", items: item.tags, filterBase: "/hooks/", filterParam: "tag", }); } ---

Install this hook

Hooks are multi-file bundles with no CLI installer. Download the ZIP and copy the files into your project's hooks directory.