@clarusjs/content 0.9.0 → 0.9.1

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/dist/index.d.ts CHANGED
@@ -57,7 +57,7 @@ export type MarkdownOptions = {
57
57
  * Number the lines of every code block except shell commands (sh, bash, shell, zsh, console, powershell, ps1): a
58
58
  * command is copied, not referred to by line. A shell script is numbered: a block with a file title
59
59
  * (```bash [deploy.sh]) or a `#!` first line. `:no-line-numbers` turns one block off, `:line-numbers` one on.
60
- * @see https://clarusjs.com/guide/markdown#code
60
+ * @see https://clarusjs.com/docs-sites/code-blocks#code
61
61
  */
62
62
  lineNumbers?: boolean;
63
63
  /**
@@ -65,7 +65,7 @@ export type MarkdownOptions = {
65
65
  * ```` ```rust ````, ```` ```py ````), from this package's own Shiki (nothing to install). Add grammars of your own
66
66
  * here, or names of Shiki's (`markdown({ langs: ['rust'] })`) to load them up front, where a typo is a build error.
67
67
  * A language Shiki doesn't have is plain text.
68
- * @see https://clarusjs.com/guide/markdown#code
68
+ * @see https://clarusjs.com/docs-sites/code-blocks#code
69
69
  */
70
70
  langs?: (string | LanguageRegistration | LanguageRegistration[])[];
71
71
  /** `::: quiz` is for lessons (frontmatter `steps: true`); 'everywhere' allows it on any page. */
@@ -75,7 +75,7 @@ export type MarkdownOptions = {
75
75
  * one per folder under src/pages (`{ 'guide/**': Guide, 'blog/*.md': Post }`, the first matching glob wins). A
76
76
  * page that doesn't match fails the build; the schema's output (defaults, coercions) is what the page gets.
77
77
  * Synchronous schemas only.
78
- * @see https://clarusjs.com/guide/markdown#frontmatter-schemas
78
+ * @see https://clarusjs.com/docs-sites/frontmatter
79
79
  */
80
80
  /**
81
81
  * Folders of components a page can use by tag without importing them: `'/src/components'` (root-relative), or
package/dist/index.js CHANGED
@@ -232,7 +232,7 @@ function renderer(options) {
232
232
  const lang = /^[^\s{[:]+/.exec(info)?.[0] ?? 'text';
233
233
  if (options.mermaid && lang === 'mermaid' && !e.group) {
234
234
  e.tags.push(`<${options.mermaid.tag} attach="visible" />`);
235
- return `<div class="mermaid-diagram"><pre class="mermaid" tabindex="0">${inert(tokens[i].content.replace(/\n$/, ''))}</pre><!--cl-tag-${e.tags.length - 1}--></div>\n`;
235
+ return `<div class="mermaid-diagram"><!--cl-tag-${e.tags.length - 1}--><pre class="mermaid" tabindex="0">${inert(tokens[i].content.replace(/\n$/, ''))}</pre></div>\n`;
236
236
  }
237
237
  const title = /\[([^\]]+)\]/.exec(info)?.[1];
238
238
  const code = tokens[i].content;
@@ -17,6 +17,6 @@ export declare function highlightBlocks(source: string, warn?: (message: string)
17
17
  *
18
18
  * export default defineConfig({ plugins: [highlightTemplates(), clarusjs({ sources: [markdown()] })] })
19
19
  * ```
20
- * @see https://clarusjs.com/guide/markdown#code-in-templates
20
+ * @see https://clarusjs.com/docs-sites/code-blocks#code-in-templates
21
21
  */
22
22
  export declare function highlightTemplates(): Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clarusjs/content",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Markdown pages for clarusjs: frontmatter, layouts, components in Markdown, rendered to static HTML at build time.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "access": "public"
20
20
  },
21
21
  "peerDependencies": {
22
- "clarusjs": "^0.20.0"
22
+ "clarusjs": "^0.21.0"
23
23
  },
24
24
  "engines": {
25
25
  "node": "^22.12.0 || ^24.0.0 || >=26.0.0"
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@types/markdown-it": "^14.2.0",
52
52
  "@types/node": "^26.6.11",
53
- "clarusjs": "^0.20.0",
53
+ "clarusjs": "^0.21.0",
54
54
  "typescript": "^7.0.2",
55
55
  "vite": "^8.4.0",
56
56
  "vitest": "^5.1.2"