@stacksjs/bunpress 0.1.0 → 0.1.3

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.
Files changed (54) hide show
  1. package/README.md +257 -26
  2. package/dist/bin/cli.js +2 -104
  3. package/dist/chunk-1ymh7yt2.js +9656 -0
  4. package/dist/chunk-8qj79f0y.js +2 -0
  5. package/dist/chunk-szme5v1e.js +8 -0
  6. package/dist/chunk-z0redasq.js +530 -0
  7. package/dist/config.d.ts +3 -5
  8. package/dist/highlighter.d.ts +2 -1
  9. package/dist/index.d.ts +2 -1
  10. package/dist/robots.d.ts +5 -0
  11. package/dist/rss.d.ts +16 -0
  12. package/dist/serve.d.ts +11 -1
  13. package/dist/sitemap.d.ts +5 -0
  14. package/dist/src/index.js +1 -1
  15. package/dist/template-loader.d.ts +5 -3
  16. package/dist/templates/blocks/alerts/caution.stx +9 -0
  17. package/dist/templates/blocks/alerts/important.stx +9 -0
  18. package/dist/templates/blocks/alerts/note.stx +9 -0
  19. package/dist/templates/blocks/alerts/tip.stx +9 -0
  20. package/dist/templates/blocks/alerts/warning.stx +9 -0
  21. package/dist/templates/blocks/containers/danger.stx +6 -0
  22. package/dist/templates/blocks/containers/details.stx +6 -0
  23. package/dist/templates/blocks/containers/info.stx +6 -0
  24. package/dist/templates/blocks/containers/raw.stx +3 -0
  25. package/dist/templates/blocks/containers/tip.stx +6 -0
  26. package/dist/templates/blocks/containers/warning.stx +6 -0
  27. package/dist/templates/blocks/inline/code.stx +1 -0
  28. package/dist/templates/blocks/inline/del.stx +1 -0
  29. package/dist/templates/blocks/inline/em.stx +1 -0
  30. package/dist/templates/blocks/inline/mark.stx +1 -0
  31. package/dist/templates/blocks/inline/strong.stx +1 -0
  32. package/dist/templates/blocks/inline/sub.stx +1 -0
  33. package/dist/templates/blocks/inline/sup.stx +1 -0
  34. package/dist/templates/features.stx +20 -0
  35. package/dist/templates/hero.stx +10 -0
  36. package/dist/templates/layout-doc.stx +157 -0
  37. package/dist/templates/layout-home.stx +23 -0
  38. package/dist/templates/layout-page.stx +40 -0
  39. package/dist/templates/page-toc.stx +267 -0
  40. package/dist/templates/sidebar-section.stx +42 -0
  41. package/dist/templates/sidebar.stx +54 -0
  42. package/dist/themes/bun/index.d.ts +34 -0
  43. package/dist/themes/index.d.ts +24 -0
  44. package/dist/themes/vitepress/base.css +549 -0
  45. package/dist/themes/vitepress/code-group.css +121 -0
  46. package/dist/themes/vitepress/custom-block.css +330 -0
  47. package/dist/themes/vitepress/index.d.ts +29 -0
  48. package/dist/themes/vitepress/index.ts +1963 -0
  49. package/dist/themes/vitepress/vars.css +436 -0
  50. package/dist/toc.d.ts +1 -1
  51. package/dist/types.d.ts +86 -5
  52. package/package.json +12 -39
  53. package/dist/chunk-he6c5f4e.js +0 -1354
  54. package/dist/plugin.d.ts +0 -0
package/dist/config.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import type { BunPressOptions } from './types';
2
- // Note: defaultConfig is already exported above on line 7
1
+ import type { BunPressConfig } from './types';
3
2
  // Backward compatibility - simple config getter
4
- export declare function getConfig(): Promise<BunPressOptions>;
3
+ export declare function getConfig(): Promise<BunPressConfig>;
5
4
  // Default configuration
6
5
  export declare const defaultConfig: BunPressConfig;
7
6
  // Load and export the resolved configuration
8
- // eslint-disable-next-line antfu/no-top-level-await
9
- export declare const config: BunPressOptions;
7
+ export declare const config: BunPressConfig;
@@ -1,3 +1,4 @@
1
+ import type { Highlighter as TSHighlighter } from 'ts-syntax-highlighter';
1
2
  /**
2
3
  * Reset the global highlighter instance (useful when changing themes)
3
4
  */
@@ -34,4 +35,4 @@ export declare function prewarmHighlighter(): Promise<void>;
34
35
  /**
35
36
  * Gets the highlighter instance for advanced usage
36
37
  */
37
- export declare function getHighlighterInstance(): Promise<TSHighlighter>;
38
+ export declare function getHighlighterInstance(): Promise<TSHighlighter>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './config';
2
2
  export * from './highlighter';
3
+ // export * from './plugin'
3
4
  export * from './serve';
4
5
  export * from './toc';
5
- export * from './types';
6
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import type { BunPressConfig } from './types';
2
+ /**
3
+ * Generate robots.txt file
4
+ */
5
+ export declare function generateRobotsTxt(outputDir: string, config: BunPressConfig): Promise<void>;
package/dist/rss.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { BunPressConfig } from './types';
2
+ /**
3
+ * Generate RSS feed from markdown files
4
+ */
5
+ export declare function generateRssFeed(docsDir: string, outputDir: string, config: BunPressConfig, rssConfig?: RssFeedConfig): Promise<void>;
6
+ export declare interface RssFeedConfig {
7
+ enabled?: boolean
8
+ title?: string
9
+ description?: string
10
+ author?: string
11
+ email?: string
12
+ language?: string
13
+ filename?: string
14
+ maxItems?: number
15
+ fullContent?: boolean
16
+ }
package/dist/serve.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import { config } from './config';
2
2
  import type { BunPressConfig } from './types';
3
+ /**
4
+ * Wrap content in BunPress documentation layout
5
+ */
6
+ export declare function wrapInLayout(content: string, config: BunPressConfig, currentPath: string, layout?: string): Promise<string>;
7
+ /**
8
+ * Convert markdown to HTML using Bun's built-in markdown parser
9
+ * See: https://bun.com/docs/runtime/markdown
10
+ */
11
+ export declare function markdownToHtml(markdown: string, rootDir?: string): Promise<{ html: string, frontmatter: any }>;
3
12
  /**
4
13
  * Start the BunPress documentation server
5
14
  */
@@ -7,6 +16,7 @@ export declare function startServer(options?: {
7
16
  port?: number
8
17
  root?: string
9
18
  watch?: boolean
19
+ quiet?: boolean
10
20
  config?: BunPressConfig
11
21
  }): Promise<{ server: any, url: string, stop: () => void }>;
12
22
  /**
@@ -17,4 +27,4 @@ export declare function serveCLI(options?: {
17
27
  root?: string
18
28
  watch?: boolean
19
29
  config?: BunPressConfig
20
- }): Promise<void>;
30
+ }): Promise<void>;
@@ -0,0 +1,5 @@
1
+ import type { BunPressConfig } from './types';
2
+ /**
3
+ * Generate XML sitemap from markdown files
4
+ */
5
+ export declare function generateSitemap(docsDir: string, outputDir: string, config: BunPressConfig): Promise<void>;
package/dist/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{A as P,B as Q,C as R,a as t,b as e,c as b,d as g,e as h,f as j,g as k,h as n,i as q,j as s,k as u,l as z,m as A,n as B,o as D,p as E,q as F,r as G,s as H,t as I,u as J,v as K,w as L,x as M,y as N,z as O}from"../chunk-he6c5f4e.js";export{Q as startServer,R as serveCLI,g as resetHighlighter,M as processInlineTocSyntax,s as prewarmHighlighter,h as normalizeLanguage,j as isLanguageSupported,n as highlightCodeSync,k as highlightCode,q as getSyntaxHighlightingStyles,u as getHighlighterInstance,b as getConfig,B as generateUniqueSlug,O as generateTocStyles,P as generateTocScripts,L as generateTocPositions,G as generateTocHtml,K as generateTocData,A as generateSlug,I as generateSidebarTocHtml,H as generateInlineTocHtml,J as generateFloatingTocHtml,F as filterHeadings,D as extractHeadings,N as enhanceHeadingsWithAnchors,z as defaultTocConfig,t as defaultConfig,e as config,E as buildTocHierarchy};
2
+ import{A as K,B as L,C as M,D as N,E as O,F as P,G as Q,H as R,I as S,J as T,K as V,L as W,h as t,i as b,j as e,k as h,l as j,m as k,n as q,o as u,p as v,q as w,r as z,s as B,t as D,u as E,v as F,w as G,x as H,y as I,z as J}from"../chunk-1ymh7yt2.js";export{S as wrapInLayout,V as startServer,W as serveCLI,h as resetHighlighter,O as processInlineTocSyntax,w as prewarmHighlighter,j as normalizeLanguage,T as markdownToHtml,k as isLanguageSupported,u as highlightCodeSync,q as highlightCode,v as getSyntaxHighlightingStyles,z as getHighlighterInstance,e as getConfig,E as generateUniqueSlug,Q as generateTocStyles,R as generateTocScripts,N as generateTocPositions,I as generateTocHtml,M as generateTocData,D as generateSlug,K as generateSidebarTocHtml,J as generateInlineTocHtml,L as generateFloatingTocHtml,H as filterHeadings,F as extractHeadings,P as enhanceHeadingsWithAnchors,B as defaultTocConfig,t as defaultConfig,b as config,G as buildTocHierarchy};
@@ -3,9 +3,11 @@
3
3
  */
4
4
  export declare function loadTemplate(name: string): Promise<string>;
5
5
  /**
6
- * Render a template with data
6
+ * Render a template with data using stx engine.
7
+ * Supports full stx syntax: {{ }}, {!! !!}, @if/@else/@endif,
8
+ * @foreach/@endforeach, @for/@endfor, @include, <script server>, etc.
7
9
  */
8
- export declare function renderTemplate(template: string, data: Record<string, any>): string;
10
+ export declare function renderTemplate(template: string, data: Record<string, any>): Promise<string>;
9
11
  /**
10
12
  * Load and render a template in one step
11
13
  */
@@ -13,4 +15,4 @@ export declare function render(templateName: string, data: Record<string, any>):
13
15
  /**
14
16
  * Clear the template cache (useful for development/hot reloading)
15
17
  */
16
- export declare function clearTemplateCache(): void;
18
+ export declare function clearTemplateCache(): void;
@@ -0,0 +1,9 @@
1
+ <div class="github-alert github-alert-caution">
2
+ <p class="github-alert-title">
3
+ <svg class="github-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>
4
+ Caution
5
+ </p>
6
+ <div class="github-alert-content">
7
+ {{content}}
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="github-alert github-alert-important">
2
+ <p class="github-alert-title">
3
+ <svg class="github-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>
4
+ Important
5
+ </p>
6
+ <div class="github-alert-content">
7
+ {{content}}
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="github-alert github-alert-note">
2
+ <p class="github-alert-title">
3
+ <svg class="github-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>
4
+ Note
5
+ </p>
6
+ <div class="github-alert-content">
7
+ {{content}}
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="github-alert github-alert-tip">
2
+ <p class="github-alert-title">
3
+ <svg class="github-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>
4
+ Tip
5
+ </p>
6
+ <div class="github-alert-content">
7
+ {{content}}
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="github-alert github-alert-warning">
2
+ <p class="github-alert-title">
3
+ <svg class="github-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>
4
+ Warning
5
+ </p>
6
+ <div class="github-alert-content">
7
+ {{content}}
8
+ </div>
9
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="custom-block danger">
2
+ <p class="custom-block-title">{{title}}</p>
3
+ <div class="custom-block-content">
4
+ {{content}}
5
+ </div>
6
+ </div>
@@ -0,0 +1,6 @@
1
+ <details class="custom-block details">
2
+ <summary>{{title}}</summary>
3
+ <div class="custom-block-content">
4
+ {{content}}
5
+ </div>
6
+ </details>
@@ -0,0 +1,6 @@
1
+ <div class="custom-block info">
2
+ <p class="custom-block-title">{{title}}</p>
3
+ <div class="custom-block-content">
4
+ {{content}}
5
+ </div>
6
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="bp-raw">
2
+ {{content}}
3
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="custom-block tip">
2
+ <p class="custom-block-title">{{title}}</p>
3
+ <div class="custom-block-content">
4
+ {{content}}
5
+ </div>
6
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="custom-block warning">
2
+ <p class="custom-block-title">{{title}}</p>
3
+ <div class="custom-block-content">
4
+ {{content}}
5
+ </div>
6
+ </div>
@@ -0,0 +1 @@
1
+ <code>{{content}}</code>
@@ -0,0 +1 @@
1
+ <del>{{content}}</del>
@@ -0,0 +1 @@
1
+ <em>{{content}}</em>
@@ -0,0 +1 @@
1
+ <mark>{{content}}</mark>
@@ -0,0 +1 @@
1
+ <strong>{{content}}</strong>
@@ -0,0 +1 @@
1
+ <sub>{{content}}</sub>
@@ -0,0 +1 @@
1
+ <sup>{{content}}</sup>
@@ -0,0 +1,20 @@
1
+ <div class="VPHomeFeatures" style="padding: 64px 24px; border-top: 1px solid var(--bp-c-divider);">
2
+ <div style="max-width: 1152px; margin: 0 auto;">
3
+ <div class="VPFeatures" style="display: grid; grid-template-columns: repeat(1, 1fr); gap: 24px;">
4
+ {{ items }}
5
+ </div>
6
+ </div>
7
+ </div>
8
+
9
+ <style>
10
+ @media (min-width: 640px) {
11
+ .VPFeatures {
12
+ grid-template-columns: repeat(2, 1fr) !important;
13
+ }
14
+ }
15
+ @media (min-width: 960px) {
16
+ .VPFeatures {
17
+ grid-template-columns: repeat(3, 1fr) !important;
18
+ }
19
+ }
20
+ </style>
@@ -0,0 +1,10 @@
1
+ <div class="VPHomeHero" style="position: relative; padding: 32px 24px 0;">
2
+ <div style="max-width: 1152px; margin: 0 auto; padding: 48px 0 64px;">
3
+ <div class="VPHomeHeroInfo" style="max-width: 592px;">
4
+ {{ name }}
5
+ {{ text }}
6
+ {{ tagline }}
7
+ {{ actions }}
8
+ </div>
9
+ </div>
10
+ </div>
@@ -0,0 +1,157 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{ title }}</title>
7
+ <meta name="description" content="{{ description }}">
8
+ {!! meta !!}
9
+ <style>
10
+ /* VitePress Theme CSS */
11
+ {!! customCSS !!}
12
+ </style>
13
+ </head>
14
+ <body>
15
+ <div class="Layout">
16
+ <!-- VPNav - Header -->
17
+ <header class="VPNav" style="position: fixed; top: 0; left: 0; right: 0; height: var(--bp-nav-height, 64px); background-color: var(--bp-nav-bg-color, var(--bp-c-bg)); border-bottom: 1px solid var(--bp-c-divider); z-index: var(--bp-z-index-nav, 30);">
18
+ <div style="max-width: var(--bp-layout-max-width, 1440px); margin: 0 auto; width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 24px;">
19
+ <!-- Left side: Logo/Title + Search -->
20
+ <div style="display: flex; align-items: center; gap: 24px; flex: 1; min-width: 0;">
21
+ <a href="/" class="VPNavBarTitle" style="font-size: 16px; font-weight: 600; color: var(--bp-c-text-1); white-space: nowrap; text-decoration: none;">{{ title }}</a>
22
+ <div class="VPNavBarSearch" style="position: relative; display: flex; align-items: center; max-width: 260px; width: 100%;">
23
+ <svg style="position: absolute; left: 12px; width: 16px; height: 16px; color: var(--bp-c-text-3);" fill="none" stroke="currentColor" viewBox="0 0 24 24">
24
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
25
+ </svg>
26
+ <input type="text" placeholder="Search" style="width: 100%; height: 32px; padding-left: 36px; padding-right: 48px; font-size: 13px; background-color: var(--bp-c-bg-alt); border: 1px solid var(--bp-c-divider); border-radius: 4px; color: var(--bp-c-text-1); outline: none; transition: border-color 0.25s, background-color 0.25s;" />
27
+ <kbd style="position: absolute; right: 8px; padding: 2px 6px; font-size: 11px; font-weight: 600; color: var(--bp-c-text-3); background-color: var(--bp-c-bg); border: 1px solid var(--bp-c-divider); border-radius: 4px;">⌘ K</kbd>
28
+ </div>
29
+ </div>
30
+
31
+ <!-- Right side: Navigation + Icons -->
32
+ <div style="display: flex; align-items: center; gap: 24px;">
33
+ {!! nav !!}
34
+ <div class="VPSocialLinks" style="display: flex; align-items: center; gap: 12px; padding-left: 24px; border-left: 1px solid var(--bp-c-divider);">
35
+ <!-- Theme Toggle -->
36
+ <button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle dark mode" title="Toggle dark mode">
37
+ <svg class="sun-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
38
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
39
+ </svg>
40
+ <svg class="moon-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
41
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
42
+ </svg>
43
+ </button>
44
+ <a href="https://github.com/stacksjs/bunpress" target="_blank" style="color: var(--bp-c-text-2); transition: color 0.25s;" onmouseover="this.style.color='var(--bp-c-text-1)'" onmouseout="this.style.color='var(--bp-c-text-2)'">
45
+ <svg style="width: 20px; height: 20px;" fill="currentColor" viewBox="0 0 24 24">
46
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
47
+ </svg>
48
+ </a>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </header>
53
+
54
+ <!-- VPSidebar -->
55
+ {!! sidebar !!}
56
+
57
+ <!-- VPContent - Main content area -->
58
+ <main class="VPContent" style="position: fixed; top: var(--bp-nav-height, 64px); bottom: 0; overflow-y: auto; left: max(var(--bp-sidebar-width, 272px), calc((100vw - var(--bp-layout-max-width, 1440px)) / 2 + var(--bp-sidebar-width, 272px))); right: max(0px, calc((100vw - var(--bp-layout-max-width, 1440px)) / 2));">
59
+ <div class="VPDoc" style="padding: 32px 24px; padding-right: 32px;">
60
+ <div class="VPDocContent" style="max-width: 768px; margin: 0;">
61
+ <article class="bp-doc">
62
+ {!! content !!}
63
+ </article>
64
+ </div>
65
+ </div>
66
+ </main>
67
+
68
+ <!-- Copy Page Dropdown (positioned via JS next to H1) -->
69
+ <div class="copy-page-dropdown" id="copy-page-dropdown">
70
+ <div class="copy-page-button-group">
71
+ <button class="copy-page-button copy-page-main" onclick="copyPageDirect(event)" aria-label="Copy page as markdown">
72
+ <svg class="copy-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
73
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
74
+ </svg>
75
+ <svg class="check-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="display: none;">
76
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
77
+ </svg>
78
+ <span class="button-text">Copy page</span>
79
+ </button>
80
+ <button class="copy-page-button copy-page-toggle" onclick="toggleCopyPageDropdown(event)" aria-label="More copy options">
81
+ <svg class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
82
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
83
+ </svg>
84
+ </button>
85
+ </div>
86
+ <div class="copy-page-menu">
87
+ <!-- Copy page as Markdown -->
88
+ <div class="copy-page-menu-item" onclick="copyPageAsMarkdown(event)">
89
+ <div class="icon">
90
+ <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
91
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
92
+ </svg>
93
+ </div>
94
+ <div class="content">
95
+ <div class="title">Copy page</div>
96
+ <div class="description">Copy page as Markdown for LLMs</div>
97
+ </div>
98
+ </div>
99
+ <!-- View as Markdown -->
100
+ <div class="copy-page-menu-item" onclick="viewAsMarkdown(event)">
101
+ <div class="icon">
102
+ <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
103
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
104
+ </svg>
105
+ </div>
106
+ <div class="content">
107
+ <div class="title">View as Markdown <svg class="external-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg></div>
108
+ <div class="description">View this page as plain text</div>
109
+ </div>
110
+ </div>
111
+ <div class="copy-page-menu-divider"></div>
112
+ <!-- Open in ChatGPT -->
113
+ <a class="copy-page-menu-item" onclick="openInChatGPT(event)" href="#">
114
+ <div class="icon">
115
+ <svg viewBox="0 0 24 24" fill="currentColor">
116
+ <path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/>
117
+ </svg>
118
+ </div>
119
+ <div class="content">
120
+ <div class="title">Open in ChatGPT <svg class="external-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg></div>
121
+ <div class="description">Copy content and open ChatGPT</div>
122
+ </div>
123
+ </a>
124
+ <!-- Open in Claude -->
125
+ <a class="copy-page-menu-item" onclick="openInClaude(event)" href="#">
126
+ <div class="icon">
127
+ <svg viewBox="0 0 24 24" fill="currentColor">
128
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>
129
+ </svg>
130
+ </div>
131
+ <div class="content">
132
+ <div class="title">Open in Claude <svg class="external-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg></div>
133
+ <div class="description">Copy content and open Claude</div>
134
+ </div>
135
+ </a>
136
+ <!-- Open in Perplexity -->
137
+ <a class="copy-page-menu-item" onclick="openInPerplexity(event)" href="#">
138
+ <div class="icon">
139
+ <svg viewBox="0 0 24 24" fill="currentColor">
140
+ <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/>
141
+ </svg>
142
+ </div>
143
+ <div class="content">
144
+ <div class="title">Open in Perplexity <svg class="external-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg></div>
145
+ <div class="description">Search with Perplexity AI</div>
146
+ </div>
147
+ </a>
148
+ </div>
149
+ </div>
150
+
151
+ <!-- VPDocAside - TOC -->
152
+ {!! pageTOC !!}
153
+ </div>
154
+
155
+ {!! scripts !!}
156
+ </body>
157
+ </html>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{ title }}</title>
7
+ <meta name="description" content="{{ description }}">
8
+ {!! meta !!}
9
+ <style>
10
+ /* VitePress Theme CSS */
11
+ {!! customCSS !!}
12
+ </style>
13
+ </head>
14
+ <body>
15
+ <div class="Layout">
16
+ <main class="VPHome">
17
+ {!! content !!}
18
+ </main>
19
+ </div>
20
+
21
+ {!! scripts !!}
22
+ </body>
23
+ </html>
@@ -0,0 +1,40 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{ title }}</title>
7
+ <meta name="description" content="{{ description }}">
8
+ {!! meta !!}
9
+ <style>
10
+ /* VitePress Theme CSS */
11
+ {!! customCSS !!}
12
+ </style>
13
+ </head>
14
+ <body>
15
+ <div class="Layout">
16
+ <!-- VPNav - Header -->
17
+ <header class="VPNav" style="position: fixed; top: 0; left: 0; right: 0; height: var(--bp-nav-height, 64px); background-color: var(--bp-nav-bg-color, var(--bp-c-bg)); border-bottom: 1px solid var(--bp-c-divider); z-index: var(--bp-z-index-nav, 30);">
18
+ <div style="max-width: var(--bp-layout-max-width, 1440px); margin: 0 auto; width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 24px;">
19
+ <div style="display: flex; align-items: center; gap: 24px; flex: 1; min-width: 0;">
20
+ <a href="/" class="VPNavBarTitle" style="font-size: 16px; font-weight: 600; color: var(--bp-c-text-1); white-space: nowrap; text-decoration: none;">{{ title }}</a>
21
+ </div>
22
+ <div style="display: flex; align-items: center; gap: 24px;">
23
+ {!! nav !!}
24
+ </div>
25
+ </div>
26
+ </header>
27
+
28
+ <!-- VPContent - Full-width content without sidebar -->
29
+ <main class="VPContent" style="padding-top: var(--bp-nav-height, 64px);">
30
+ <div class="VPPage" style="padding: 48px 24px; max-width: 768px; margin: 0 auto;">
31
+ <article class="bp-doc">
32
+ {!! content !!}
33
+ </article>
34
+ </div>
35
+ </main>
36
+ </div>
37
+
38
+ {!! scripts !!}
39
+ </body>
40
+ </html>