@writedocs/generator 0.13.4 → 0.14.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 (89) hide show
  1. package/README.md +28 -28
  2. package/astro.config.mjs +645 -645
  3. package/bin/writedocs.js +359 -356
  4. package/package.json +99 -99
  5. package/src/cli/base-path-layout.js +44 -44
  6. package/src/cli/build-auth.js +135 -135
  7. package/src/cli/build.js +223 -203
  8. package/src/cli/check-built-styles.js +41 -41
  9. package/src/cli/convert.js +124 -124
  10. package/src/cli/dev.js +269 -268
  11. package/src/cli/exit-when-flushed.js +42 -42
  12. package/src/cli/generate-api-pages.js +509 -507
  13. package/src/cli/og-image-worker.js +20 -20
  14. package/src/cli/og-images.js +70 -70
  15. package/src/cli/page-list-watch.js +71 -69
  16. package/src/cli/run-astro.js +97 -97
  17. package/src/cli/run-pagefind.js +154 -154
  18. package/src/cli/write-mcp-files.js +103 -103
  19. package/src/cli/write-redirects-file.js +158 -158
  20. package/src/components/ApiReferencePanel.astro +1792 -1792
  21. package/src/components/AppIcon.astro +51 -51
  22. package/src/components/Card.astro +193 -193
  23. package/src/components/CodeGroup.astro +63 -39
  24. package/src/components/CopyPageMenu.astro +374 -374
  25. package/src/components/Hint.astro +188 -188
  26. package/src/components/Icon.astro +72 -72
  27. package/src/components/Image.astro +165 -165
  28. package/src/components/Tile.astro +67 -67
  29. package/src/components/Video.astro +137 -137
  30. package/src/content.config.ts +219 -203
  31. package/src/layout/BaseLayout.astro +908 -908
  32. package/src/layout/components/AnalyticsScripts.astro +49 -49
  33. package/src/layout/components/Breadcrumbs.astro +98 -98
  34. package/src/layout/components/ConsentBanner.astro +119 -119
  35. package/src/layout/components/MobileMenu.astro +225 -225
  36. package/src/layout/components/NavTree.astro +422 -408
  37. package/src/layout/components/Sidebar.astro +232 -232
  38. package/src/layout/components/SiteFooter.astro +87 -87
  39. package/src/layout/components/TopBar.astro +386 -386
  40. package/src/layout/styles/base.css +332 -326
  41. package/src/layout/styles/mobile-menu.css +285 -285
  42. package/src/lib/agent-markdown.js +164 -164
  43. package/src/lib/asset-dimensions.js +89 -89
  44. package/src/lib/base-path.js +90 -90
  45. package/src/lib/cli-report.js +22 -22
  46. package/src/lib/code-line-numbers.js +13 -0
  47. package/src/lib/config-schema.js +12 -1
  48. package/src/lib/config-schema.ts +2523 -2509
  49. package/src/lib/config.ts +1331 -1316
  50. package/src/lib/consent.js +108 -108
  51. package/src/lib/content-check.js +4 -1
  52. package/src/lib/content-store-reload-integration.js +101 -101
  53. package/src/lib/drafts.js +186 -0
  54. package/src/lib/icon-data-dev.js +53 -53
  55. package/src/lib/image-size.js +152 -152
  56. package/src/lib/json-schema-descriptions.js +228 -228
  57. package/src/lib/link-check.js +553 -544
  58. package/src/lib/llms-index.ts +90 -90
  59. package/src/lib/mcp-dev-integration.js +65 -65
  60. package/src/lib/mcp-index.ts +102 -102
  61. package/src/lib/mintlify-convert.js +605 -605
  62. package/src/lib/moved-api-pages.js +49 -49
  63. package/src/lib/og-cards.js +33 -33
  64. package/src/lib/og-image.js +235 -235
  65. package/src/lib/openapi-dev-status.js +80 -80
  66. package/src/lib/openapi-reload-integration.js +193 -193
  67. package/src/lib/pages.js +346 -312
  68. package/src/lib/project-files-integration.js +116 -116
  69. package/src/lib/project-files.js +137 -137
  70. package/src/lib/rehype-base-path.js +62 -62
  71. package/src/lib/rehype-image-loading.js +71 -71
  72. package/src/lib/robots-txt.js +21 -21
  73. package/src/lib/search-scope.js +44 -44
  74. package/src/lib/selector-placement.js +50 -50
  75. package/src/lib/seo-tags.js +157 -155
  76. package/src/lib/shiki-code-block.js +7 -1
  77. package/src/lib/site-base.ts +27 -27
  78. package/src/lib/styles-asset-integration.js +291 -291
  79. package/src/lib/wdignore-cases.json +195 -195
  80. package/src/lib/wdignore.js +177 -177
  81. package/src/pages/404.astro +63 -63
  82. package/src/pages/[...slug].astro +1773 -1608
  83. package/src/pages/[...slug].md.ts +93 -93
  84. package/src/pages/llms-full.txt.ts +88 -88
  85. package/src/pages/og/[...slug].png.ts +63 -63
  86. package/src/scripts/mobile-menu.ts +80 -80
  87. package/src/scripts/search.ts +245 -245
  88. package/src/scripts/sidebar-scroll.ts +61 -61
  89. package/src/styles/global.css +40 -40
@@ -1,40 +1,40 @@
1
- /* Wires Tailwind's utility classes into every writedocs build. Nothing in
2
- writedocs' own components (BaseLayout, NavTree, Sidebar, Card, etc.)
3
- uses Tailwind - they keep their existing scoped <style> blocks built
4
- on the --wd-* CSS variables, since those already support per-site
5
- writedocs.json theming (colors, dark mode) at render time. This import
6
- just makes Tailwind's utilities available for custom/future content,
7
- e.g. hand-authored MDX.
8
-
9
- Deliberately importing theme + utilities only, NOT the full
10
- "tailwindcss" entrypoint - that also pulls in Tailwind's preflight
11
- (a browser-default CSS reset), which sets h1-h6's font-size/
12
- font-weight to `inherit`. MDX content headings here rely on the
13
- browser's own default heading styles (nothing in this codebase sets
14
- them explicitly), so preflight was silently collapsing every
15
- heading down to plain paragraph text. Skipping it keeps utility
16
- classes available with zero effect on existing unstyled elements. */
17
- @import "tailwindcss/theme.css";
18
- @import "tailwindcss/utilities.css";
19
-
20
- /* Where Tailwind looks for class names: it scans this package's folder (the
21
- Vite root). It skips node_modules folders - except when the folder it
22
- scans is itself inside one, and an installed writedocs always is
23
- (.../node_modules/@writedocs/generator). With `npm install -g`, the build
24
- platform's own install, the dependencies sit in that folder: every build
25
- read all ~27,000 files of node_modules - ~6 s of CPU and, on a cold disk,
26
- most of a small site's build - and the stylesheet got ~600 rules for
27
- words that only appear in those files. This skips them in every install,
28
- as a checkout of this repo always did. The path is from this file:
29
- ../../ is the package's folder. */
30
- @source not "../../node_modules";
31
-
32
- /* Tailwind's `dark:` variant follows the site's own theme toggle
33
- ([data-theme="dark"] on <html>, set by BaseLayout.astro), not the OS
34
- setting it defaults to - otherwise Mintlify-style light/dark image
35
- pairs (className="block dark:hidden" / "hidden dark:block") show the
36
- wrong one whenever the reader's toggle and their OS disagree. The
37
- site's content directory is added as a Tailwind source at build time
38
- by astro.config.mjs's contentTailwindSource() plugin, since it lives
39
- outside this package where Tailwind looks by default. */
40
- @custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
1
+ /* Wires Tailwind's utility classes into every writedocs build. Nothing in
2
+ writedocs' own components (BaseLayout, NavTree, Sidebar, Card, etc.)
3
+ uses Tailwind - they keep their existing scoped <style> blocks built
4
+ on the --wd-* CSS variables, since those already support per-site
5
+ writedocs.json theming (colors, dark mode) at render time. This import
6
+ just makes Tailwind's utilities available for custom/future content,
7
+ e.g. hand-authored MDX.
8
+
9
+ Deliberately importing theme + utilities only, NOT the full
10
+ "tailwindcss" entrypoint - that also pulls in Tailwind's preflight
11
+ (a browser-default CSS reset), which sets h1-h6's font-size/
12
+ font-weight to `inherit`. MDX content headings here rely on the
13
+ browser's own default heading styles (nothing in this codebase sets
14
+ them explicitly), so preflight was silently collapsing every
15
+ heading down to plain paragraph text. Skipping it keeps utility
16
+ classes available with zero effect on existing unstyled elements. */
17
+ @import "tailwindcss/theme.css";
18
+ @import "tailwindcss/utilities.css";
19
+
20
+ /* Where Tailwind looks for class names: it scans this package's folder (the
21
+ Vite root). It skips node_modules folders - except when the folder it
22
+ scans is itself inside one, and an installed writedocs always is
23
+ (.../node_modules/@writedocs/generator). With `npm install -g`, the build
24
+ platform's own install, the dependencies sit in that folder: every build
25
+ read all ~27,000 files of node_modules - ~6 s of CPU and, on a cold disk,
26
+ most of a small site's build - and the stylesheet got ~600 rules for
27
+ words that only appear in those files. This skips them in every install,
28
+ as a checkout of this repo always did. The path is from this file:
29
+ ../../ is the package's folder. */
30
+ @source not "../../node_modules";
31
+
32
+ /* Tailwind's `dark:` variant follows the site's own theme toggle
33
+ ([data-theme="dark"] on <html>, set by BaseLayout.astro), not the OS
34
+ setting it defaults to - otherwise Mintlify-style light/dark image
35
+ pairs (className="block dark:hidden" / "hidden dark:block") show the
36
+ wrong one whenever the reader's toggle and their OS disagree. The
37
+ site's content directory is added as a Tailwind source at build time
38
+ by astro.config.mjs's contentTailwindSource() plugin, since it lives
39
+ outside this package where Tailwind looks by default. */
40
+ @custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));