doccupine 0.0.134 → 0.0.136

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 (85) hide show
  1. package/README.md +11 -9
  2. package/dist/index.js +282 -46
  3. package/dist/lib/metadata.d.ts +5 -0
  4. package/dist/lib/metadata.js +15 -4
  5. package/dist/lib/rss.d.ts +24 -0
  6. package/dist/lib/rss.js +137 -0
  7. package/dist/lib/structures.js +22 -2
  8. package/dist/templates/app/rssRoute.d.ts +11 -0
  9. package/dist/templates/app/rssRoute.js +30 -0
  10. package/dist/templates/components/Docs.d.ts +1 -1
  11. package/dist/templates/components/Docs.js +5 -2
  12. package/dist/templates/components/MDXComponents.d.ts +1 -1
  13. package/dist/templates/components/MDXComponents.js +29 -0
  14. package/dist/templates/components/SideBar.d.ts +1 -1
  15. package/dist/templates/components/SideBar.js +5 -2
  16. package/dist/templates/components/layout/ActionBar.d.ts +1 -1
  17. package/dist/templates/components/layout/ActionBar.js +44 -13
  18. package/dist/templates/components/layout/ApiPlayground.d.ts +1 -1
  19. package/dist/templates/components/layout/ApiPlayground.js +20 -28
  20. package/dist/templates/components/layout/Badge.d.ts +1 -0
  21. package/dist/templates/components/layout/Badge.js +455 -0
  22. package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
  23. package/dist/templates/components/layout/DocsComponents.js +5 -30
  24. package/dist/templates/components/layout/Prompt.d.ts +1 -0
  25. package/dist/templates/components/layout/Prompt.js +149 -0
  26. package/dist/templates/components/layout/Tooltip.d.ts +1 -0
  27. package/dist/templates/components/layout/Tooltip.js +222 -0
  28. package/dist/templates/components/layout/Tree.d.ts +1 -0
  29. package/dist/templates/components/layout/Tree.js +322 -0
  30. package/dist/templates/components/layout/TreeData.d.ts +1 -0
  31. package/dist/templates/components/layout/TreeData.js +131 -0
  32. package/dist/templates/components/layout/Update.d.ts +1 -1
  33. package/dist/templates/components/layout/Update.js +3 -0
  34. package/dist/templates/lib/rss.d.ts +1 -0
  35. package/dist/templates/lib/rss.js +83 -0
  36. package/dist/templates/mdx/accordion.mdx.d.ts +1 -1
  37. package/dist/templates/mdx/accordion.mdx.js +1 -1
  38. package/dist/templates/mdx/api-playground.mdx.d.ts +1 -1
  39. package/dist/templates/mdx/api-playground.mdx.js +1 -1
  40. package/dist/templates/mdx/badges.mdx.d.ts +1 -0
  41. package/dist/templates/mdx/badges.mdx.js +237 -0
  42. package/dist/templates/mdx/buttons.mdx.d.ts +1 -1
  43. package/dist/templates/mdx/buttons.mdx.js +1 -1
  44. package/dist/templates/mdx/callouts.mdx.d.ts +1 -1
  45. package/dist/templates/mdx/callouts.mdx.js +1 -1
  46. package/dist/templates/mdx/cards.mdx.d.ts +1 -1
  47. package/dist/templates/mdx/cards.mdx.js +1 -1
  48. package/dist/templates/mdx/color-swatches.mdx.d.ts +1 -1
  49. package/dist/templates/mdx/color-swatches.mdx.js +1 -1
  50. package/dist/templates/mdx/columns.mdx.d.ts +1 -1
  51. package/dist/templates/mdx/columns.mdx.js +1 -1
  52. package/dist/templates/mdx/components.mdx.d.ts +1 -1
  53. package/dist/templates/mdx/components.mdx.js +14 -2
  54. package/dist/templates/mdx/fields.mdx.d.ts +1 -1
  55. package/dist/templates/mdx/fields.mdx.js +1 -1
  56. package/dist/templates/mdx/frames.mdx.d.ts +1 -1
  57. package/dist/templates/mdx/frames.mdx.js +1 -1
  58. package/dist/templates/mdx/icons.mdx.d.ts +1 -1
  59. package/dist/templates/mdx/icons.mdx.js +1 -1
  60. package/dist/templates/mdx/image-and-embeds.mdx.d.ts +1 -1
  61. package/dist/templates/mdx/image-and-embeds.mdx.js +1 -1
  62. package/dist/templates/mdx/images-and-embeds.mdx.d.ts +1 -0
  63. package/dist/templates/mdx/images-and-embeds.mdx.js +118 -0
  64. package/dist/templates/mdx/mermaid.mdx.d.ts +1 -1
  65. package/dist/templates/mdx/mermaid.mdx.js +1 -1
  66. package/dist/templates/mdx/navigation.mdx.d.ts +1 -1
  67. package/dist/templates/mdx/navigation.mdx.js +5 -1
  68. package/dist/templates/mdx/prompt.mdx.d.ts +1 -0
  69. package/dist/templates/mdx/prompt.mdx.js +69 -0
  70. package/dist/templates/mdx/steps.mdx.d.ts +1 -1
  71. package/dist/templates/mdx/steps.mdx.js +1 -1
  72. package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
  73. package/dist/templates/mdx/tabs.mdx.js +1 -1
  74. package/dist/templates/mdx/tooltips.mdx.d.ts +1 -0
  75. package/dist/templates/mdx/tooltips.mdx.js +57 -0
  76. package/dist/templates/mdx/tree.mdx.d.ts +1 -0
  77. package/dist/templates/mdx/tree.mdx.js +158 -0
  78. package/dist/templates/mdx/update.mdx.d.ts +1 -1
  79. package/dist/templates/mdx/update.mdx.js +42 -2
  80. package/dist/templates/package.js +1 -1
  81. package/package.json +2 -2
  82. package/dist/templates/mdx/platform/external-links.mdx.d.ts +0 -1
  83. package/dist/templates/mdx/platform/external-links.mdx.js +0 -47
  84. package/dist/templates/utils/apiAnchors.d.ts +0 -1
  85. package/dist/templates/utils/apiAnchors.js +0 -39
@@ -4,7 +4,8 @@ description: "Easily manage and present change history."
4
4
  date: "2026-02-19"
5
5
  category: "Components"
6
6
  categoryOrder: 1
7
- order: 16
7
+ order: 20
8
+ rss: true
8
9
  ---
9
10
  # Update
10
11
 
@@ -48,17 +49,56 @@ You can combine multiple \`Update\` components to build complete changelogs.
48
49
  </Update>
49
50
  \`\`\`
50
51
 
52
+ ## Subscribable changelogs
53
+
54
+ Every page that contains at least one \`Update\` component automatically publishes an RSS feed at its page URL with \`/rss.xml\` appended. For example, this page's feed lives at \`/update/rss.xml\`.
55
+
56
+ Each \`Update\` becomes a feed entry: the \`label\` is the entry title, and the entry link deep-links to the update's anchor on the page. New entries reach subscribers as soon as the site is rebuilt with new \`Update\` components.
57
+
58
+ Feed entries contain pure Markdown only. They exclude components, code, and HTML elements. Use the \`rss\` property to provide alternative text for feed readers when an update consists mostly of excluded content:
59
+
60
+ \`\`\`html
61
+ <Update label="v0.0.2" rss="Added dark mode and fixed sidebar links.">
62
+ <Frame>![Dark mode](https://docs.doccupine.com/demo.png)</Frame>
63
+ </Update>
64
+ \`\`\`
65
+
66
+ The feed's channel title and description come from the page frontmatter, falling back to the site name and description from \`config.json\`. RSS feeds are only available on public documentation - password-protected sites do not expose them.
67
+
68
+ RSS feeds can integrate with Slack, email, or other subscription tools to notify readers of changes. Some options include:
69
+
70
+ - [Slack](https://slack.com/help/articles/218688467-Add-RSS-feeds-to-Slack)
71
+ - [Email](https://zapier.com/apps/email/integrations/rss/1441/send-new-rss-feed-entries-via-email) via Zapier
72
+ - Discord bots like [Readybot](https://readybot.io)
73
+
74
+ ## RSS button
75
+
76
+ To make the feed discoverable, add \`rss: true\` to the page frontmatter. This displays an RSS button at the top of the page that links to the feed - this page shows one. The button only appears when the page actually contains \`Update\` components.
77
+
78
+ \`\`\`yaml
79
+ ---
80
+ rss: true
81
+ ---
82
+ \`\`\`
83
+
51
84
  ## Properties
52
85
 
53
86
  <Field value="label" type="string" required>
54
87
  The label of the update. It also appears in the page's "On this page"
55
- navigation and acts as a deep-link anchor to this entry.
88
+ navigation, acts as a deep-link anchor to this entry, and becomes the entry
89
+ title in the page's RSS feed.
56
90
  </Field>
57
91
 
58
92
  <Field value="description" type="string">
59
93
  An optional description for the update. When omitted, no description is shown.
60
94
  </Field>
61
95
 
96
+ <Field value="rss" type="string">
97
+ Alternative pure-Markdown text for this entry in the page's RSS feed. When
98
+ omitted, the feed uses the entry content with components, code, and HTML
99
+ removed. Never rendered on the page.
100
+ </Field>
101
+
62
102
  <Field value="children" type="node" required>
63
103
  The content of the update.
64
104
  </Field>`;
@@ -50,7 +50,7 @@ export const packageJsonTemplate = JSON.stringify({
50
50
  "eslint-plugin-jsx-a11y": "^6.10.2",
51
51
  "eslint-plugin-react": "^7.37.5",
52
52
  "eslint-plugin-react-hooks": "^7.1.1",
53
- globals: "^17.7.0",
53
+ globals: "^17.8.0",
54
54
  prettier: "^3.9.6",
55
55
  tsx: "^4.23.1",
56
56
  typescript: "npm:@typescript/typescript6@^6.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doccupine",
3
- "version": "0.0.134",
3
+ "version": "0.0.136",
4
4
  "description": "Free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -35,7 +35,7 @@
35
35
  "license": "SEE LICENSE IN LICENSE",
36
36
  "dependencies": {
37
37
  "@readme/openapi-parser": "^6.3.0",
38
- "chalk": "^5.6.2",
38
+ "chalk": "^6.0.0",
39
39
  "chokidar": "^5.0.0",
40
40
  "commander": "^15.0.0",
41
41
  "fs-extra": "^11.4.0",
@@ -1 +0,0 @@
1
- export declare const platformExternalLinksMdxTemplate = "---\ntitle: \"External Links\"\ndescription: \"Add quick-access link buttons to your site's footer for GitHub, Discord, and other external resources.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 5\nsection: \"Platform\"\n---\n# External Links\n\nThe External Links settings page lets you add external link buttons to your documentation site's footer. These provide quick access to your project's GitHub repository, Discord server, social profiles, and other resources.\n\n## Adding a link\n\nClick **Add Link** and configure:\n\n- **Icon** (optional) - search and pick from any [Lucide](https://lucide.dev/) icon\n- **Title** - the display text for the link\n- **URL** - the target URL\n\n## Choosing an icon\n\nThe icon picker lets you search through the full [Lucide](https://lucide.dev/) icon set. Type a keyword to filter (e.g. \"git-branch\", \"mail\", \"globe\") and click to select.\n\nLeave the icon unset for a text-only link.\n\nIf you edit `links.json` directly, use Lucide icon names in kebab-case (e.g. `git-branch`, `message-circle`, `heart`).\n\n## How it works\n\nLink settings are stored in `links.json` at the root of your repository:\n\n```json\n[\n {\n \"title\": \"GitHub\",\n \"url\": \"https://github.com/your-org/your-repo\",\n \"icon\": \"git-branch\"\n },\n {\n \"title\": \"Discord\",\n \"url\": \"https://discord.gg/your-invite\",\n \"icon\": \"discord\"\n }\n]\n```";
@@ -1,47 +0,0 @@
1
- export const platformExternalLinksMdxTemplate = `---
2
- title: "External Links"
3
- description: "Add quick-access link buttons to your site's footer for GitHub, Discord, and other external resources."
4
- date: "2026-02-19"
5
- category: "Configuration"
6
- categoryOrder: 2
7
- order: 5
8
- section: "Platform"
9
- ---
10
- # External Links
11
-
12
- The External Links settings page lets you add external link buttons to your documentation site's footer. These provide quick access to your project's GitHub repository, Discord server, social profiles, and other resources.
13
-
14
- ## Adding a link
15
-
16
- Click **Add Link** and configure:
17
-
18
- - **Icon** (optional) - search and pick from any [Lucide](https://lucide.dev/) icon
19
- - **Title** - the display text for the link
20
- - **URL** - the target URL
21
-
22
- ## Choosing an icon
23
-
24
- The icon picker lets you search through the full [Lucide](https://lucide.dev/) icon set. Type a keyword to filter (e.g. "git-branch", "mail", "globe") and click to select.
25
-
26
- Leave the icon unset for a text-only link.
27
-
28
- If you edit \`links.json\` directly, use Lucide icon names in kebab-case (e.g. \`git-branch\`, \`message-circle\`, \`heart\`).
29
-
30
- ## How it works
31
-
32
- Link settings are stored in \`links.json\` at the root of your repository:
33
-
34
- \`\`\`json
35
- [
36
- {
37
- "title": "GitHub",
38
- "url": "https://github.com/your-org/your-repo",
39
- "icon": "git-branch"
40
- },
41
- {
42
- "title": "Discord",
43
- "url": "https://discord.gg/your-invite",
44
- "icon": "discord"
45
- }
46
- ]
47
- \`\`\``;
@@ -1 +0,0 @@
1
- export declare const apiAnchorsTemplate = "\"use client\";\nimport { useEffect } from \"react\";\n\n// Mirrors the CLI's build-time slug convention (src/lib/openapi.ts\n// slugifySegment) so parameter deep links resolve identically on both sides.\nfunction slugifySegment(input: string): string {\n const slug = String(input)\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n return slug || \"item\";\n}\n\n// Builds a parameter anchor id from ordered parts, e.g.\n// paramAnchorId([\"query\", \"page\"]) -> \"param-query-page\". Nested body\n// properties append their parent path: [\"body\", \"user\", \"address\", \"city\"].\nexport function paramAnchorId(parts: string[]): string {\n return [\"param\", ...parts].map(slugifySegment).join(\"-\");\n}\n\n// Scrolls to and briefly highlights the element named by the current URL hash,\n// on mount and on every hashchange. `onHighlight` receives the matched id so\n// the caller can flash a transient highlight.\nexport function useAnchorScroll(onHighlight: (id: string) => void): void {\n useEffect(() => {\n const handle = () => {\n const hash = window.location.hash.replace(/^#/, \"\");\n if (!hash) return;\n const el = document.getElementById(hash);\n if (!el) return;\n el.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n onHighlight(hash);\n };\n handle();\n window.addEventListener(\"hashchange\", handle);\n return () => window.removeEventListener(\"hashchange\", handle);\n }, [onHighlight]);\n}\n";
@@ -1,39 +0,0 @@
1
- export const apiAnchorsTemplate = `"use client";
2
- import { useEffect } from "react";
3
-
4
- // Mirrors the CLI's build-time slug convention (src/lib/openapi.ts
5
- // slugifySegment) so parameter deep links resolve identically on both sides.
6
- function slugifySegment(input: string): string {
7
- const slug = String(input)
8
- .toLowerCase()
9
- .replace(/[^a-z0-9]+/g, "-")
10
- .replace(/^-+|-+$/g, "");
11
- return slug || "item";
12
- }
13
-
14
- // Builds a parameter anchor id from ordered parts, e.g.
15
- // paramAnchorId(["query", "page"]) -> "param-query-page". Nested body
16
- // properties append their parent path: ["body", "user", "address", "city"].
17
- export function paramAnchorId(parts: string[]): string {
18
- return ["param", ...parts].map(slugifySegment).join("-");
19
- }
20
-
21
- // Scrolls to and briefly highlights the element named by the current URL hash,
22
- // on mount and on every hashchange. \`onHighlight\` receives the matched id so
23
- // the caller can flash a transient highlight.
24
- export function useAnchorScroll(onHighlight: (id: string) => void): void {
25
- useEffect(() => {
26
- const handle = () => {
27
- const hash = window.location.hash.replace(/^#/, "");
28
- if (!hash) return;
29
- const el = document.getElementById(hash);
30
- if (!el) return;
31
- el.scrollIntoView({ behavior: "smooth", block: "center" });
32
- onHighlight(hash);
33
- };
34
- handle();
35
- window.addEventListener("hashchange", handle);
36
- return () => window.removeEventListener("hashchange", handle);
37
- }, [onHighlight]);
38
- }
39
- `;