diff --git a/astro.config.mjs b/astro.config.mjs index cb6313a..ca5bbfe 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -17,6 +17,13 @@ export default defineConfig({ routeBase: '/', style: 'vega', css: false, + bodyAttrs: { + 'hx-boost': 'true', + 'hx-target': '#content', + 'hx-select': '#content', + 'hx-swap': 'outerHTML', + 'hx-push-url': 'true', + }, components: { Head: './docs/src/site/StyleHead.astro', SidebarHeader: './docs/src/site/SidebarHeader.astro', diff --git a/docs/src/cli.mdx b/docs/src/cli.mdx index 03baefa..d5e38c8 100644 --- a/docs/src/cli.mdx +++ b/docs/src/cli.mdx @@ -4,11 +4,22 @@ Use the CLI to copy Basecoat component assets into your project. It can install CSS, JavaScript, and the matching Nunjucks or Jinja macros for components that ship template helpers. - - {`npx basecoat-cli add dialog`} - {`pnpm dlx basecoat-cli add dialog`} - {`bunx basecoat-cli add dialog`} - {`yarn dlx basecoat-cli add dialog`} + +```bash title="npm" +npx basecoat-cli add dialog +``` + +```bash title="pnpm" +pnpm dlx basecoat-cli add dialog +``` + +```bash title="bun" +bunx basecoat-cli add dialog +``` + +```bash title="yarn" +yarn dlx basecoat-cli add dialog +``` The CLI asks which template engine you use and where it should copy JavaScript and macro files. @@ -17,8 +28,9 @@ The CLI asks which template engine you use and where it should copy JavaScript a Nunjucks and Jinja macros are optional helpers for components with larger HTML structures. They generate the same semantic Basecoat markup shown in the component docs. - - {`{% from "select.njk" import select %} + +```jinja title="Nunjucks" +{% from "select.njk" import select %} {{ select( name="fruit", items=[ @@ -26,8 +38,11 @@ Nunjucks and Jinja macros are optional helpers for components with larger HTML s { value: "banana", label: "Banana" }, { value: "blueberry", label: "Blueberry" } ] -) }}`} - {`{% from "select.html.jinja" import select %} +) }} +``` + +```jinja title="Jinja" +{% from "select.html.jinja" import select %} {{ select( name="fruit", items=[ @@ -35,7 +50,8 @@ Nunjucks and Jinja macros are optional helpers for components with larger HTML s { "value": "banana", "label": "Banana" }, { "value": "blueberry", "label": "Blueberry" } ] -) }}`} +) }} +``` ### Public Macros diff --git a/docs/src/installation.mdx b/docs/src/installation.mdx index f314445..c0b75aa 100644 --- a/docs/src/installation.mdx +++ b/docs/src/installation.mdx @@ -81,11 +81,22 @@ Basecoat is authored for Tailwind CSS. Install Tailwind first if your project do - - {`npm install basecoat-css`} - {`pnpm add basecoat-css`} - {`bun add basecoat-css`} - {`yarn add basecoat-css`} + +```bash title="npm" +npm install basecoat-css +``` + +```bash title="pnpm" +pnpm add basecoat-css +``` + +```bash title="bun" +bun add basecoat-css +``` + +```bash title="yarn" +yarn add basecoat-css +``` If you are not using a bundler, copy or serve the files you need from `node_modules/basecoat-css/dist`. diff --git a/docs/src/site/StyleHead.astro b/docs/src/site/StyleHead.astro index 65b1d8c..bec0df4 100644 --- a/docs/src/site/StyleHead.astro +++ b/docs/src/site/StyleHead.astro @@ -83,46 +83,29 @@ const styleUrls = { diff --git a/package-lock.json b/package-lock.json index 34362ee..5a5c2c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "lucide-static": "^1.17.0", "nunjucks": "^3.2.4", "prettier": "^3.5.3", - "reallysimpledocs": "1.0.0-beta.5", + "reallysimpledocs": "^1.0.0", "tailwindcss": "^4.1.17", "terser": "^5.42.0", "wrangler": "^4.50.0" @@ -7823,9 +7823,9 @@ "license": "MIT" }, "node_modules/reallysimpledocs": { - "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/reallysimpledocs/-/reallysimpledocs-1.0.0-beta.5.tgz", - "integrity": "sha512-lAHFGlhZYLXZA8lzRHnD4hklsYf4old8mW7WVM8R1lRKvWZWfVBWMsbZGKlcbf7N8cfDJSOzHefBsez7BtEWvQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reallysimpledocs/-/reallysimpledocs-1.0.0.tgz", + "integrity": "sha512-P4qdwlWKcZv+T4FLcjGwuNG+m4EF8K97DCBA7ZtvODEVJMe4t9d9C3cxXbxgCP9fDRflgwEIQi9ruM4ZJWFI8Q==", "dev": true, "dependencies": { "@astrojs/markdown-remark": "^7.2.0", @@ -7835,11 +7835,14 @@ "lucide-static": "^0.552.0", "lunr": "^2.3.9", "marked": "^16.4.1", - "shiki": "^4.1.0" + "rehype-parse": "^9.0.1", + "rehype-stringify": "^10.0.1", + "shiki": "^4.1.0", + "unified": "^11.0.5" }, "peerDependencies": { "astro": "^6.4.6", - "basecoat-css": "^1.0.0-beta.5", + "basecoat-css": "^1.0.0-beta.6", "tailwindcss": ">=4.1.17 <5" } }, diff --git a/package.json b/package.json index f9c4160..47746ee 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "lucide-static": "^1.17.0", "nunjucks": "^3.2.4", "prettier": "^3.5.3", - "reallysimpledocs": "1.0.0-beta.5", + "reallysimpledocs": "^1.0.0", "tailwindcss": "^4.1.17", "terser": "^5.42.0", "wrangler": "^4.50.0"