@sleekcms/sync 4.0.0 → 4.1.0

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.
package/README.md CHANGED
@@ -414,7 +414,7 @@ Content lives in `src/content/` as plain JSON. Edit any content file and save
414
414
 
415
415
  ## Site setup (`src/setup.json`)
416
416
 
417
- Site-wide decisions made once — the default page title, whether Tailwind is compiled, whether a sitemap is published, the cookie consent switch, and analytics tag ids — live in `src/setup.json`, mirrored from **Settings → Website** in the CMS. The file is JSON with a comment above each key explaining it:
417
+ Site-wide decisions made once — the default page title, whether Tailwind is compiled, whether a sitemap is published, the cookie consent switch, the chat bot switch, and analytics tag ids — live in `src/setup.json`, mirrored from **Settings → Website** in the CMS. The file is JSON with a comment above each key explaining it:
418
418
 
419
419
  ```json5
420
420
  {
@@ -422,6 +422,7 @@ Site-wide decisions made once — the default page title, whether Tailwind is co
422
422
  tw_enabled: true, // compile src/public/css/tailwind.css and inject it into every page
423
423
  sitemap_enabled: false, // publish sitemap.xml + robots.txt on every build
424
424
  cookie_consent: false, // consent banner; holds analytics + data-sleekcms-consent scripts until accepted
425
+ chat_enabled: false, // chat bot on every page, answering from the site's published pages
425
426
  analytics: { // tag ids injected into every page; include only the ones you use
426
427
  ga4: "G-XXXXXXXXXX",
427
428
  },
package/dist/AGENTS.md CHANGED
@@ -118,6 +118,7 @@ setup.json Site setup (JSON, comments allowed): default pag
118
118
  | `tw_enabled` | boolean | `true` compiles `css/tailwind.css` and injects it into every page — required for any site styled with Tailwind utilities. |
119
119
  | `sitemap_enabled` | boolean | `true` publishes `sitemap.xml` + `robots.txt` on every build. Turn it on for public sites and SEO work. |
120
120
  | `cookie_consent` | boolean | `true` injects a consent banner into every page and holds the analytics tags, plus any script or iframe tagged `data-sleekcms-consent`, until the visitor accepts its category. A toggle only — banner text, position and styling are authored in HTML (§14). |
121
+ | `chat_enabled` | boolean | `true` adds the chat bot to every published page; it answers visitor questions from the site's published pages (re-read on every publish). A toggle only — the welcome message, knowledge files and instructions are managed in the CMS. `false` removes it from the next publish and stops open chats right away. |
121
122
  | `analytics` | object | Marketing/analytics tag ids injected into every published page. |
122
123
 
123
124
  `analytics` is a flat map — include only the keys the site uses:
@@ -203,7 +204,7 @@ Like JSON but with **no quotes**; each value is a field type name:
203
204
  |---|---|
204
205
  | `text`, `paragraph`, `code`, `color`, `link` | String |
205
206
  | `richtext` | String of **HTML** — output with `<%- %>` |
206
- | `markdown` | String of **raw markdown** — convert with `<%- remark(item.x) %>` (see Helpers — rendering) |
207
+ | `markdown` | String of **raw markdown** — convert with `<%- remark(item.x) %>`, which renders GFM (tables, task lists, footnotes), syntax-highlighted code fences, math (`$…$`, `$$…$$`) and ```` ```mermaid ```` diagrams as SVG (see Helpers — rendering) |
207
208
  | `number` | Number |
208
209
  | `boolean` | `true` / `false` |
209
210
  | `emoji` | One emoji character string, e.g. `"😀"` (not free text) |
@@ -405,11 +406,11 @@ There is exactly **one** layout: `layouts/common.ejs`. It wraps every page autom
405
406
  | `render(val, separator?)` | Render a block, entry, or array of them through its `blocks/<key>.ejs` / `entries/<key>.ejs` view. An `entries/<key>.ejs` view is only needed if you call `render()` on that entry — otherwise just use its data directly |
406
407
  | `remark(md, opts?)` | Markdown string → HTML string, with build-time highlighted code blocks, math and Mermaid diagrams (below) |
407
408
 
408
- Render every `markdown` field with `remark()`, whatever it holds today — editors add code, math and diagrams later; plain prose comes out as ordinary HTML with nothing injected. On top of standard markdown (including GFM tables, task lists and footnotes) it renders fenced code blocks (```` ```js ````) with syntax highlighting at build time, math written as `$e^{i\pi} + 1 = 0$` inline, `$$ … $$` on its own lines or a ```` ```math ```` fence (KaTeX), and ```` ```mermaid ```` fences as diagrams drawn in the visitor's browser. It injects only the CSS/JS the rendered markdown needs (KaTeX CSS, the code theme, the Mermaid runtime). **Never rebuild any of it yourself:** no highlight.js, Prism, KaTeX or Mermaid via `link()`/`script()`, and no `public/js` that highlights `pre code`, converts `language-mermaid` blocks or renders math.
409
+ Render every `markdown` field with `remark()`, whatever it holds today — editors add code, math and diagrams later; plain prose comes out as ordinary HTML with nothing injected. On top of standard markdown (including GFM tables, task lists and footnotes) it renders fenced code blocks (```` ```js ````) with syntax highlighting at build time, math written as `$e^{i\pi} + 1 = 0$` inline, `$$ … $$` on its own lines or a ```` ```math ```` fence (KaTeX), and ```` ```mermaid ```` fences as diagrams, drawn as SVG at build time. It injects only the CSS/JS the rendered markdown needs (KaTeX CSS, the code theme, the diagram styles). **Never rebuild any of it yourself:** no highlight.js, Prism, KaTeX or Mermaid via `link()`/`script()`, and no `public/js` that highlights `pre code`, converts `language-mermaid` blocks or renders math.
409
410
 
410
411
  - `opts.codeTheme` — a highlight.js theme name: default `github-dark`, or e.g. `github`, `atom-one-dark`, `base16/dracula`. The theme sets the token colors and the code box's background together, so pick code colors with `codeTheme`, never CSS: don't restyle `.hljs` / `pre code` colors or backgrounds, and don't clear `pre`'s background (`prose-pre:bg-transparent`) — a dark theme's light text on a light page all but disappears. `github-dark` suits the dark `pre` that `prose` draws; use `github` only when the design wants light code blocks. One theme per page.
411
412
  - A single-`$` pair is math only when it hugs its content (`$x^2$`), so prices like "$5 to $10" stay text. Escape a dollar that must stay literal as `\$`.
412
- - Mermaid uses its light default theme. On a dark design, start each diagram with frontmatter: `---`, `config:`, ` theme: dark`, `---` on their own lines above the diagram.
413
+ - Diagrams use Mermaid syntax (flowchart, sequence, class, state, ER, Gantt, pie and the other built-in types) and match the page's light or dark design on their own: don't style or theme them (no `theme` config, no CSS). Labels are plain text — no HTML.
413
414
 
414
415
  ```ejs
415
416
  <div class="prose prose-lg max-w-none"><%- remark(item.body) %></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleekcms/sync",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "Edit SleekCMS sites locally — models, content, templates, images — with live two-way sync and AI agent support.",
5
5
  "keywords": [
6
6
  "sleekcms",