@lupinum/ginko-docs 0.4.0-rc.9 → 0.4.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.
Files changed (296) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +1 -1
  3. package/README.md +206 -54
  4. package/app/app.config.ts +42 -55
  5. package/app/assets/docs.css +555 -0
  6. package/app/components/DocsBanner.vue +29 -0
  7. package/app/components/DocsExample.vue +43 -0
  8. package/app/components/DocsFooter.vue +19 -0
  9. package/app/components/DocsHeader.vue +112 -0
  10. package/app/components/DocsLanding.vue +55 -0
  11. package/app/components/DocsLanguage.vue +29 -0
  12. package/app/components/DocsNavTree.vue +38 -0
  13. package/app/components/DocsPage.vue +84 -0
  14. package/app/components/DocsPageActions.vue +47 -0
  15. package/app/components/DocsPost.vue +58 -0
  16. package/app/components/DocsSearch.vue +134 -0
  17. package/app/components/DocsShell.vue +20 -0
  18. package/app/components/DocsSidebar.vue +18 -0
  19. package/app/components/DocsTable.vue +11 -0
  20. package/app/components/DocsThemeToggle.vue +45 -0
  21. package/app/components/DocsToc.vue +73 -0
  22. package/app/composables/useDocs.ts +52 -0
  23. package/app/composables/useDocsBlog.ts +32 -0
  24. package/app/composables/useDocsCopy.ts +17 -0
  25. package/app/composables/useDocsPopover.ts +36 -0
  26. package/app/composables/useDocsSite.ts +10 -0
  27. package/app/docs-pages/blog.vue +47 -0
  28. package/app/docs-pages/changelog.vue +27 -0
  29. package/app/docs-pages/doc.vue +14 -0
  30. package/app/docs-pages/docs.vue +9 -0
  31. package/app/docs-pages/index.vue +12 -0
  32. package/app/docs-pages/post.vue +8 -0
  33. package/app/error.vue +23 -115
  34. package/app/layouts/default.vue +25 -7
  35. package/app/lib/blogTypes.ts +8 -0
  36. package/app/lib/docsFirst.ts +11 -0
  37. package/app/lib/docsInit.ts +18 -0
  38. package/app/lib/docsNav.ts +36 -0
  39. package/app/lib/docsPage.ts +44 -0
  40. package/app/lib/markdownComponents.ts +16 -0
  41. package/app/lib/previewToc.ts +18 -0
  42. package/dist/config.d.mts +232 -0
  43. package/dist/config.d.ts +232 -0
  44. package/dist/config.mjs +114 -0
  45. package/dist/pages.d.mts +5 -0
  46. package/dist/pages.d.ts +5 -0
  47. package/dist/pages.mjs +36 -0
  48. package/dist/shared/ginko-docs.BwbF7JBR.mjs +4 -0
  49. package/i18n/de.json +1 -0
  50. package/i18n/en.json +1 -0
  51. package/icons/README.md +2 -0
  52. package/icons/bluesky.svg +1 -0
  53. package/icons/claude.svg +1 -0
  54. package/icons/discord.svg +1 -0
  55. package/icons/github.svg +1 -0
  56. package/icons/linkedin.svg +1 -0
  57. package/icons/mastodon.svg +1 -0
  58. package/icons/openai.svg +1 -0
  59. package/icons/x.svg +1 -0
  60. package/icons/youtube.svg +1 -0
  61. package/nuxt.config.ts +34 -209
  62. package/package.json +43 -76
  63. package/public/_docs/fonts/LICENSE +188 -0
  64. package/public/_docs/fonts/inter-latin-wght-normal.woff2 +0 -0
  65. package/public/_docs/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  66. package/public/_docs/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  67. package/server/feeds/blog-locale.get.ts +9 -0
  68. package/server/feeds/blog.get.ts +4 -0
  69. package/server/lib/blogFeed.ts +35 -0
  70. package/server/lib/rss.ts +57 -0
  71. package/server/mcp/handler.ts +108 -0
  72. package/server/routes/__ginko/docs-mcp.ts +35 -0
  73. package/shared/paths.ts +4 -0
  74. package/app/app.vue +0 -98
  75. package/app/assets/css/prose.css +0 -3240
  76. package/app/assets/css/tailwind.css +0 -394
  77. package/app/assets/css/theme-palettes.css +0 -309
  78. package/app/assets/css/theme-presets.css +0 -141
  79. package/app/components/OgImage/GinkoDocs.satori.vue +0 -238
  80. package/app/components/content/DocumentPageShell.vue +0 -55
  81. package/app/components/content/Feedback.vue +0 -102
  82. package/app/components/content/ImageZoomDialog.vue +0 -84
  83. package/app/components/content/PageMarkdownCopy.vue +0 -104
  84. package/app/components/content/imageZoom.ts +0 -25
  85. package/app/components/mdc/MdcAccordion.vue +0 -67
  86. package/app/components/mdc/MdcAccordionItem.vue +0 -42
  87. package/app/components/mdc/MdcApi.vue +0 -159
  88. package/app/components/mdc/MdcAside.vue +0 -23
  89. package/app/components/mdc/MdcCallout.vue +0 -61
  90. package/app/components/mdc/MdcCard.vue +0 -175
  91. package/app/components/mdc/MdcCards.vue +0 -30
  92. package/app/components/mdc/MdcCenter.vue +0 -71
  93. package/app/components/mdc/MdcCodeGroup.vue +0 -197
  94. package/app/components/mdc/MdcCodeTree.vue +0 -234
  95. package/app/components/mdc/MdcCollapse.vue +0 -61
  96. package/app/components/mdc/MdcColumn.vue +0 -70
  97. package/app/components/mdc/MdcDropcap.vue +0 -84
  98. package/app/components/mdc/MdcError.vue +0 -23
  99. package/app/components/mdc/MdcExcerpt.vue +0 -26
  100. package/app/components/mdc/MdcFigure.vue +0 -85
  101. package/app/components/mdc/MdcFiles.vue +0 -120
  102. package/app/components/mdc/MdcIdea.vue +0 -17
  103. package/app/components/mdc/MdcInfo.vue +0 -17
  104. package/app/components/mdc/MdcInlineToc.vue +0 -51
  105. package/app/components/mdc/MdcKbd.vue +0 -10
  106. package/app/components/mdc/MdcLayout.vue +0 -57
  107. package/app/components/mdc/MdcNote.vue +0 -17
  108. package/app/components/mdc/MdcQuiz.vue +0 -241
  109. package/app/components/mdc/MdcQuizQuestion.vue +0 -221
  110. package/app/components/mdc/MdcReadMore.vue +0 -70
  111. package/app/components/mdc/MdcSteps.vue +0 -59
  112. package/app/components/mdc/MdcSuccess.vue +0 -23
  113. package/app/components/mdc/MdcTab.vue +0 -17
  114. package/app/components/mdc/MdcTabs.vue +0 -150
  115. package/app/components/mdc/MdcTimeline.vue +0 -17
  116. package/app/components/mdc/MdcTimelineItem.vue +0 -40
  117. package/app/components/mdc/MdcWarning.vue +0 -23
  118. package/app/components/mdc/api.utils.ts +0 -132
  119. package/app/components/mdc/code-tree.utils.ts +0 -22
  120. package/app/components/mdc/icons.ts +0 -10
  121. package/app/components/mdc/quiz.utils.ts +0 -38
  122. package/app/components/prose/ProseA.vue +0 -27
  123. package/app/components/prose/ProseBlockquote.vue +0 -30
  124. package/app/components/prose/ProseCode.vue +0 -14
  125. package/app/components/prose/ProseEm.vue +0 -14
  126. package/app/components/prose/ProseH1.vue +0 -18
  127. package/app/components/prose/ProseH2.vue +0 -29
  128. package/app/components/prose/ProseH3.vue +0 -29
  129. package/app/components/prose/ProseH4.vue +0 -29
  130. package/app/components/prose/ProseH5.vue +0 -15
  131. package/app/components/prose/ProseH6.vue +0 -15
  132. package/app/components/prose/ProseHr.vue +0 -12
  133. package/app/components/prose/ProseImg.vue +0 -55
  134. package/app/components/prose/ProseLi.vue +0 -14
  135. package/app/components/prose/ProseOl.vue +0 -14
  136. package/app/components/prose/ProseP.vue +0 -14
  137. package/app/components/prose/ProsePre.vue +0 -180
  138. package/app/components/prose/ProseStrong.vue +0 -14
  139. package/app/components/prose/ProseTable.vue +0 -18
  140. package/app/components/prose/ProseTbody.vue +0 -14
  141. package/app/components/prose/ProseTd.vue +0 -14
  142. package/app/components/prose/ProseTh.vue +0 -14
  143. package/app/components/prose/ProseThead.vue +0 -14
  144. package/app/components/prose/ProseTr.vue +0 -14
  145. package/app/components/prose/ProseUl.vue +0 -14
  146. package/app/components/site/ModeToggle.vue +0 -81
  147. package/app/components/site/SiteBanner.vue +0 -97
  148. package/app/components/site/SiteFooter.vue +0 -90
  149. package/app/components/site/SiteHeader.vue +0 -371
  150. package/app/components/site/SiteHeroCode.vue +0 -173
  151. package/app/components/site/SiteInteractionLayer.vue +0 -42
  152. package/app/components/site/SiteLocaleSwitcher.vue +0 -190
  153. package/app/components/site/SiteLogoMark.vue +0 -12
  154. package/app/components/site/SiteSkipLink.vue +0 -14
  155. package/app/components/site/SiteSocialLinks.vue +0 -33
  156. package/app/components/site/header-utils.ts +0 -3
  157. package/app/components/site/mode-toggle.utils.ts +0 -18
  158. package/app/components/ui/badge/Badge.vue +0 -28
  159. package/app/components/ui/badge/index.ts +0 -24
  160. package/app/components/ui/button/Button.vue +0 -31
  161. package/app/components/ui/button/index.ts +0 -35
  162. package/app/components/ui/collapsible/Collapsible.vue +0 -15
  163. package/app/components/ui/collapsible/CollapsibleContent.vue +0 -25
  164. package/app/components/ui/collapsible/CollapsibleTrigger.vue +0 -12
  165. package/app/components/ui/collapsible/index.ts +0 -3
  166. package/app/components/ui/dropdown-menu/DropdownMenu.vue +0 -15
  167. package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +0 -50
  168. package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +0 -41
  169. package/app/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +0 -15
  170. package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +0 -37
  171. package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +0 -23
  172. package/app/components/ui/dropdown-menu/DropdownMenuTrigger.vue +0 -14
  173. package/app/components/ui/dropdown-menu/index.ts +0 -7
  174. package/app/components/ui/kbd/Kbd.vue +0 -23
  175. package/app/components/ui/kbd/index.ts +0 -21
  176. package/app/components/ui/scroll-area/ScrollArea.vue +0 -39
  177. package/app/components/ui/scroll-area/ScrollBar.vue +0 -33
  178. package/app/components/ui/scroll-area/index.ts +0 -2
  179. package/app/components/ui/separator/Separator.vue +0 -27
  180. package/app/components/ui/separator/index.ts +0 -1
  181. package/app/components/ui/sheet/Sheet.vue +0 -15
  182. package/app/components/ui/sheet/SheetContent.vue +0 -59
  183. package/app/components/ui/sheet/SheetDescription.vue +0 -21
  184. package/app/components/ui/sheet/SheetOverlay.vue +0 -26
  185. package/app/components/ui/sheet/SheetTitle.vue +0 -21
  186. package/app/components/ui/sheet/SheetTrigger.vue +0 -12
  187. package/app/components/ui/sheet/index.ts +0 -5
  188. package/app/components/ui/tabs/Tabs.vue +0 -24
  189. package/app/components/ui/tabs/TabsList.vue +0 -26
  190. package/app/components/ui/tabs/TabsTrigger.vue +0 -28
  191. package/app/components/ui/tabs/index.ts +0 -3
  192. package/app/composables/site-navigation.utils.ts +0 -133
  193. package/app/composables/useCanonicalUrl.ts +0 -9
  194. package/app/composables/useContentRouteAlternates.ts +0 -35
  195. package/app/composables/useGinkoAnalytics.ts +0 -52
  196. package/app/composables/useGinkoDocsConfig.ts +0 -6
  197. package/app/composables/useGinkoOgImage.ts +0 -20
  198. package/app/composables/useLocalizedPath.ts +0 -12
  199. package/app/composables/useLocalizedRouteSwitch.ts +0 -31
  200. package/app/composables/useMetaKey.ts +0 -18
  201. package/app/composables/usePageMarkdownActions.ts +0 -79
  202. package/app/composables/useProseAppearance.ts +0 -24
  203. package/app/composables/useSchemaJsonLd.ts +0 -25
  204. package/app/composables/useSiteNavigation.ts +0 -64
  205. package/app/config/site.utils.ts +0 -36
  206. package/app/features/docs/components/DocsBreadcrumb.vue +0 -37
  207. package/app/features/docs/components/DocsContributeLinks.vue +0 -75
  208. package/app/features/docs/components/DocsMobileToc.vue +0 -108
  209. package/app/features/docs/components/DocsPageContent.vue +0 -234
  210. package/app/features/docs/components/DocsPageNav.vue +0 -57
  211. package/app/features/docs/components/DocsSidebar.vue +0 -145
  212. package/app/features/docs/components/DocsSidebarDropdown.vue +0 -70
  213. package/app/features/docs/components/DocsSidebarItem.vue +0 -122
  214. package/app/features/docs/components/DocsSidebarList.vue +0 -35
  215. package/app/features/docs/components/DocsSidebarRow.vue +0 -27
  216. package/app/features/docs/components/DocsSidebarTabs.vue +0 -59
  217. package/app/features/docs/components/DocsToc.vue +0 -106
  218. package/app/features/docs/composables/useDocsNavigation.ts +0 -29
  219. package/app/features/docs/composables/useDocsNavigationData.ts +0 -18
  220. package/app/features/docs/composables/useRevealActive.ts +0 -58
  221. package/app/features/docs/composables/useScrollspy.ts +0 -135
  222. package/app/features/docs/docs-navigation.ts +0 -157
  223. package/app/features/docs/toc-context.ts +0 -6
  224. package/app/features/search/command-center.ts +0 -110
  225. package/app/features/search/components/SiteCommandCenter.vue +0 -359
  226. package/app/features/search/components/SiteSearchPageHighlight.vue +0 -126
  227. package/app/features/search/useCommandCenter.ts +0 -292
  228. package/app/layouts/blog.vue +0 -15
  229. package/app/layouts/docs.vue +0 -20
  230. package/app/lib/errors.ts +0 -37
  231. package/app/lib/schema-org.ts +0 -38
  232. package/app/pages/blog/[slug].vue +0 -228
  233. package/app/pages/blog/index.vue +0 -130
  234. package/app/pages/docs/[...slug].vue +0 -10
  235. package/app/pages/docs/index.vue +0 -19
  236. package/app/pages/index.vue +0 -278
  237. package/app/plugins/ginko-docs-theme.ts +0 -14
  238. package/app/plugins/ssr-width.ts +0 -6
  239. package/app/utils/content.ts +0 -67
  240. package/app/utils/file-icons.ts +0 -90
  241. package/app/utils/index.ts +0 -7
  242. package/app/utils/repository.ts +0 -20
  243. package/components.ts +0 -9
  244. package/content-collections.ts +0 -89
  245. package/content.js +0 -200
  246. package/content.ts +0 -104
  247. package/i18n/i18n.config.ts +0 -10
  248. package/i18n/locales.ts +0 -81
  249. package/i18n/messages/global/banner.ts +0 -8
  250. package/i18n/messages/global/blog.ts +0 -18
  251. package/i18n/messages/global/command.ts +0 -49
  252. package/i18n/messages/global/docs.ts +0 -36
  253. package/i18n/messages/global/errors.ts +0 -36
  254. package/i18n/messages/global/feedback.ts +0 -11
  255. package/i18n/messages/global/index.ts +0 -21
  256. package/i18n/messages/global/nav.ts +0 -26
  257. package/i18n/messages/global/site.ts +0 -4
  258. package/i18n/messages/global/theme.ts +0 -9
  259. package/i18n/messages/index.ts +0 -20
  260. package/i18n/messages/localize.ts +0 -35
  261. package/i18n/routes.ts +0 -33
  262. package/icon-bundle.ts +0 -116
  263. package/index.d.ts +0 -37
  264. package/modules/analytics-boundary.ts +0 -23
  265. package/modules/feature-routing.ts +0 -68
  266. package/modules/syntax-highlighting.ts +0 -120
  267. package/public/fonts/public-sans/LICENSE +0 -93
  268. package/public/fonts/public-sans/README.md +0 -12
  269. package/public/fonts/public-sans/public-sans-400-normal-latin.woff +0 -0
  270. package/public/fonts/public-sans/public-sans-500-normal-latin.woff +0 -0
  271. package/public/fonts/public-sans/public-sans-600-normal-latin.woff +0 -0
  272. package/public/fonts/public-sans/public-sans-700-normal-latin.woff +0 -0
  273. package/runtime/generate-favicons.mjs +0 -124
  274. package/runtime/server/agent-markdown.ts +0 -19
  275. package/server/api/_ginko-docs/redirects.get.ts +0 -28
  276. package/server/mcp/tools/get-page.ts +0 -14
  277. package/server/mcp/tools/list-pages.ts +0 -10
  278. package/server/middleware/redirects.ts +0 -22
  279. package/server/plugins/agent-markdown.ts +0 -6
  280. package/server/plugins/sitemap-policy.ts +0 -12
  281. package/server/routes/.well-known/ai-catalog.json.get.ts +0 -10
  282. package/server/routes/[locale]/blog/rss.xml.get.ts +0 -13
  283. package/server/routes/blog/rss.xml.get.ts +0 -5
  284. package/server/routes/mcp/server-card.get.ts +0 -14
  285. package/server/utils/blog-feed.ts +0 -51
  286. package/server/utils/feed.ts +0 -70
  287. package/server/utils/mcp-server-card.ts +0 -45
  288. package/server/utils/redirects.ts +0 -38
  289. package/server/utils/redirects.utils.ts +0 -58
  290. package/server/utils/sitemap.ts +0 -45
  291. package/shared/route-slugs.ts +0 -5
  292. package/shared/theme-palettes.ts +0 -37
  293. package/shared/theme-presets.ts +0 -3
  294. package/shared/types/app-config.ts +0 -172
  295. package/shared/types/nuxt-config.ts +0 -14
  296. package/tags.ts +0 -192
@@ -0,0 +1,114 @@
1
+ import { collection, f, single } from '@lupinum/ginko';
2
+ import { B as BLOG_PATH, C as CHANGELOG_PATH } from './shared/ginko-docs.BwbF7JBR.mjs';
3
+ export { components } from '@lupinum/ginko-components/registry';
4
+
5
+ function localized(locales, path) {
6
+ const [main] = locales;
7
+ if (main === void 0) throw new Error("[ginko-docs] `locales` is empty. Fix: pass the same list as `locales` in defineSite.");
8
+ return Object.fromEntries(locales.map((l) => [l, l === main ? path : `/${l}${path}`]));
9
+ }
10
+ function docsCollection(opts) {
11
+ const { locales } = opts;
12
+ const base = opts.base ?? "/docs";
13
+ return collection({
14
+ label: opts.label ?? "Docs",
15
+ source: "files",
16
+ max: opts.max ?? 500,
17
+ order: "manual",
18
+ route: localized(locales, `${base}/[slug]`),
19
+ fields: {
20
+ title: f.text("Title"),
21
+ description: f.longtext("Description", { optional: true }),
22
+ /** Starts a group in the side navigation under this heading; the pages after it belong to it until the next one. */
23
+ section: f.text("Section", { optional: true }),
24
+ /** Nests the entry under another doc in the side navigation and the breadcrumbs. */
25
+ parent: f.ref("Parent page", { to: "docs", optional: true }),
26
+ /** Section tab above the side navigation; a page without one follows the tab of the page before it. Children follow their parent. */
27
+ tab: f.text("Tab", { optional: true, max: 30 }),
28
+ /** A short label next to the entry in the side navigation, e.g. "New". */
29
+ badge: f.text("Badge", { optional: true, max: 20 }),
30
+ /** An icon name such as `lucide:book-open` (any installed Iconify set), shown before the title in the side navigation. */
31
+ icon: f.text("Icon", { optional: true, max: 60, translate: false }),
32
+ slug: f.slug("Address", { from: "title" }),
33
+ body: f.markdown("Text", { profile: "page" })
34
+ }
35
+ });
36
+ }
37
+ function docsHome() {
38
+ return single({
39
+ label: "Start page",
40
+ source: "files",
41
+ fields: {
42
+ title: f.text("Title", { max: 120 }),
43
+ description: f.longtext("Description", { optional: true, max: 400 }),
44
+ /** A command shown with a copy button, e.g. `pnpm add @lupinum/ginko`. */
45
+ install: f.text("Install command", { optional: true, max: 200, translate: false }),
46
+ /** Buttons under the description; the first one is the main one. */
47
+ links: f.list("Links", { itemLabel: "Link", fields: { label: f.text("Text", { max: 40 }), href: f.text("Target", { max: 300 }) }, max: 2, default: [] }),
48
+ features: f.list("Features", {
49
+ itemLabel: "Feature",
50
+ fields: {
51
+ icon: f.text("Icon", { optional: true, max: 60, translate: false }),
52
+ title: f.text("Title", { max: 80 }),
53
+ description: f.longtext("Description", { max: 300 }),
54
+ href: f.text("Link", { optional: true, max: 300 })
55
+ },
56
+ max: 12,
57
+ default: []
58
+ }),
59
+ body: f.markdown("Text", { profile: "page", optional: true })
60
+ }
61
+ });
62
+ }
63
+ function blogCollections(opts) {
64
+ const { locales } = opts;
65
+ return {
66
+ posts: collection({
67
+ label: "Posts",
68
+ source: "files",
69
+ max: opts.max ?? 500,
70
+ order: { field: "date", dir: "desc" },
71
+ route: localized(locales, `${BLOG_PATH}/[slug]`),
72
+ fields: {
73
+ title: f.text("Title"),
74
+ description: f.longtext("Description", { optional: true }),
75
+ date: f.date("Date"),
76
+ authors: f.refs("Authors", { to: "authors", optional: true }),
77
+ image: f.image("Image", { optional: true }),
78
+ tags: f.list("Tags", { itemLabel: "Tag", fields: { tag: f.text("Tag", { max: 40 }) }, max: 10, optional: true }),
79
+ slug: f.slug("Address", { from: "title" }),
80
+ body: f.markdown("Text", { profile: "page" })
81
+ }
82
+ }),
83
+ authors: collection({
84
+ label: "Authors",
85
+ source: "files",
86
+ max: 100,
87
+ order: "manual",
88
+ fields: {
89
+ name: f.text("Name"),
90
+ role: f.text("Role", { optional: true }),
91
+ avatar: f.image("Image", { optional: true }),
92
+ /** Shown as a link on the author's name. */
93
+ url: f.text("Website", { format: "url", optional: true })
94
+ }
95
+ })
96
+ };
97
+ }
98
+ function changelogCollection(opts = {}) {
99
+ return collection({
100
+ label: "Changelog",
101
+ source: "files",
102
+ max: opts.max ?? 500,
103
+ order: { field: "date", dir: "desc" },
104
+ fields: {
105
+ version: f.text("Version", { max: 40, translate: false }),
106
+ date: f.date("Date"),
107
+ body: f.markdown("Text", { profile: "page" })
108
+ }
109
+ });
110
+ }
111
+ const blogPages = (opts) => localized(opts.locales, BLOG_PATH);
112
+ const changelogPages = (opts) => localized(opts.locales, CHANGELOG_PATH);
113
+
114
+ export { blogCollections, blogPages, changelogCollection, changelogPages, docsCollection, docsHome };
@@ -0,0 +1,5 @@
1
+ import { NuxtModule } from 'nuxt/schema';
2
+
3
+ declare const docsPages: NuxtModule;
4
+
5
+ export { docsPages as default };
@@ -0,0 +1,5 @@
1
+ import { NuxtModule } from 'nuxt/schema';
2
+
3
+ declare const docsPages: NuxtModule;
4
+
5
+ export { docsPages as default };
package/dist/pages.mjs ADDED
@@ -0,0 +1,36 @@
1
+ import { defineNuxtModule, createResolver, extendPages, addServerHandler, useLogger } from '@nuxt/kit';
2
+ import { B as BLOG_PATH, C as CHANGELOG_PATH } from './shared/ginko-docs.BwbF7JBR.mjs';
3
+
4
+ const docsPages = defineNuxtModule({
5
+ meta: { name: "@lupinum/ginko-docs/pages" },
6
+ setup(_, nuxt) {
7
+ const { resolve } = createResolver(import.meta.url);
8
+ const site = nuxt.options.ginko;
9
+ const bricks = site?.bricks ?? {};
10
+ const main = site?.locales?.[0] ?? "";
11
+ const base = bricks.docs?.route?.[main]?.replace(/\/\[slug\]$/, "") ?? "/docs";
12
+ extendPages((pages) => {
13
+ const taken = new Set(pages.map((p) => p.path));
14
+ const add = (name, path, file) => {
15
+ if (!taken.has(path)) pages.push({ name, path, file: resolve(`../app/docs-pages/${file}`) });
16
+ };
17
+ add("docs-slug", `${base}/:slug()`, "doc.vue");
18
+ add("docs", base, "docs.vue");
19
+ add("index", "/", "index.vue");
20
+ if (bricks.posts) {
21
+ add("blog", BLOG_PATH, "blog.vue");
22
+ add("blog-slug", `${BLOG_PATH}/:slug()`, "post.vue");
23
+ }
24
+ if (bricks.changelog) add("changelog", CHANGELOG_PATH, "changelog.vue");
25
+ });
26
+ if (bricks.posts) {
27
+ addServerHandler({ route: `${BLOG_PATH}/rss.xml`, method: "get", handler: resolve("../server/feeds/blog.get") });
28
+ addServerHandler({ route: `/:locale${BLOG_PATH}/rss.xml`, method: "get", handler: resolve("../server/feeds/blog-locale.get") });
29
+ }
30
+ const logger = useLogger("ginko-docs");
31
+ if (bricks.posts && !site?.pages?.blog) logger.warn("The site has a blog but no `blog: blogPages({ locales })` in `pages`: the blog list is missing from the sitemap and the static build.");
32
+ if (bricks.changelog && !site?.pages?.changelog) logger.warn("The site has a changelog but no `changelog: changelogPages({ locales })` in `pages`: it is missing from the sitemap and the static build.");
33
+ }
34
+ });
35
+
36
+ export { docsPages as default };
@@ -0,0 +1,4 @@
1
+ const BLOG_PATH = "/blog";
2
+ const CHANGELOG_PATH = "/changelog";
3
+
4
+ export { BLOG_PATH as B, CHANGELOG_PATH as C };
package/i18n/de.json ADDED
@@ -0,0 +1 @@
1
+ {"docs":{"docs":"Doku","edit":"Seite bearbeiten","issue":"Fehler melden","top":"Nach oben","updated":"Zuletzt geändert am","copyPage":"Seite kopieren","copied":"Kopiert","copyFailed":"Kopieren nicht möglich","table":"Tabelle, scrollbar","installCommand":"Installationsbefehl","searchResults":"Suchergebnisse","copyCommand":"Befehl kopieren","moreActions":"Weitere Seitenaktionen","viewMarkdown":"Als Markdown ansehen","viewMarkdownHint":"Die Seite als reiner Text","openChatGpt":"In ChatGPT öffnen","openClaude":"In Claude öffnen","askHint":"Fragen zu dieser Seite stellen","askPrompt":"Lies {url} und beantworte Fragen dazu.","pageActions":"Seitenaktionen","skip":"Zum Inhalt","nav":"Doku-Navigation","onThisPage":"Auf dieser Seite","search":"Suchen","searchPlaceholder":"Doku durchsuchen …","searchHint":"Tippe, um Seiten und Abschnitte zu finden.","noResults":"Nichts gefunden für „{query}“.","searchMove":"wählen","searchOpen":"öffnen","close":"Schließen","previous":"Zurück","next":"Weiter","pager":"Vorige und nächste Seite","language":"Sprache","sections":"Bereiche","breadcrumb":"Pfad","theme":{"label":"Darstellung","auto":"Auto","light":"Hell","dark":"Dunkel","toggle":"Zwischen hell und dunkel wechseln"},"bannerClose":"Hinweis schließen","footerNav":"Fußzeile","builtWith":"Erstellt mit Ginko","toggle":"Unterseiten von {title} ein- oder ausklappen","blog":"Blog","changelog":"Änderungen","by":"Von","rss":"RSS-Feed","siteLinks":"Hauptbereiche","siteMenu":"Hauptmenü","blogLead":"Neuigkeiten, Anleitungen und Einblicke.","changelogLead":"Was sich mit jeder Version geändert hat.","draft":"Entwurf","readMore":"Weiterlesen","example":{"preview":"Vorschau","source":"Markdown"},"notFound":{"title":"Seite nicht gefunden","text":"Diese Seite gibt es nicht oder sie ist umgezogen.","home":"Zur Startseite"},"error":{"title":"Etwas ist schiefgelaufen","text":"Die Seite konnte nicht geladen werden. Versuche es gleich noch einmal."}}}
package/i18n/en.json ADDED
@@ -0,0 +1 @@
1
+ {"docs":{"docs":"Docs","edit":"Edit this page","issue":"Report an issue","top":"Back to top","updated":"Last updated","copyPage":"Copy page","copied":"Copied","copyFailed":"Could not copy","table":"Table, scrollable","installCommand":"Install command","searchResults":"Search results","copyCommand":"Copy command","moreActions":"More page actions","viewMarkdown":"View as Markdown","viewMarkdownHint":"The page as plain text","openChatGpt":"Open in ChatGPT","openClaude":"Open in Claude","askHint":"Ask questions about this page","askPrompt":"Read {url} and answer questions about it.","pageActions":"Page actions","skip":"Skip to content","nav":"Docs navigation","onThisPage":"On this page","search":"Search","searchPlaceholder":"Search the docs…","searchHint":"Type to search pages and sections.","noResults":"No results for “{query}”.","searchMove":"to move","searchOpen":"to open","close":"Close","previous":"Previous","next":"Next","pager":"Previous and next page","language":"Language","sections":"Sections","breadcrumb":"Breadcrumb","theme":{"label":"Appearance","auto":"Auto","light":"Light","dark":"Dark","toggle":"Switch between light and dark"},"bannerClose":"Dismiss notice","footerNav":"Footer","builtWith":"Built with Ginko","toggle":"Show or hide subpages of {title}","blog":"Blog","changelog":"Changelog","by":"By","rss":"RSS feed","siteLinks":"Main","siteMenu":"Main menu","blogLead":"News, guides and insights.","changelogLead":"What changed with each version.","draft":"Draft","readMore":"Read more","example":{"preview":"Preview","source":"Markdown"},"notFound":{"title":"Page not found","text":"This page does not exist or has moved.","home":"Go to the home page"},"error":{"title":"Something went wrong","text":"The page could not be loaded. Please try again in a moment."}}}
@@ -0,0 +1,2 @@
1
+ Brand icons of the `docs` icon collection (`docs:github`, `docs:openai`, ...), from Simple Icons
2
+ (@iconify-json/simple-icons 1.2.99, CC0 1.0). Brand names and logos belong to their owners.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037c-.856 3.061-3.978 3.842-6.755 3.37c4.854.826 6.089 3.562 3.422 6.299c-5.065 5.196-7.28-1.304-7.847-2.97c-.104-.305-.152-.448-.153-.327c0-.121-.05.022-.153.327c-.568 1.666-2.782 8.166-7.847 2.97c-2.667-2.737-1.432-5.473 3.422-6.3c-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="m4.714 15.956l4.718-2.648l.079-.23l-.08-.128h-.23l-.79-.048l-2.695-.073l-2.337-.097l-2.265-.122l-.57-.121l-.535-.704l.055-.353l.48-.321l.685.06l1.518.104l2.277.157l1.651.098l2.447.255h.389l.054-.158l-.133-.097l-.103-.098l-2.356-1.596l-2.55-1.688l-1.336-.972l-.722-.491L2 6.223l-.158-1.008l.656-.722l.88.06l.224.061l.893.686l1.906 1.476l2.49 1.833l.364.304l.146-.104l.018-.072l-.164-.274l-1.354-2.446l-1.445-2.49l-.644-1.032l-.17-.619a3 3 0 0 1-.103-.729L6.287.133L6.7 0l.995.134l.42.364l.619 1.415L9.735 4.14l1.555 3.03l.455.898l.243.832l.09.255h.159V9.01l.127-1.706l.237-2.095l.23-2.695l.08-.76l.376-.91l.747-.492l.583.28l.48.685l-.067.444l-.286 1.851l-.558 2.903l-.365 1.942h.213l.243-.242l.983-1.306l1.652-2.064l.728-.82l.85-.904l.547-.431h1.032l.759 1.129l-.34 1.166l-1.063 1.347l-.88 1.142l-1.263 1.7l-.79 1.36l.074.11l.188-.02l2.853-.606l1.542-.28l1.84-.315l.832.388l.09.395l-.327.807l-1.967.486l-2.307.462l-3.436.813l-.043.03l.049.061l1.548.146l.662.036h1.62l3.018.225l.79.522l.473.638l-.08.485l-1.213.62l-1.64-.389l-3.825-.91l-1.31-.329h-.183v.11l1.093 1.068l2.003 1.81l2.508 2.33l.127.578l-.321.455l-.34-.049l-2.204-1.657l-.85-.747l-1.925-1.62h-.127v.17l.443.649l2.343 3.521l.122 1.08l-.17.353l-.607.213l-.668-.122l-1.372-1.924l-1.415-2.168l-1.141-1.943l-.14.08l-.674 7.254l-.316.37l-.728.28l-.607-.461l-.322-.747l.322-1.476l.388-1.924l.316-1.53l.285-1.9l.17-.632l-.012-.042l-.14.018l-1.432 1.967l-2.18 2.945l-1.724 1.845l-.413.164l-.716-.37l.066-.662l.401-.589l2.386-3.036l1.439-1.882l.929-1.086l-.006-.158h-.055L4.138 18.56l-1.13.146l-.485-.456l.06-.746l.231-.243l1.907-1.312Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127C.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611c.118 1.24.325 2.47.62 3.68c.55 2.237 2.777 4.098 4.96 4.857c2.336.792 4.849.923 7.256.38q.398-.092.786-.213c.585-.184 1.27-.39 1.774-.753a.06.06 0 0 0 .023-.043v-1.809a.05.05 0 0 0-.02-.041a.05.05 0 0 0-.046-.01a20.3 20.3 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.6 5.6 0 0 1-.319-1.433a.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546c.376 0 .75 0 1.125-.01c1.57-.044 3.224-.124 4.768-.422q.059-.011.11-.024c2.435-.464 4.753-1.92 4.989-5.604c.008-.145.03-1.52.03-1.67c.002-.512.167-3.63-.024-5.545m-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976c-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35c-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102q0-1.965 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164c1.311 0 2.302.5 2.962 1.498l.638 1.06l.638-1.06c.66-.999 1.65-1.498 2.96-1.498c1.13 0 2.043.395 2.74 1.164q1.012 1.155 1.012 3.12z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M22.282 9.821a6 6 0 0 0-.516-4.91a6.05 6.05 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a6 6 0 0 0-3.998 2.9a6.05 6.05 0 0 0 .743 7.097a5.98 5.98 0 0 0 .51 4.911a6.05 6.05 0 0 0 6.515 2.9A6 6 0 0 0 13.26 24a6.06 6.06 0 0 0 5.772-4.206a6 6 0 0 0 3.997-2.9a6.06 6.06 0 0 0-.747-7.073M13.26 22.43a4.48 4.48 0 0 1-2.876-1.04l.141-.081l4.779-2.758a.8.8 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494M3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085l4.783 2.759a.77.77 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646M2.34 7.896a4.5 4.5 0 0 1 2.366-1.973V11.6a.77.77 0 0 0 .388.677l5.815 3.354l-2.02 1.168a.08.08 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.08.08 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667m2.01-3.023l-.141-.085l-4.774-2.782a.78.78 0 0 0-.785 0L9.409 9.23V6.897a.07.07 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.8.8 0 0 0-.393.681zm1.097-2.365l2.602-1.5l2.607 1.5v2.999l-2.597 1.5l-2.607-1.5Z"/></svg>
package/icons/x.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M23.498 6.186a3.02 3.02 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.02 3.02 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.02 3.02 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.02 3.02 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814M9.545 15.568V8.432L15.818 12z"/></svg>
package/nuxt.config.ts CHANGED
@@ -1,218 +1,43 @@
1
- import { fileURLToPath } from "node:url";
2
- import { dirname, join } from "node:path";
3
- import { readFileSync } from "node:fs";
4
- import tailwindcss from "@tailwindcss/vite";
5
- import { transformerNotationDiff, transformerNotationHighlight } from "@shikijs/transformers";
6
- import darkPlus from "shiki/dist/themes/dark-plus.mjs";
7
- import lightPlus from "shiki/dist/themes/light-plus.mjs";
8
- import { contentComponentPolicy, contentComponentTags } from "./tags";
9
- import { i18nPages } from "./i18n/routes";
10
- import { defaultLocale, localeCodes, locales, localizedPath } from "./i18n/locales";
11
- import { routeSlugs } from "./shared/route-slugs";
12
- import { layerIconCollections, layerIconNames } from "./icon-bundle";
13
- import packageMetadata from "./package.json" with { type: "json" };
1
+ // The docs layer. A site extends it and brings ginko.config.ts (with docsCollection), content/ and branding:
2
+ // export default defineNuxtConfig({ extends: ['@lupinum/ginko-docs'], modules: ['@lupinum/ginko/nuxt'], ginko })
3
+ // Standalone it is a whole docs site; inside a larger site (`extends` next to the site's own pages and layout) it
4
+ // adds only the docs pages, styled from the site's shadcn-style tokens (README: "Inside an existing site").
5
+ import { fileURLToPath } from 'node:url'
14
6
 
15
- const root = dirname(fileURLToPath(import.meta.url));
16
- const app = join(root, "app");
17
- const publicSansDirectory = join(root, "public/fonts/public-sans");
18
- const publicSansFamilies = [400, 500, 600, 700].map((weight) => ({
19
- name: "Public Sans",
20
- global: true,
21
- display: "swap" as const,
22
- weight,
23
- style: "normal",
24
- src: `data:font/woff;base64,${readFileSync(
25
- join(publicSansDirectory, `public-sans-${weight}-normal-latin.woff`),
26
- ).toString("base64")}`,
27
- }));
7
+ const here = (path: string) => fileURLToPath(new URL(path, import.meta.url))
8
+
9
+ // Icons the layer's own components use. They go into the client bundle; icon names in the site's content
10
+ // (the `icon` field) are found by the scan. No icon API: everything is bundled, so static hosting works offline.
11
+ const icons = [
12
+ 'arrow-left', 'arrow-right', 'arrow-up', 'arrow-up-right', 'check', 'chevron-down', 'chevron-right', 'circle-alert',
13
+ 'copy', 'corner-down-left', 'file-text', 'hash', 'languages', 'menu', 'moon', 'panel-left', 'pencil', 'rss',
14
+ 'search', 'sun', 'text-align-start', 'x',
15
+ ].map((name) => `lucide:${name}`)
28
16
 
29
17
  export default defineNuxtConfig({
30
- build: {
31
- transpile: ["@lupinum/ginko-docs"],
32
- },
33
- $meta: { name: "ginko-docs" },
34
- compatibilityDate: "2025-07-15",
35
- alias: { "#ginko-docs": app },
36
- css: [join(app, "assets/css/tailwind.css"), join(app, "assets/css/prose.css")],
37
- modules: [
38
- join(root, "modules/syntax-highlighting"),
39
- join(root, "modules/feature-routing"),
40
- "@nuxt/icon",
41
- "@nuxt/fonts",
42
- "@lupinum/ginko-content",
43
- "@nuxt/image",
44
- "@nuxt/scripts",
45
- join(root, "modules/analytics-boundary"),
46
- "nuxt-og-image",
47
- "@nuxtjs/sitemap",
48
- "@nuxtjs/robots",
49
- "@nuxtjs/color-mode",
50
- "@nuxtjs/mcp-toolkit",
51
- ],
52
- ogImage: {
53
- zeroRuntime: true,
54
- // Satori renders queue up behind page prerendering on modest build
55
- // machines; the default 15s budget is too tight under that contention.
56
- security: { renderTimeout: 120_000 },
57
- },
58
- mcp: {
59
- name: "Ginko Docs",
60
- version: packageMetadata.version,
61
- },
62
- components: {
63
- dirs: [
64
- {
65
- path: join(app, "components/site"),
66
- pathPrefix: false,
67
- global: true,
68
- pattern: [
69
- "SiteBanner.vue",
70
- "SiteFooter.vue",
71
- "SiteHeader.vue",
72
- "SiteInteractionLayer.vue",
73
- "SiteLocaleSwitcher.vue",
74
- "SiteLogoMark.vue",
75
- "SiteSkipLink.vue",
76
- "SiteSocialLinks.vue",
77
- ],
78
- },
79
- {
80
- path: join(app, "features/docs/components"),
81
- pathPrefix: false,
82
- global: true,
83
- pattern: "DocsSidebar.vue",
84
- },
85
- { path: join(app, "components/mdc"), pathPrefix: false, global: true },
86
- { path: join(app, "components/prose"), pathPrefix: false, global: true },
87
- ],
88
- },
89
- colorMode: { classSuffix: "" },
18
+ modules: ['@lupinum/ginko-components', '@nuxt/icon', '@lupinum/ginko-docs/pages'],
19
+ // Tells @lupinum/ginko to keep each page's repository path (`source`) in the served bundle, for "Edit this page".
20
+ // A config hook, not one in modules/pages.ts: it is registered before any module runs, whatever the module order.
21
+ hooks: { 'ginko:files': (options) => { options.keepSource = true } },
22
+ css: [here('./app/assets/docs.css')],
90
23
  icon: {
91
- provider: "none",
24
+ provider: 'none',
92
25
  fallbackToApi: false,
93
- customCollections: layerIconCollections,
94
- clientBundle: {
95
- icons: [...layerIconNames],
96
- includeCustomCollections: false,
97
- scan: {
98
- globInclude: [
99
- "**/*.{vue,js,mjs,cjs,ts,jsx,tsx,md,mdc,mdx,yml,yaml}",
100
- "**/.navigation.{yml,yaml}",
101
- ],
102
- globExclude: [
103
- ".git",
104
- ".nuxt",
105
- ".output",
106
- ".cache",
107
- "node_modules",
108
- "dist",
109
- "build",
110
- "coverage",
111
- "test",
112
- "tests",
113
- ],
114
- },
115
- },
116
- },
117
- fonts: {
118
- families: publicSansFamilies,
119
- providers: {
120
- adobe: false,
121
- bunny: false,
122
- fontshare: false,
123
- fontsource: false,
124
- google: false,
125
- googleicons: false,
126
- npm: false,
127
- },
128
- },
129
- i18n: {
130
- customRoutes: "config",
131
- defaultLocale: "en",
132
- detectBrowserLanguage: false,
133
- locales: locales
134
- .filter((locale) => locale.code === defaultLocale)
135
- .map(({ code, language, name }) => ({ code, language, name })),
136
- pages: i18nPages,
137
- strategy: "prefix_except_default",
138
- vueI18n: join(root, "i18n/i18n.config.ts"),
139
- },
140
- content: {
141
- componentPolicy: contentComponentPolicy,
142
- // Broken internal links and missing #anchors fail the build instead of
143
- // only landing in the validation report.
144
- validation: "error",
145
- i18n: {
146
- translatedSlugs: true,
147
- },
148
- markdown: {
149
- plugins: [
150
- [
151
- "shiki",
152
- {
153
- preStyles: false,
154
- transformers: [transformerNotationDiff(), transformerNotationHighlight()],
155
- themes: { light: lightPlus, dark: darkPlus },
156
- },
157
- ],
158
- ["toc", { depth: 4, searchDepth: 4 }],
159
- "summary",
160
- ["footnotes", { label: "" }],
161
- ],
162
- tags: contentComponentTags,
163
- anchorLinks: { depth: 4, exclude: [1] },
164
- },
165
- search: { engine: "minisearch" },
166
- sitemap: true,
167
- agent: { routes: true, linkHeaders: true, delivery: "static" },
168
- },
169
- sitemap: {
170
- excludeAppSources: ["nuxt:prerender"],
171
- // The docs roots prerender as redirects to the first docs page; a sitemap
172
- // must not list redirecting URLs.
173
- exclude: localeCodes.map((locale) => localizedPath(locale, routeSlugs.docs[locale])),
174
- },
175
- app: {
176
- head: {
177
- charset: "utf-8",
178
- htmlAttrs: { lang: "en" },
179
- viewport: "width=device-width, initial-scale=1",
180
- meta: [{ name: "color-scheme", content: "light dark" }],
181
- },
182
- },
183
- hooks: {
184
- "components:dirs"(dirs) {
185
- const defaultComponentsDir = join(app, "components").replaceAll("\\", "/");
186
- const filtered = dirs.filter((entry) => {
187
- const path = (typeof entry === "string" ? entry : entry.path).replaceAll("\\", "/");
188
- return path !== defaultComponentsDir;
189
- });
190
- dirs.splice(0, dirs.length, ...filtered);
191
- },
192
- },
193
- nitro: {
194
- prerender: {
195
- // OG images render through a Resvg worker. Parallel prerenders can
196
- // terminate that worker under load and leave otherwise valid pages with
197
- // 408/500 social-image routes, so package builds must stay serialized.
198
- concurrency: 1,
199
- crawlLinks: true,
200
- failOnError: true,
201
- routes: [
202
- "/llms.txt",
203
- "/llms-full.txt",
204
- "/sitemap.xml",
205
- "/robots.txt",
206
- // Link page over every authored redirectFrom source; crawling it
207
- // materializes the redirect stubs.
208
- "/api/_ginko-docs/redirects",
209
- ],
210
- },
26
+ customCollections: [{ prefix: 'docs', dir: here('./icons') }],
27
+ clientBundle: { icons, scan: true, includeCustomCollections: true },
211
28
  },
29
+ // The diagram engine (mermaid + ELK, 462 kB gzip) is loaded only by a page with a ```mermaid block. Left alone, Rolldown
30
+ // put its small shared module helper into that chunk, the icon runtime on every page imported the helper from there,
31
+ // and so every page downloaded the engine. A named group of its own keeps the helper out of it (e2e/docs.spec.ts checks).
212
32
  vite: {
213
- resolve: {
214
- dedupe: ["@lupinum/ginko-content", "vue", "vue-router"],
33
+ build: {
34
+ rolldownOptions: {
35
+ output: {
36
+ codeSplitting: {
37
+ groups: [{ name: 'mermaid', test: /[\\/]node_modules[\\/](beautiful-mermaid|elkjs|mermaid)[\\/]/, includeDependenciesRecursively: false }],
38
+ },
39
+ },
40
+ },
215
41
  },
216
- plugins: [tailwindcss()],
217
42
  },
218
- });
43
+ })
package/package.json CHANGED
@@ -1,103 +1,70 @@
1
1
  {
2
2
  "name": "@lupinum/ginko-docs",
3
- "version": "0.4.0-rc.9",
4
- "description": "A Nuxt documentation layer powered by Ginko Content.",
5
- "keywords": [
6
- "content",
7
- "documentation",
8
- "i18n",
9
- "markdown",
10
- "nuxt"
11
- ],
12
- "homepage": "https://ginko-docs.lupinum.com",
13
- "bugs": {
14
- "url": "https://github.com/lupinum-dev/ginko-docs/issues"
15
- },
3
+ "version": "0.4.0",
4
+ "type": "module",
5
+ "description": "Docs sites on Ginko: a Nuxt layer with navigation, search, blog, changelog and Markdown components.",
16
6
  "license": "MIT",
17
7
  "author": "Lupinum OG <info@lupinum.com> (https://lupinum.com)",
18
8
  "repository": {
19
9
  "type": "git",
20
- "url": "git+https://github.com/lupinum-dev/ginko-docs.git",
21
- "directory": "layer"
10
+ "url": "git+https://github.com/lupinum-dev/ginko.git",
11
+ "directory": "packages/ginko-docs"
12
+ },
13
+ "homepage": "https://github.com/lupinum-dev/ginko/tree/main/packages/ginko-docs#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/lupinum-dev/ginko/issues"
22
16
  },
23
- "bin": {
24
- "ginko-docs-favicons": "./runtime/generate-favicons.mjs"
17
+ "engines": {
18
+ "node": "^22.18.0 || ^24.0.0 || ^26.0.0"
25
19
  },
26
20
  "files": [
21
+ "nuxt.config.ts",
27
22
  "app",
28
- "i18n",
29
- "modules",
30
- "public",
31
- "runtime",
32
23
  "server",
33
24
  "shared",
34
- "content-collections.ts",
35
- "content.js",
36
- "content.ts",
37
- "components.ts",
38
- "icon-bundle.ts",
39
- "index.d.ts",
40
- "nuxt.config.ts",
41
- "tags.ts",
42
- "!**/*.test.ts"
25
+ "icons",
26
+ "public",
27
+ "i18n",
28
+ "dist",
29
+ "CHANGELOG.md"
43
30
  ],
44
- "type": "module",
45
31
  "main": "./nuxt.config.ts",
46
32
  "exports": {
47
33
  ".": "./nuxt.config.ts",
48
- "./content": {
49
- "types": "./content.ts",
50
- "import": "./content.js",
51
- "default": "./content.js"
34
+ "./config": {
35
+ "types": "./dist/config.d.mts",
36
+ "import": "./dist/config.mjs"
52
37
  },
53
- "./app-config": "./shared/types/app-config.ts",
54
- "./components": "./components.ts",
55
- "./nuxt-config": "./shared/types/nuxt-config.ts"
38
+ "./pages": "./dist/pages.mjs"
56
39
  },
57
40
  "publishConfig": {
58
41
  "access": "public"
59
42
  },
60
43
  "dependencies": {
61
- "@iconify-json/circle-flags": "^1.2.10",
62
- "@iconify-json/logos": "^1.2.12",
63
- "@iconify-json/lucide": "^1.2.123",
64
- "@nuxt/fonts": "^0.14.0",
65
- "@nuxt/icon": "^2.5.0",
66
- "@nuxt/image": "^2.1.0",
67
- "@nuxt/kit": "^4.5.2",
68
- "@nuxt/scripts": "^1.3.3",
69
- "@nuxtjs/color-mode": "^4.0.1",
70
- "@nuxtjs/i18n": "^10.6.0",
71
- "@nuxtjs/mcp-toolkit": "0.18.1",
72
- "@nuxtjs/robots": "^6.1.4",
73
- "@nuxtjs/sitemap": "^8.3.4",
74
- "@resvg/resvg-js": "^2.6.2",
75
- "@shikijs/transformers": "^4.4.3",
76
- "@tailwindcss/vite": "^4.3.3",
77
- "@vueuse/core": "^14.4.0",
78
- "class-variance-authority": "^0.7.1",
79
- "clsx": "^2.1.1",
80
- "h3": "1.15.11",
81
- "motion-v": "^2.3.0",
82
- "nitropack": "^2.13.4",
83
- "nuxt-og-image": "^6.7.8",
84
- "reka-ui": "^2.10.3",
85
- "satori": "^0.19.3",
86
- "sharp": "^0.35.3",
87
- "shiki": "^4.4.3",
88
- "tailwind-merge": "^3.6.0",
89
- "tailwindcss": "^4.3.3",
90
- "tw-animate-css": "^1.4.0",
91
- "zod": "4.4.3"
44
+ "@comark/vue": "0.7.0",
45
+ "@iconify-json/lucide": "^1.2.137",
46
+ "@lupinum/ginko-components": "^0.4.0",
47
+ "@nuxt/icon": "^2.5.1",
48
+ "@nuxt/kit": "^4.6.0",
49
+ "beautiful-mermaid": "^1.1.3",
50
+ "katex": "^0.18.11"
92
51
  },
93
52
  "peerDependencies": {
94
- "@lupinum/ginko-content": ">=1.0.0-beta.5 <2.0.0",
95
- "nuxt": ">=4.5.1 <5",
96
- "vue": "^3.5.40",
97
- "vue-router": "^5.1.0"
53
+ "@lupinum/ginko": "^0.4.0",
54
+ "@lupinum/ginko-content": "^0.4.0",
55
+ "@lupinum/ginko-i18n": "^0.4.0",
56
+ "nuxt": "^4.6.0 || ^5.0.0-0",
57
+ "vue": "^3.5.0"
98
58
  },
99
- "engines": {
100
- "node": "^22.18.0 || ^24.11.0 || >=26.0.0"
59
+ "devDependencies": {
60
+ "@lupinum/ginko": "0.4.0",
61
+ "@lupinum/ginko-content": "0.4.0",
62
+ "@lupinum/ginko-i18n": "0.4.0",
63
+ "nuxt": "4.6.0",
64
+ "unbuild": "3.6.1",
65
+ "vue": "3.5.43"
101
66
  },
102
- "scripts": {}
67
+ "scripts": {
68
+ "build": "unbuild"
69
+ }
103
70
  }