@dreamlake/dockit 0.2.3 → 0.2.4

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.
@@ -54,9 +54,10 @@ function Sidebar() {
54
54
  className: "hidden md:flex sticky overflow-y-auto flex-col",
55
55
  style: { top: 40, height: "calc(100vh - 40px)", padding: "22px 12px 32px 18px", gap: 2 },
56
56
  children: groups.map((group) => {
57
- const isFolded = group.label ? collapsed.has(group.label) : false;
57
+ const soleSection = groups.length === 1;
58
+ const isFolded = !soleSection && group.label ? collapsed.has(group.label) : false;
58
59
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", style: { gap: 1, marginBottom: isFolded ? 4 : 14, transition: "margin-bottom 0.2s ease" }, children: [
59
- group.label && /* @__PURE__ */ jsxs(
60
+ group.label && !soleSection && /* @__PURE__ */ jsxs(
60
61
  "button",
61
62
  {
62
63
  type: "button",
@@ -96,7 +96,7 @@ function HeadSync() {
96
96
  tag.remove();
97
97
  }
98
98
  let robotsTag = document.querySelector('meta[name="robots"]');
99
- if (current?.noindex) {
99
+ if (current?.noindex || siteConfig.indexable !== true) {
100
100
  if (!robotsTag) {
101
101
  robotsTag = document.createElement("meta");
102
102
  robotsTag.name = "robots";
@@ -32,7 +32,7 @@ async function onRenderHtml(pageContext) {
32
32
  <link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap" rel="stylesheet" />
33
33
  <title>${title}</title>
34
34
  ${description ? escapeInject`<meta name="description" content="${description}" />` : ""}
35
- ${current?.noindex ? escapeInject`<meta name="robots" content="noindex, nofollow" />` : ""}
35
+ ${current?.noindex || siteConfig.indexable !== true ? escapeInject`<meta name="robots" content="noindex, nofollow" />` : ""}
36
36
  ${mdHref ? escapeInject`<link rel="alternate" type="text/markdown" href="${mdHref}" />` : ""}
37
37
  </head>
38
38
  <body>
@@ -69,6 +69,12 @@ export interface SiteConfig {
69
69
  * — http(s), protocol-relative, or absolute-path; anything else is
70
70
  * silently dropped. */
71
71
  headScripts?: string[];
72
+ /** Search-engine visibility. DEFAULT FALSE per org policy: every page
73
+ * gets `<meta name="robots" content="noindex, nofollow">` unless a site
74
+ * explicitly opts in with `indexable: true`. Page-level `noindex`
75
+ * frontmatter still applies on indexable sites. The site's own pagefind
76
+ * search and the llms/skill surfaces are unaffected. */
77
+ indexable?: boolean;
72
78
  }
73
79
  export declare const siteConfig: SiteConfig;
74
80
  /** Merge site-provided values into the singleton (mutates in place). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dockit",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "The DreamLake documentation shell — Vike + React + Tailwind v4 + MDX docs framework with sidebar, TOC, search, and theming",
5
5
  "license": "MIT",
6
6
  "type": "module",